Package: gtk
Class gtk:toolbar
Superclassesgtk:container, gtk:widget, gtk:buildable, gtk:tool-shell, gtk:orientable, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails A toolbar can contain instances of a subclass of gtk:tool-item
widgets. A toolbar is created with a call to the gtk:toolbar-new function. To add a gtk:tool-item widget to the toolbar, use the gtk:toolbar-insert function. To remove an item from the toolbar use the gtk:container-remove function. To add a button to the toolbar, add an instance of the gtk:tool-button class. ![]() Figure: GtkToolbar Toolbar items can be visually grouped by adding instances of the gtk:separator-tool-item class to the toolbar. If the expand child property is true and the draw property is set to false, the effect is to force all following items to the end of the toolbar. Creating a context menu for the toolbar can be done by connecting to the "popup-context-menu" signal. CSS nodesChild Property Detailsexpand The expand child property of type :boolean (Read / Write) Whether the item should receive extra space when the toolbar grows. Default value: false homogeneous The homogeneous child property of type :boolean (Read / Write) Whether the item should be the same size as other homogeneous items. Default value: false Style Property Detailsinternal-padding The internal-padding style property of type :int (Read) Amount of border space between the toolbar shadow and the buttons. Warning: The internal-padding style property has been deprecated since version 3.6 and should not be used in newly written code. Use the standard padding CSS property, through objects like gtk:style-context and gtk:css-provider. The value of this style property is ignored. Allowed values: >= 0 Default value: 0 max-child-expand The max-child-expand style property of type :int (Read) Maximum amount of space an expandable item will be given. Allowed values: >= 0 Default value: 2147483647 shadow-type The shadow-type style property of type gtk:shadow-type (Read) The style of bevel around the toolbar. Warning: The shadow-type style property has been deprecated since version 3.6 and should not be used in newly written code. Use the standard border CSS property, through objects like gtk:style-context and gtk:css-provider. The value of this style property is ignored. Default value: :out space-size The space-size style property of type :int (Read) Size of spacers. Warning: The space-size style property has been deprecated since version 3.20 and should not be used in newly written code. Use the standard margin/padding CSS properties on the separator elements. The value of this style property is ignored. Allowed values: >= 0 Default value: 12 space-style The space-style style property of type gtk:toolbar-space-style (Read) Whether spacers are vertical lines or just blank. Warning: The space-style style property has been deprecated since version 3.20 and should not be used in newly written code. Use CSS properties on the separator elements to style toolbar spacers. The value of this style property is ignored. Default value: :line Signal DetailsThe "focus-home-or-end" signallambda (toolbar focus-home) :action
The "orientation-changed" signallambda (toolbar orientation) :run-first
The "style-changed" signallambda (toolbar style) :run-first
| Returned bySlot Access FunctionsInherited Slot Access FunctionsSee also |
2025-07-17