backendmenu

package
v0.0.0-...-0caaa62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2017 License: GPL-3.0-or-later Imports: 22 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIconForDesklet

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

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

func Register

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

Register registers menu callbacks, to receive menu events.

func WrapDockMenuCallback

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.

Types

type DockMenu

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

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

WrapDockMenu wraps a menu as DockMenu.

func (*DockMenu) AddButtonsEntry

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

AddButtonsEntry adds an item with button entries to the menu.

func (*DockMenu) AddSubMenu

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

AddSubMenu adds a submenu to the menu.

func (*DockMenu) Entry

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL