Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlibMenuStruct ¶
type GlibMenuStruct struct { Menus []sMenu Actions []sAction MenuButton *gtk.MenuButton // contains filtered or unexported fields }
GlibMenuStrut: structure containing a set of []*glib.Menu and allowing the management of separators and sub-menus. At this time Gotk3 does not handle complex actions correctly (checkbox ...). Note: Separator look like blank lines, to make them looking like underline, use CSS;
func GlibMenuStrutNew ¶
func GlibMenuStrutNew(application *gtk.Application, menuButton *gtk.MenuButton) (gms *GlibMenuStruct, err error)
GlibMenuStrutNew: Create structure to hold a GMenu.
func (*GlibMenuStruct) ActionAdd ¶
func (gms *GlibMenuStruct) ActionAdd(label, action string, callback func())
ActionAdd: Add a *glib.SimpleAction
func (*GlibMenuStruct) BuilGMenu ¶
func (gms *GlibMenuStruct) BuilGMenu()
BuilGMenu: Once finalized, this one permit to create GMenu to be displayed.
func (*GlibMenuStruct) SectionAdd ¶
func (gms *GlibMenuStruct) SectionAdd(label ...string) error
SectionAdd: Add a section, sectionLbl may be the title of this new section or ignored for a simple blank line.
func (*GlibMenuStruct) SubMenuAdd ¶
func (gms *GlibMenuStruct) SubMenuAdd(label string) (err error)
SubMenuAdd: Add a sub-menu, sectionLbl may be the title of the section that hold this sub-menu.
func (*GlibMenuStruct) SubMenuPrev ¶
func (gms *GlibMenuStruct) SubMenuPrev()
SubMenuPrev: Return to the previous menu, generally used go up one level of a submenu.