Documentation
¶
Overview ¶
A horizontal menu bar that creates a menu for each graphics.gd/classdb/PopupMenu child. New items are created by adding [graphics.gd/classdb/PopupMenu]s to this node. Item title is determined by graphics.gd/classdb/Window.Instance.Title, or node name if graphics.gd/classdb/Window.Instance.Title is empty. Item title can be overridden using Instance.SetMenuTitle.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsMenuBar() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) Flat() bool
- func (self Instance) GetMenuCount() int
- func (self Instance) GetMenuPopup(menu int) PopupMenu.Instance
- func (self Instance) GetMenuTitle(menu int) string
- func (self Instance) GetMenuTooltip(menu int) string
- func (self Instance) ID() ID
- func (self Instance) IsMenuDisabled(menu int) bool
- func (self Instance) IsMenuHidden(menu int) bool
- func (self Instance) IsNativeMenu() bool
- func (self Instance) Language() string
- func (self Instance) PreferGlobalMenu() bool
- func (self Instance) SetDisableShortcuts(disabled bool)
- func (self Instance) SetFlat(value bool)
- func (self Instance) SetLanguage(value string)
- func (self Instance) SetMenuDisabled(menu int, disabled bool)
- func (self Instance) SetMenuHidden(menu int, hidden bool)
- func (self Instance) SetMenuTitle(menu int, title string)
- func (self Instance) SetMenuTooltip(menu int, tooltip string)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetPreferGlobalMenu(value bool)
- func (self Instance) SetStartIndex(value int)
- func (self Instance) SetSwitchOnHover(value bool)
- func (self Instance) SetTextDirection(value Control.TextDirection)
- func (self Instance) StartIndex() int
- func (self Instance) SwitchOnHover() bool
- func (self Instance) TextDirection() Control.TextDirection
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsCanvasItem ¶
func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) GetMenuCount ¶
Returns number of menu items.
func (Instance) GetMenuPopup ¶
Returns graphics.gd/classdb/PopupMenu associated with menu item.
func (Instance) GetMenuTitle ¶
Returns menu item title.
func (Instance) GetMenuTooltip ¶
Returns menu item tooltip.
func (Instance) IsMenuDisabled ¶
Returns true, if menu item is disabled.
func (Instance) IsMenuHidden ¶
Returns true, if menu item is hidden.
func (Instance) IsNativeMenu ¶
Returns true, if system global menu is supported and used by this graphics.gd/classdb/MenuBar.
func (Instance) PreferGlobalMenu ¶
func (Instance) SetDisableShortcuts ¶
If true, shortcuts are disabled and cannot be used to trigger the button.
func (Instance) SetLanguage ¶
func (Instance) SetMenuDisabled ¶
If true, menu item is disabled.
func (Instance) SetMenuHidden ¶
If true, menu item is hidden.
func (Instance) SetMenuTitle ¶
Sets menu item title.
func (Instance) SetMenuTooltip ¶
Sets menu item tooltip.
func (Instance) SetPreferGlobalMenu ¶
func (Instance) SetStartIndex ¶
func (Instance) SetSwitchOnHover ¶
func (Instance) SetTextDirection ¶
func (self Instance) SetTextDirection(value Control.TextDirection)
func (Instance) StartIndex ¶
func (Instance) SwitchOnHover ¶
func (Instance) TextDirection ¶
func (self Instance) TextDirection() Control.TextDirection