MenuBar

Description The GtkMenuBar is a subclass of GtkMenuShell which contains one to many GtkMenuItem. The result is a standard menu bar which can hold many menu items. GtkMenuBar allows for a shadow type to be set for aesthetic purposes. The shadow types are defined in the gtk_menu_bar_set_shadow_type function.

Constructors

this
this(GtkMenuBar* gtkMenuBar)

Sets our main struct and passes it to the parent class

this
this()

Creates the new GtkMenuBar

Members

Functions

append
Menu append(string label, bool rightJustify)
append
void append(Widget widget)
getChildPackDirection
GtkPackDirection getChildPackDirection()

Retrieves the current child pack direction of the menubar. See gtk_menu_bar_set_child_pack_direction(). Since 2.8

getMenuBarStruct
GtkMenuBar* getMenuBarStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getPackDirection
GtkPackDirection getPackDirection()

Retrieves the current pack direction of the menubar. See gtk_menu_bar_set_pack_direction(). Since 2.8

getStruct
void* getStruct()

the main Gtk struct as a void*

setChildPackDirection
void setChildPackDirection(GtkPackDirection childPackDir)

Sets how widgets should be packed inside the children of a menubar. Since 2.8

setPackDirection
void setPackDirection(GtkPackDirection packDir)

Sets how items should be packed inside a menubar. Since 2.8

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

gtkMenuBar
GtkMenuBar* gtkMenuBar;

the main Gtk struct

Inherited Members

From MenuShell

gtkMenuShell
GtkMenuShell* gtkMenuShell;

the main Gtk struct

getMenuShellStruct
GtkMenuShell* getMenuShellStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
connectedSignals
int[string] connectedSignals;
onActivateCurrentListeners
void delegate(gboolean, MenuShell)[] onActivateCurrentListeners;
Undocumented in source.
addOnActivateCurrent
void addOnActivateCurrent(void delegate(gboolean, MenuShell) dlg, ConnectFlags connectFlags)

An action signal that activates the current menu item within the menu shell.

callBackActivateCurrent
void callBackActivateCurrent(GtkMenuShell* menushellStruct, gboolean arg1, MenuShell _menuShell)
Undocumented in source. Be warned that the author may not have intended to support it.
onCancelListeners
void delegate(MenuShell)[] onCancelListeners;
Undocumented in source.
addOnCancel
void addOnCancel(void delegate(MenuShell) dlg, ConnectFlags connectFlags)

An action signal which cancels the selection within the menu shell. Causes the GtkMenuShell::selection-done signal to be emitted.

callBackCancel
void callBackCancel(GtkMenuShell* menushellStruct, MenuShell _menuShell)
Undocumented in source. Be warned that the author may not have intended to support it.
onCycleFocusListeners
void delegate(GtkDirectionType, MenuShell)[] onCycleFocusListeners;
Undocumented in source.
addOnCycleFocus
void addOnCycleFocus(void delegate(GtkDirectionType, MenuShell) dlg, ConnectFlags connectFlags)
callBackCycleFocus
void callBackCycleFocus(GtkMenuShell* menushellStruct, GtkDirectionType arg1, MenuShell _menuShell)
Undocumented in source. Be warned that the author may not have intended to support it.
onDeactivateListeners
void delegate(MenuShell)[] onDeactivateListeners;
Undocumented in source.
addOnDeactivate
void addOnDeactivate(void delegate(MenuShell) dlg, ConnectFlags connectFlags)

This signal is emitted when a menu shell is deactivated.

callBackDeactivate
void callBackDeactivate(GtkMenuShell* menushellStruct, MenuShell _menuShell)
Undocumented in source. Be warned that the author may not have intended to support it.
onMoveCurrentListeners
void delegate(GtkMenuDirectionType, MenuShell)[] onMoveCurrentListeners;
Undocumented in source.
addOnMoveCurrent
void addOnMoveCurrent(void delegate(GtkMenuDirectionType, MenuShell) dlg, ConnectFlags connectFlags)

An action signal which moves the current menu item in the direction specified by direction.

callBackMoveCurrent
void callBackMoveCurrent(GtkMenuShell* menushellStruct, GtkMenuDirectionType arg1, MenuShell _menuShell)
Undocumented in source. Be warned that the author may not have intended to support it.
onMoveSelectedListeners
bool delegate(gint, MenuShell)[] onMoveSelectedListeners;
Undocumented in source.
addOnMoveSelected
void addOnMoveSelected(bool delegate(gint, MenuShell) dlg, ConnectFlags connectFlags)

The ::move-selected signal is emitted to move the selection to another item. TRUE to stop the signal emission, FALSE to continue Since 2.12

callBackMoveSelected
gboolean callBackMoveSelected(GtkMenuShell* menuShellStruct, gint distance, MenuShell _menuShell)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionDoneListeners
void delegate(MenuShell)[] onSelectionDoneListeners;
Undocumented in source.
addOnSelectionDone
void addOnSelectionDone(void delegate(MenuShell) dlg, ConnectFlags connectFlags)

This signal is emitted when a selection has been completed within a menu shell.

callBackSelectionDone
void callBackSelectionDone(GtkMenuShell* menushellStruct, MenuShell _menuShell)
Undocumented in source. Be warned that the author may not have intended to support it.
append
void append(Widget child)

Adds a new GtkMenuItem to the end of the menu shell's item list.

prepend
void prepend(Widget child)

Adds a new GtkMenuItem to the beginning of the menu shell's item list.

insert
void insert(Widget child, int position)

Adds a new GtkMenuItem to the menu shell's item list at the position indicated by position.

deactivate
void deactivate()

Deactivates the menu shell. Typically this results in the menu shell being erased from the screen.

selectItem
void selectItem(Widget menuItem)

Selects the menu item from the menu shell.

selectFirst
void selectFirst(int searchSensitive)

Select the first visible or selectable child of the menu shell; don't select tearoff items unless the only item is a tearoff item. Since 2.2

deselect
void deselect()

Deselects the currently selected item from the menu shell, if any.

activateItem
void activateItem(Widget menuItem, int forceDeactivate)

Activates the menu item within the menu shell.

cancel
void cancel()

Cancels the selection within the menu shell. Since 2.4

setTakeFocus
void setTakeFocus(int takeFocus)

If take_focus is TRUE (the default) the menu shell will take the keyboard focus so that it will receive all keyboard events which is needed to enable keyboard navigation in menus. Setting take_focus to FALSE is useful only for special applications like virtual keyboard implementations which should not take keyboard focus. The take_focus state of a menu or menu bar is automatically propagated to submenus whenever a submenu is popped up, so you don't have to worry about recursively setting it for your entire menu hierarchy. Only when programmatically picking a submenu and popping it up manually, the take_focus property of the submenu needs to be set explicitely. Since 2.8

getTakeFocus
int getTakeFocus()

Returns TRUE if the menu shell will take the keyboard focus on popup. Since 2.8

Meta