Package: gtk

Class gtk-toolbar

Superclasses

Documented Subclasses

None

Direct Slots

icon-size
The "icon-size" property of type :int (Read / Write)
The size of the icons in a toolbar is normally determined by the "toolbar-icon-size" setting. When this property is set, it overrides the setting. This should only be used for special-purpose toolbars, normal application toolbars should respect the user preferences for the size of icons.
Allowed values: >= 0
Default value: 3
Since 2.10
icon-size-set
The "icon-size-set" property of type :boolean (Read / Write)
Is true if the "icon-size" property has been set.
Default value: nil
Since 2.10
show-arrow
The "show-arrow" property of type :boolean (Read / Write)
If an arrow should be shown if the toolbar does not fit.
Default value: true
toolbar-style
The "toolbar-style" property of type gtk-toolbar-style (Read / Write)
How to draw the toolbar.
Default value: :both

Details

A toolbar is created with a call to the function gtk-toolbar-new.

A toolbar can contain instances of a subclass of gtk-tool-item. To add a gtk-tool-item to the a toolbar, use the function gtk-toolbar-insert. To remove an item from the toolbar use the function gtk-container-remove. To add a button to the toolbar, add an instance of gtk-tool-button.

Toolbar items can be visually grouped by adding instances of gtk-separator-tool-item to the toolbar. If the gtk-toolbar child property "expand" is true and the property draw is set to nil, 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.

Child Property Details

The "expand" child property
"expand" of type :boolean (Read / Write)
Whether the item should receive extra space when the toolbar grows.
Default value: nil

The "homogeneous" child property
"homogeneous" of type :boolean (Read / Write)
Whether the item should be the same size as other homogeneous items.
Default value: nil

Style Property Details

The "button-relief" style property
"button-relief" of type gtk-relief-style (Read)
Type of bevel around toolbar buttons.
Default value: :none

The "internal-padding" style property
"internal-padding" of type :int (Read)
Amount of border space between the toolbar shadow and the buttons.
Allowed values: >= 0
Default value: 0

The "max-child-expand" style property
"max-child-expand" of type :int (Read)
Maximum amount of space an expandable item will be given.
Allowed values: >= 0
Default value: 2147483647

The "shadow-type" style property
"shadow-type" of type gtk-shadow-type (Read)
Style of bevel around the toolbar.
Default value: :out

The "space-size" style property
"space-size" of type :int (Read)
Size of spacers.
Allowed values: >= 0
Default value: 12

The "space-style" style property
"space-style" of type gtk-toolbar-space-style (Read)
Whether spacers are vertical lines or just blank.
Default value: :line

Signal Details

The "focus-home-or-end" signal
 lambda (toolbar focus-home)   : Action      
A keybinding signal used internally by GTK+. This signal cannot be used in application code.
toolbar
The gtk-toolbar which emitted the signal.
focus-home
True if the first item should be focused.
Returns
True if the signal was handled, nil if not.
The "orientation-changed" signal
 lambda (toolbar orientation)   : Run First      
Emitted when the orientation of the toolbar changes.
toolbar
The object which emitted the signal.
orientation
The new gtk-orientation of the toolbar.
The "popup-context-menu" signal
 lambda (toolbar x y button)   : Run Last      
Emitted when the user right-clicks the toolbar or uses the keybinding to display a popup menu. Application developers should handle this signal if they want to display a context menu on the toolbar. The context-menu should appear at the coordinates given by x and y. The mouse button number is given by the button parameter. If the menu was popped up using the keybaord, button is -1.
toolbar
The gtk-toolbar which emitted the signal.
x
The x coordinate of the point where the menu should appear.
y
The y coordinate of the point where the menu should appear.
button
The mouse button the user pressed, or -1.
Returns
Return true if the signal was handled, nil if not.
The "style-changed" signal
 lambda (toolbar style)   : Run First      
Emitted when the style of the toolbar changes.
toolbar
The gtk-toolbar which emitted the signal.
style
The new gtk-toolbar-style of the toolbar.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2014-1-26