How to create GtkMenus

47b7f167126268a8f84379308d2dea5c.png
1. create a
GtkMenuBar()
;
2. create a
GtkMenuItem()
and append to
GtkMenuBar()
;
3. create a
GtkMenu()
e and add itens inside  with
GtkMenuItem::new_with_label($label)
;
4. you can use
GtkSeparatorMenuItem()
too;
5. append
GtkMenu
as submenu of
GtkMenuItem()
;
6. the structure are
GtkMenu()
as submenu of
GtkMenuItem()
, and
GtkMenuItem()
inside a
GtkMenuBar()
;
7. connect the
GtkMenuItem
to signal
activate
to detect when click on the menu;