# menubar widget # Gtk2: A [GtkMenuBar](https://developer-old.gnome.org/gtk2/2.24/GtkMenuBar.html) Gtk3: A [GtkMenuBar](https://docs.gtk.org/gtk3/class.MenuBar.html) --- ## Definition ## ``` menu... varname state activity... ``` "..." denotes acceptance of multiples of the same thing. ## Tag Attributes ## See the GtkMenuBar widget and ancestor class properties. The following custom tag attributes are available: | **Name** | **Description** | **Value** | **Since** | |:---------|:----------------|:----------|:----------| | space-expand | Pack widget expanding into space | `true` or `false` | 0.8.1 | | space-fill | Pack widget filling space | `true` or `false` | 0.8.1 | | block-function-signals | Block signal emissions from functions | `true` or `false` | 0.8.1 | ## Directives ## Some of these may have tag attribute equivalents. | **Name** | **Description** | **Contents** | **Since** | |:---------|:----------------|:-------------|:----------| | variable | Variable name | | 0.8.1 | | variable export="false" | Variable name, not exported to shell | | 0.8.3 | | sensitive | Sensitive state | `true` or `false` | 0.8.1 | | action signal="_type_" | Execute command on signal | Shell command | 0.8.1 | | action signal="_type_" | Perform function on signal | _function_:_parameter_ | 0.8.1 | | action signal="_type_" condition="_type_" | Execute command on signal conditionally | Shell command | 0.8.3 | | action signal="_type_" condition="_type_" | Perform function on signal conditionally | _function_:_parameter_ | 0.8.3 | ## Signals ## There is no default signal for this widget. The following signals are connected-up for all widgets: __Gtk2:__ [button-press-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-button-press-event), [button-release-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-button-release-event), [configure-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-configure-event), [enter-notify-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-enter-notify-event), [leave-notify-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-leave-notify-event), [focus-in-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-focus-in-event), [focus-out-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-focus-out-event), [hide](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-hide), [show](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-show), [realize](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-realize), [key-press-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-key-press-event), [key-release-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-key-release-event), [map-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-map-event), [unmap-event](https://developer-old.gnome.org/gtk2/2.24/GtkWidget.html#GtkWidget-unmap-event) __Gtk3:__ [button-press-event](https://docs.gtk.org/gtk3/signal.Widget.button-press-event.html), [button-release-event](https://docs.gtk.org/gtk3/signal.Widget.button-release-event.html), [configure-event](https://docs.gtk.org/gtk3/signal.Widget.configure-event.html), [enter-notify-event](https://docs.gtk.org/gtk3/signal.Widget.enter-notify-event.html), [leave-notify-event](https://docs.gtk.org/gtk3/signal.Widget.leave-notify-event.html), [focus-in-event](https://docs.gtk.org/gtk3/signal.Widget.focus-in-event.html), [focus-out-event](https://docs.gtk.org/gtk3/signal.Widget.focus-out-event.html), [hide](https://docs.gtk.org/gtk3/signal.Widget.hide.html), [show](https://docs.gtk.org/gtk3/signal.Widget.show.html), [realize](https://docs.gtk.org/gtk3/signal.Widget.realize.html), [key-press-event](https://docs.gtk.org/gtk3/signal.Widget.key-press-event.html), [key-release-event](https://docs.gtk.org/gtk3/signal.Widget.key-release-event.html), [map-event](https://docs.gtk.org/gtk3/signal.Widget.map-event.html), [unmap-event](https://docs.gtk.org/gtk3/signal.Widget.unmap-event.html) ## Functions ## The following functions can be performed upon this widget by any widget capable of emitting signals: | **Type** | **Description** | **Parameter** | **Since** | |:---------|:----------------|:--------------|:----------| | enable | Sensitise widget | Variable name | 0.8.1 | | disable | Desensitise widget | Variable name | 0.8.1 | | show | Show widget | Variable name | 0.8.1 | | hide | Hide widget | Variable name | 0.8.1 | The following general functions can be performed by any widget capable of emitting signals: | **Type** | **Description** | **Parameter** | **Since** | |:---------|:----------------|:--------------|:----------| | break | Break out of actions list | None | 0.8.3 | | command | Execute command | Shell command | 0.8.1 | | exit | Exit dialog | A value for the `EXIT` variable | 0.8.1 | | closewindow | Close dialog | Variable name | 0.8.1 | | launch | Launch dialog | Variable name | 0.8.1 | | presentwindow | Present dialog | Variable name | 0.8.1 | ## Conditions ## The following conditions can be used within the condition attribute of action directives: | **Type** | **Description** | **Argument** | **Since** | |:---------|:----------------|:-------------|:----------| | active\_is\_true(_argument_) | Active state of toggle widget | Variable name | 0.8.3 | | active\_is\_false(_argument_) | Active state of toggle widget | Variable name | 0.8.3 | | command\_is\_true(_argument_) | Output of shell command | Shell command | 0.8.3 | | command\_is\_false(_argument_) | Output of shell command | Shell command | 0.8.3 | | file\_is\_true(_argument_) | Contents of a file | Filename | 0.8.3 | | file\_is\_false(_argument_) | Contents of a file | Filename | 0.8.3 | | sensitive\_is\_true(_argument_) | Sensitive state of widget | Variable name | 0.8.3 | | sensitive\_is\_false(_argument_) | Sensitive state of widget | Variable name | 0.8.3 | | visible\_is\_true(_argument_) | Visible state of widget | Variable name | 0.8.3 | | visible\_is\_false(_argument_) | Visible state of widget | Variable name | 0.8.3 | | variable_is_true(argument) | Value of widget | Variable name | 0.8.5 | | variable_is_false(argument) | Value of widget | Variable name | 0.8.5| true means "true", "yes" or a non-zero value, false means "false", "no" or zero, therefore the shell command is expected to echo one of these values to stdout. ## Notes ## None. ---