MenuBar

The #GtkMenuBar is a subclass of #GtkMenuShell which contains one or more #GtkMenuItems. The result is a standard menu bar which can hold many menu items.

Constructors

this
this(GtkMenuBar* gtkMenuBar, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new #GtkMenuBar

this
this(MenuModel model)

Creates a new #GtkMenuBar and populates it with menu items and submenus according to @model.

Members

Functions

append
Menu append(string label, bool rightJustify)
append
void append(MenuItem item)
getChildPackDirection
GtkPackDirection getChildPackDirection()

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

getMenuBarStruct
GtkMenuBar* getMenuBarStruct()

Get the main Gtk struct

getPackDirection
GtkPackDirection getPackDirection()

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

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.

setPackDirection
void setPackDirection(GtkPackDirection packDir)

Sets how items should be packed inside a menubar.

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

Static functions

getType
GType getType()

Variables

gtkMenuBar
GtkMenuBar* gtkMenuBar;

the main Gtk struct

Inherited Members

From MenuShell

gtkMenuShell
GtkMenuShell* gtkMenuShell;

the main Gtk struct

getMenuShellStruct
GtkMenuShell* getMenuShellStruct()

Get the main Gtk struct

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.
getType
GType getType()
activateItem
void activateItem(Widget menuItem, bool forceDeactivate)

Activates the menu item within the menu shell.

append
void append(MenuItem child)

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

bindModel
void bindModel(MenuModel model, string actionNamespace, bool withSeparators)

Establishes a binding between a #GtkMenuShell and a #GMenuModel.

cancel
void cancel()

Cancels the selection within the menu shell.

deactivate
void deactivate()

Deactivates the menu shell.

deselect
void deselect()

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

getParentShell
Widget getParentShell()

Gets the parent menu shell.

getSelectedItem
Widget getSelectedItem()

Gets the currently selected item.

getTakeFocus
bool getTakeFocus()

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

insert
void insert(Widget child, int position)

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

prepend
void prepend(Widget child)

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

selectFirst
void selectFirst(bool 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.

selectItem
void selectItem(Widget menuItem)

Selects the menu item from the menu shell.

setTakeFocus
void setTakeFocus(bool 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.

connectedSignals
int[string] connectedSignals;
Undocumented in source.
onActivateCurrentListeners
void delegate(bool, MenuShell)[] onActivateCurrentListeners;
Undocumented in source.
addOnActivateCurrent
void addOnActivateCurrent(void delegate(bool, MenuShell) dlg, ConnectFlags connectFlags)

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

callBackActivateCurrent
void callBackActivateCurrent(GtkMenuShell* menushellStruct, bool forceHide, 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)

A keybinding signal which moves the focus in the given @direction.

callBackCycleFocus
void callBackCycleFocus(GtkMenuShell* menushellStruct, GtkDirectionType direction, 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.
onInsertListeners
void delegate(Widget, int, MenuShell)[] onInsertListeners;
Undocumented in source.
addOnInsert
void addOnInsert(void delegate(Widget, int, MenuShell) dlg, ConnectFlags connectFlags)

The ::insert signal is emitted when a new #GtkMenuItem is added to a #GtkMenuShell. A separate signal is used instead of GtkContainer::add because of the need for an additional position parameter.

callBackInsert
void callBackInsert(GtkMenuShell* menushellStruct, GtkWidget* child, int position, 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 keybinding signal which moves the current menu item in the direction specified by @direction.

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

The ::move-selected signal is emitted to move the selection to another item.

callBackMoveSelected
int callBackMoveSelected(GtkMenuShell* menushellStruct, int 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.

Meta