godock: github.com/sqp/godock/libs/gldi/backendmenu Index | Files

package backendmenu

import "github.com/sqp/godock/libs/gldi/backendmenu"

Package backendmenu provides menu events and widgets to build the menu.

Index

Package Files

backendmenu.go

func GetIconForDesklet Uses

func GetIconForDesklet(icon gldi.Icon, container *gldi.Container) gldi.Icon

GetIconForDesklet will return the correct icon if clicked on a desklet.

func Register Uses

func Register(l cdtype.Logger, menucontainer, menuicon func(*DockMenu) bool)

Register registers menu callbacks, to receive menu events.

func WrapDockMenuCallback Uses

func WrapDockMenuCallback(call func(dm *DockMenu) bool) func(icon gldi.Icon, container *gldi.Container, dock *gldi.CairoDock, menu *gtk.Menu) bool

WrapDockMenuCallback returns a DockMenu wrapper function.

type DockMenu Uses

type DockMenu struct {
    menus.Menu
    Icon      gldi.Icon
    Container *gldi.Container
    Dock      *gldi.CairoDock // just a pointer to container with type dock.
}

DockMenu represents a dock menu.

func WrapDockMenu Uses

func WrapDockMenu(icon gldi.Icon, container *gldi.Container, dock *gldi.CairoDock, menu *gtk.Menu) *DockMenu

WrapDockMenu wraps a menu as DockMenu.

func (*DockMenu) AddButtonsEntry Uses

func (m *DockMenu) AddButtonsEntry(label string, btns ...MenuBtn) *menus.ButtonsEntry

AddButtonsEntry adds an item with button entries to the menu.

func (*DockMenu) AddSubMenu Uses

func (m *DockMenu) AddSubMenu(label, iconPath string) *DockMenu

AddSubMenu adds a submenu to the menu.

func (*DockMenu) Entry Uses

func (m *DockMenu) Entry(entry MenuEntry) bool

Entry adds a defined entry to the menu. Returns if a separator is needed.

type MenuBtn int

MenuBtn represents common menu button entries type.

const (
    MenuWindowClose MenuBtn = iota
    MenuWindowCloseAll
    MenuWindowMax
    MenuWindowMin
    MenuWindowMinAll
    MenuWindowShow
    MenuWindowShowAll
)

Common menu button entries.

type MenuEntry int

MenuEntry represents common menu item entries type.

const (
    MenuAbout MenuEntry = iota
    MenuAddApplet
    MenuAddLauncher
    MenuAddMainDock
    MenuAddSeparator
    MenuAddSubDock
    MenuClassItems
    MenuConfigure
    MenuCustomIconRemove
    MenuCustomIconSet
    MenuDeleteDock
    MenuDeskletLock
    MenuDeskletSticky
    MenuDeskletVisibility
    MenuDetachApplet
    MenuEditDock
    MenuDuplicateApplet
    MenuEditApplet
    MenuEditIcon
    MenuEditTarget
    MenuHandbook
    MenuHelp
    MenuLaunchNew
    MenuLockIcons
    MenuMakeLauncher
    MenuMoveToDesktopClass
    MenuMoveToDesktopWindow
    MenuMoveToDock
    MenuQuickHide
    MenuQuit
    MenuRemoveApplet
    MenuRemoveIcon
    MenuThemes
    MenuWindowAbove
    MenuWindowBelow
    MenuWindowFullScreen
    MenuWindowKill
    MenuWindowMoveAllHere
    MenuWindowMoveHere
    MenuWindowSticky
)

Common menu item entries.

Package backendmenu imports 22 packages (graph) and is imported by 3 packages. Updated 2016-09-13. Refresh now. Tools for package owners.