gtk.Toolbara bar holding buttons and other widgets.Synopsisgtk.Toolbargtk.Containergtk.Toolbarinsertitemposget_item_indexitemget_n_itemsget_nth_itemnget_drop_indexxyset_drop_highlight_itemtool_itemindexset_show_arrowshow_arrowget_show_arrowget_relief_styleappend_itemtexttooltip_texttooltip_private_texticoncallbackuser_dataNoneprepend_itemtexttooltip_texttooltip_private_texticoncallbackuser_datainsert_itemtexttooltip_texttooltip_private_texticoncallbackuser_datapositioninsert_stockstock_idtooltip_texttooltip_private_textcallbackuser_datapositionappend_spaceprepend_spaceinsert_spacepositionremove_spacepositionappend_elementtypewidgettexttooltip_texttooltip_private_texticoncallbackuser_dataprepend_elementtypewidgettexttooltip_texttooltip_private_texticoncallbackuser_datainsert_elementtypewidgettexttooltip_texttooltip_private_texticoncallbackuser_datapositionappend_widgetwidgettooltip_texttooltip_private_textprepend_widgetwidgettooltip_texttooltip_private_textinsert_widgetwidgettooltip_texttooltip_private_textpositionset_orientationorientationset_stylestyleset_icon_sizeicon_sizeset_tooltipsenableunset_styleunset_icon_sizeget_orientationget_styleget_icon_sizeget_tooltipsAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Toolbar
Implemented Interfacesgtk.Toolbar
implements
gtk.Buildablegtk.Toolbar Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Properties
"icon-size"Read-WriteThe 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. This property
is available in GTK+ 2.10 and above."icon-size-set"Read-Writeif True the icon-size property has
been set. This property is available in GTK+ 2.10 and
above."orientation"Read-WriteThe orientation of the toolbar:
gtk.ORIENTATION_HORIZONTAL or
gtk.ORIENTATION_VERTICAL"show-arrow"Read-WriteIf True an arrow should be shown
if the toolbar doesn't fit. Available in GTK+ 2.4 and above."toolbar-style"Read-WriteThe toolbar style:
gtk.TOOLBAR_ICONS, gtk.TOOLBAR_TEXT,
gtk.TOOLBAR_BOTH or
gtk.TOOLBAR_BOTH_HORIZ"tooltips"Read-WriteIf the tooltips of the toolbar should be active or not.
This property is available in GTK+ 2.8 and above.
"button-relief"ReadThe type of bevel around toolbar buttons:
gtk.RELIEF_NORMAL, gtk.RELIEF_HALF or
gtk.RELIEF_NONE"internal-padding"ReadThe amount of border space between the toolbar shadow
and the buttons"max-child-expand"ReadMaximum amount of space an expandable item will be given"shadow-type"ReadThe style of bevel around the toolbar:
gtk.SHADOW_NONE, gtk.SHADOW_IN,
gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN
or gtk.SHADOW_ETCHED_OUT"space-size"ReadThe size of spacers"space-style"ReadThe spacer style:
gtk.TOOLBAR_SPACE_EMPTY or
gtk.TOOLBAR_SPACE_LINE
gtk.Toolbar Child Properties
"expand"Read-WriteIf True, the item should receive
extra space when the toolbar grows. Available in GTK+ 2.4 and above."homogeneous"Read-WriteIf True, the item should be the
same size as other homogeneous items. Available in GTK+ 2.4 and above.
gtk.Toolbar Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypes"focus-home-or-endcallbacktoolbarfocus_homeuser_param1..."move-focuscallbacktoolbardiruser_param1..."orientation-changed"callbacktoolbarorientationuser_param1..."popup-context-menu"callbacktoolbarxybuttonuser_param1..."style-changed"callbacktoolbarstyleuser_param1...DescriptionA gtk.Toolbar is a
subclass of gtk.Container
that holds and manages a set of buttons and widgets in a horizontal or
vertical bar. A gtk.Toolbar is
usually used in an application as an alternative to a menu to provide a more
direct means to activate dialogs or set options. Items in the toolbar can be
visibly grouped by adding space between the elements. The toolbar style can
be set to display only icons, only text or both icons and text. Each toolbar
item has an associated gtk.Tooltips to
provide a brief description of the items purpose.In PyGTK 2.4 the interface of the gtk.Toolbar has
changed to take advantage of the new gtk.ToolItem
widgets. The following describes the new features.A toolbar can contain instances of a subclass of gtk.ToolItem
(gtk.ToolButton,
gtk.RadioToolButton,
gtk.ToggleToolButton
and gtk.SeparatorToolItem). To
add a gtk.ToolItem to
the a toolbar, use the insert()
method. To remove an item from the toolbar use the gtk.Container.remove()
method. To add a button to the toolbar, add an instance of gtk.ToolButton. Toolbar
items can be visually grouped by adding instances of gtk.SeparatorToolItem
to the toolbar. If a gtk.SeparatorToolItem
has the "expand" property set to True and the "draw"
property 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.Constructorgtk.ToolbarReturns :a new gtk.Toolbar
widgetCreates a new gtk.Toolbar
widget.Methodsgtk.Toolbar.insertinsertitempositem :a gtk.ToolItempos :the position of the new itemThis method is available in PyGTK 2.4 and aboveThe insert() method inserts the gtk.ToolItem
specified by item into the toolbar at the position
specified by pos. If pos is 0
item is prepended to the start of the toolbar. If
pos is negative, item is
appended to the end of the toolbar.gtk.Toolbar.get_item_indexget_item_indexitemitem :a gtk.ToolItem
that is a child of the toolbarReturns :the position of item on the
toolbar.This method is available in PyGTK 2.4 and aboveThe get_item_index() method returns the
position (starting from 0) on the toolbar of the gtk.ToolItem
specified by item. It is an error
if item is not a child of the toolbar.gtk.Toolbar.get_n_itemsget_n_itemsReturns :the number of items on the
toolbarThis method is available in PyGTK 2.4 and aboveThe get_n_items() method returns the
number of items on the toolbar.gtk.Toolbar.get_nth_itemget_nth_itemnn :a position on the toolbarReturns :The gtk.ToolItem
on the toolbar at position n, or
None if there isn't an item at position
nThis method is available in PyGTK 2.4 and aboveThe get_nth_item() method returns the
toolbar gtk.ToolItem at
the position specified by n, or
None if the toolbar does not contain an item at position
n.gtk.Toolbar.get_drop_indexget_drop_indexxyx :the x coordinate of a point on the
toolbary :the y coordinate of a point on the
toolbarReturns :The toolbar position corresponding to the point
(x,
y).This method is available in PyGTK 2.4 and aboveThe get_drop_index() method returns the
position on the toolbar corresponding to the point specified by
x and y. This is useful when
dragging items to the toolbar. This method returns the position index where
a new item should be inserted.The x and y
coordinates are relative to the toolbar.gtk.Toolbar.set_drop_highlight_itemset_drop_highlight_itemtool_itemindextool_item :a gtk.ToolItem,
or None to turn off
highlightingindex :a position index on the toolbarThis method is available in PyGTK 2.4 and aboveThe set_drop_highlight_item() method
highlights the toolbar to give an idea of what it would look like if the
gtk.ToolItem
specified by tool_item was added at the position
specified by index. If
tool_item is None, highlighting is
turned off and index is ignored.The tool_item passed to this method must
not be part of any widget hierarchy. When an item is set as drop highlight
item it can not added to any widget hierarchy or used as highlight item for
another toolbar.gtk.Toolbar.set_show_arrowset_show_arrowshow_arrowshow_arrow :if True, show an arrow to
indicate menu overflowThis method is available in PyGTK 2.4 and aboveThe set_show_arrow() method sets the
"show-arrow" property to the value of show_arrow. If
show_arrow is True an arrow is
displayed (for an overflow menu) when the toolbar doesn't have room for all
items on it. Items that are not displayed due to a lack of room are
available through the overflow menu.gtk.Toolbar.get_show_arrowget_show_arrowReturns :True if an overflow menu can
be usedThis method is available in PyGTK 2.4 and aboveThe get_show_arrow() method returns the
value of the "show-arrow" property. If "show-arrow" is
True the toolbar has an overflow menu. See the set_show_arrow()
method for more information.gtk.Toolbar.get_relief_styleget_relief_styleReturns :the relief style of buttons on the
toolbarThis method is available in PyGTK 2.4 and aboveThe get_relief_style() method returns
the relief style of buttons on the toolbar. See the gtk.Button.set_relief()
method for more information. The return value will be one of:gtk.RELIEF_NORMALgtk.RELIEF_HALFgtk.RELIEF_NONEgtk.Toolbar.append_itemappend_itemtexttooltip_texttooltip_private_texticoncallbackuser_dataNonetext :the text label or
Nonetooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Noneicon :a gtk.Widget or
Nonecallback :a callback function or method or
Noneuser_data :a user data object or
NoneReturns :a gtk.Button
widgetThis method is deprecated in PyGTK 2.4 and aboveThe append_item() method adds a new
gtk.Button to
the end (right or bottom) of the toolbar with:the label specified by
text,the gtk.Tooltips text
and private text specified by tooltip_text and
tooltip_private_text respectively andan icon (or any gtk.Widget)
specified by icon.A reference to the new button is returned. When the button is
clicked the function or method specified by callback
will be called with the user data specified by
user_data. All or any of the arguments can have the
value None.gtk.Toolbar.prepend_itemprepend_itemtexttooltip_texttooltip_private_texticoncallbackuser_datatext :the text label or
Nonetooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Noneicon :a gtk.Widget or
Nonecallback :a callback function or method or
Noneuser_data :a user data object or
NoneReturns :a gtk.Button
widgetThis method is deprecated in PyGTK 2.4 and aboveThe prepend_item() method adds a new
gtk.Button to
the beginning (left or top) of the toolbar with:the label specified by
text,the gtk.Tooltips text
and private text specified by tooltip_text and
tooltip_private_text respectively andan icon (or any gtk.Widget)
specified by icon.A reference to the new button is returned. When the button is
clicked the function or method specified by callback
will be called with the user data specified by
user_data. All or any of the arguments can have the
value None.gtk.Toolbar.insert_iteminsert_itemtexttooltip_texttooltip_private_texticoncallbackuser_datapositiontext :the text label or
Nonetooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Noneicon :a gtk.Widget or
Nonecallback :a callback function or method or
Noneuser_data :a user data object or
Noneposition :The position to insert the button or -1 to
appendReturns :a gtk.Button
widgetThis method is deprecated in PyGTK 2.4 and aboveThe insert_item() method inserts a new
gtk.Button the
toolbar at the position specified by position
with:the label specified by
text,the gtk.Tooltips text
and private text specified by tooltip_text and
tooltip_private_text respectively andan icon (or any gtk.Widget)
specified by icon.A reference to the new button is returned. When the button is
clicked the function or method specified by callback
will be called with the user data specified by
user_data. All or any of the arguments (except
position) can have the value
None. If position is negative
the button will be appended to the toolbar.gtk.Toolbar.insert_stockinsert_stockstock_idtooltip_texttooltip_private_textcallbackuser_datapositionstock_id :the ID of the stock item to use as the button
label and icontooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Nonecallback :a callback function or method or
Noneuser_data :a user data object or
Noneposition :The position to insert the button or -1 to
appendReturns :a gtk.Button
widgetThis method is deprecated in PyGTK 2.4 and aboveThe insert_stock() method inserts a new
gtk.Button the
toolbar at the position specified by position
with:the stock item specified by
stock_id used for the label text and icon,the gtk.Tooltips text
and private text specified by tooltip_text and
tooltip_private_text respectively.A reference to the new button is returned. When the button is
clicked the function or method specified by callback
will be called with the user data specified by
user_data. All or any of the arguments (except
position) can have the value
None. If position is negative
the button will be appended to the toolbar. If
stock_id is not a known stock item ID, it's inserted
verbatim, except that underscores are used to mark mnemonic
accelerators.gtk.Toolbar.append_spaceappend_spaceThis method is deprecated in PyGTK 2.4 and aboveThe append_space() method appends a
space to the end of the toolbar.gtk.Toolbar.prepend_spaceprepend_spaceThis method is deprecated in PyGTK 2.4 and aboveThe prepend_space() method prepends a
space to the beginning of the toolbar.gtk.Toolbar.insert_spaceinsert_spacepositionposition :The position to insert the space or -1 to
appendThis method is deprecated in PyGTK 2.4 and aboveThe insert_space() method inserts a
space at the specified position in the
toolbar.gtk.Toolbar.remove_spaceremove_spacepositionposition :the index of the space to
remove.This method is deprecated in PyGTK 2.4 and aboveThe remove_space() method removes a
space from the specified position.gtk.Toolbar.append_elementappend_elementtypewidgettexttooltip_texttooltip_private_texticoncallbackuser_datatype :the type of widget - one
of: gtk.TOOLBAR_CHILD_SPACE,
gtk.TOOLBAR_CHILD_BUTTON,
gtk.TOOLBAR_CHILD_TOGGLEBUTTON,
gtk.TOOLBAR_CHILD_RADIOBUTTON or
gtk.TOOLBAR_CHILD_WIDGETwidget :a widget or
Nonetext :the text label or
Nonetooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Noneicon :a gtk.Widget or
Nonecallback :a callback function or method or
Noneuser_data :a user data object or
NoneReturns :the new toolbar element as a gtk.Widget.This method is deprecated in PyGTK 2.4 and aboveThe append_element() method adds a new
element of the specified type to the end (right or
bottom) of the toolbar with the gtk.Tooltips text
and private text specified by tooltip_text and
tooltip_private_text respectively. The behavior of
the method depends on the type of element being added:gtk.TOOLBAR_CHILD_WIDGETThe specified widget is the
element added to the toolbar. The text,
icon, callback and
user_data arguments are ignored.gtk.TOOLBAR_CHILD_BUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.Button to
add to the toolbar. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal. The widget argument must have the value
None.gtk.TOOLBAR_CHILD_TOGGLEBUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.ToggleButton
to add to the toolbar. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal. The widget argument must have the value
None.gtk.TOOLBAR_CHILD_RADIOBUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.RadioButton
to add to the toolbar. The gtk.RadioButton
specified by widget is used to set the group for the
radiobutton. If widget is None a
new radiobutton group is created. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal.gtk.TOOLBAR_CHILD_SPACEA space element is added to the toolbar. The
widget argument must have the value
None. The text,
icon, tooltip_text,
tooltip_private_text, callback
and user_data arguments are ignored.The text, icon,
callback, user_data,
tooltip_text and
tooltip_private_text arguments may have the value
None.gtk.Toolbar.prepend_elementprepend_elementtypewidgettexttooltip_texttooltip_private_texticoncallbackuser_datatype :the type of widget - one
of: gtk.TOOLBAR_CHILD_SPACE,
gtk.TOOLBAR_CHILD_BUTTON,
gtk.TOOLBAR_CHILD_TOGGLEBUTTON,
gtk.TOOLBAR_CHILD_RADIOBUTTON or
gtk.TOOLBAR_CHILD_WIDGETwidget :a widget or
Nonetext :the text label or
Nonetooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Noneicon :a gtk.Widget or
Nonecallback :a callback function or method or
Noneuser_data :a user data object or
NoneReturns :the new toolbar element as a gtk.Widget.This method is deprecated in PyGTK 2.4 and aboveThe prepend_element() method adds a new
element of the specified type to the beginning (left
or top) of the toolbar with the gtk.Tooltips text
and private text specified by tooltip_text and
tooltip_private_text respectively. The behavior of
the method depends on the type of element being added:gtk.TOOLBAR_CHILD_WIDGETThe widget specified by widget
is the element added to the toolbar, otherwise widget
should be None. The text,
icon, callback and
user_data arguments are ignored.gtk.TOOLBAR_CHILD_BUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.Button to
add to the toolbar. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal. The widget argument must have the value
None.gtk.TOOLBAR_CHILD_TOGGLEBUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.ToggleButton
to add to the toolbar. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal. The widget argument must have the value
None.gtk.TOOLBAR_CHILD_RADIOBUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.RadioButton
to add to the toolbar. The gtk.RadioButton
specified by widget is used to set the group for the
radiobutton. If widget is None a
new radiobutton group is created. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal.gtk.TOOLBAR_CHILD_SPACEA space element is added to the toolbar. The
widget argument must have the value
None. The text,
icon, tooltip_text,
tooltip_private_text, callback
and user_data arguments are ignored.The text, icon,
callback, user_data,
tooltip_text and
tooltip_private_text arguments may have the value
None.gtk.Toolbar.insert_elementinsert_elementtypewidgettexttooltip_texttooltip_private_texticoncallbackuser_datapositiontype :the type of widget - one
of: gtk.TOOLBAR_CHILD_SPACE,
gtk.TOOLBAR_CHILD_BUTTON,
gtk.TOOLBAR_CHILD_TOGGLEBUTTON,
gtk.TOOLBAR_CHILD_RADIOBUTTON or
gtk.TOOLBAR_CHILD_WIDGETwidget :a widget or
Nonetext :the text label or
Nonetooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Noneicon :a gtk.Widget or
Nonecallback :a callback function or method or
Noneuser_data :a user data object or
Noneposition :the position to insert the new element
at.Returns :the new toolbar element as a gtk.Widget.This method is deprecated in PyGTK 2.4 and aboveThe insert_element() method adds a new
element of the specified type at the specified
position in the toolbar with the gtk.Tooltips text
and private text specified by tooltip_text and
tooltip_private_text respectively. The behavior of
the method depends on the type of element being added:gtk.TOOLBAR_CHILD_WIDGETThe widget specified by widget
is the element added to the toolbar, otherwise widget
should be None. The text,
icon, callback and
user_data arguments are ignored.gtk.TOOLBAR_CHILD_BUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.Button to
add to the toolbar. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal. The widget argument must have the value
None.gtk.TOOLBAR_CHILD_TOGGLEBUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.ToggleButton
to add to the toolbar. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal. The widget argument must have the value
None.gtk.TOOLBAR_CHILD_RADIOBUTTONThe string specified by text and
the gtk.Widget
specified by icon are used to create the label for a
gtk.RadioButton
to add to the toolbar. The gtk.RadioButton
specified by widget is used to set the group for the
radiobutton. If widget is None a
new radiobutton group is created. The function or method specified by
callback and the object specified by
user_data are connected to the button's "clicked"
signal.gtk.TOOLBAR_CHILD_SPACEA space element is added to the toolbar. The
widget argument must have the value
None. The text,
icon, tooltip_text,
tooltip_private_text, callback
and user_data arguments are ignored.The text, icon,
callback, user_data,
tooltip_text and
tooltip_private_text arguments may have the value
None.gtk.Toolbar.append_widgetappend_widgetwidgettooltip_texttooltip_private_textwidget :a gtk.Widget to add to
the toolbar.tooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
NoneThis method is deprecated in PyGTK 2.4 and aboveThe append_widget() method adds the
specified widget to the end (right or bottom) of the
toolbar. tooltip_text and
tooltip_private_text specify the tooltip text and
private text respectively.gtk.Toolbar.prepend_widgetprepend_widgetwidgettooltip_texttooltip_private_textwidget :a gtk.Widget to add to
the toolbar.tooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
NoneThis method is deprecated in PyGTK 2.4 and aboveThe prepend_widget() method adds the
specified widget to the start (left or top) of the
toolbar. tooltip_text and
tooltip_private_text specify the tooltip text and
private text respectively.gtk.Toolbar.insert_widgetinsert_widgetwidgettooltip_texttooltip_private_textpositionwidget :a gtk.Widget to add to
the toolbar.tooltip_text :the tooltip text or
Nonetooltip_private_text :the private tooltip text or
Noneposition :the position to insert this widget
at.This method is deprecated in PyGTK 2.4 and aboveThe insert_widget() method adds the
specified widget at the specified
position in the toolbar.
tooltip_text and
tooltip_private_text specify the tooltip text and
private text respectively.gtk.Toolbar.set_orientationset_orientationorientationorientation :the new orientation either
gtk.ORIENTATION_HORIZONTAL or
gtk.ORIENTATION_VERTICALThe set_orientation() method sets the
"orientation" property to the value of orientation.
The value of orientation is either
gtk.ORIENTATION_HORIZONTAL or
gtk.ORIENTATION_VERTICALgtk.Toolbar.set_styleset_stylestylestyle :the new style - one of:
gtk.TOOLBAR_ICONS, gtk.TOOLBAR_TEXT,
gtk.TOOLBAR_BOTH or
gtk.TOOLBAR_BOTH_HORIZThe set_style() method sets the
"toolbar-style" property to the value of style. The
value of style must be one of the . Setting the style
overrides the user preferences for the toolbar style.A gtk.ToolItem label
will not be displayed if the toolbar style is
gtk.TOOLBAR_BOTH_HORIZ and the gtk.ToolItem
"is-important" property is False (the default). See the
gtk.ToolItem.set_is_important()
method for more information.gtk.Toolbar.set_icon_sizeset_icon_sizeicon_sizeicon_size :The size of stock icons in the toolbar - one
of: gtk.ICON_SIZE_MENU,
gtk.ICON_SIZE_SMALL_TOOLBAR,
gtk.ICON_SIZE_LARGE_TOOLBAR,
gtk.ICON_SIZE_BUTTON,
gtk.ICON_SIZE_DND or
gtk.ICON_SIZE_DIALOGThe set_icon_size() method sets the
size of stock icons in the toolbar to the value specified by
icon_size. The value of
icon_size must be one of:gtk.ICON_SIZE_MENUgtk.ICON_SIZE_SMALL_TOOLBARgtk.ICON_SIZE_LARGE_TOOLBARgtk.ICON_SIZE_BUTTONgtk.ICON_SIZE_DND, orgtk.ICON_SIZE_DIALOGThis method can be called both before and after adding the
icons. Setting the icon size will override the user preferences for the
default icon size.gtk.Toolbar.set_tooltipsset_tooltipsenableenable :if True tooltips should be
usedThe set_tooltips() method enables or
disables tooltips for the toolbar depending on the value of
enable. If enable is
True, tooltips will be used.gtk.Toolbar.unset_styleunset_styleThe unset_style() method unsets a
toolbar style set with the set_style()
method, allowing the user preferences to determine the toolbar style.gtk.Toolbar.unset_icon_sizeunset_icon_sizeThe unset_icon_size() method unsets
toolbar icon size set with the set_icon_size(),
allowing the user preferences to determine the icon size.gtk.Toolbar.get_orientationget_orientationReturns :the orientationThe get_orientation() method returns
the value of the "orientation" property that determines the current
orientation of the toolbar. See the set_orientation()
method for more details.gtk.Toolbar.get_styleget_styleReturns :the current toolbar styleThe get_style() method returns the
value of the "toolbar-style" property. See the set_style()
method for more details.gtk.Toolbar.get_icon_sizeget_icon_sizeReturns :the current icon size for the icons on the
toolbar.The get_icon_size() method returns the
current icon size for the toolbar. See the set_icon_size()
method for more details.gtk.Toolbar.get_tooltipsget_tooltipsReturns :True if tooltips are
enabledThe get_tooltips() method returns
True if tooltips are enabled. See the set_tooltips()
method for more details.SignalsThe "focus-home-or-end" gtk.Toolbar Signalcallbacktoolbarfocus_homeuser_param1...toolbar :the gtk.Toolbar which emitted the signal
the object which received the signal.focus_home :True if the first item
should be focuseduser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if any)Returns :True if the signal was
handled, False if notA keybinding signal used internally by GTK+. This signal can't
be used in application codeThe "move-focus" gtk.Toolbar Signalcallbacktoolbardirarg1user_param1...toolbar :the gtk.Toolbar
which emitted the signal the object which received the
signal.dir :one of the user_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if any)Returns :True if the signal was
handled, False if notA keybinding signal used internally by GTK+. This signal can't
be used in application code.The "orientation-changed" gtk.Toolbar Signalcallbacktoolbarorientationuser_param1...toolbar :the toolbar that received the
signalorientation :the new orientationuser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "orientation-changed" signal is emitted when the
orientation of toolbar is
changed.The "popup-context-menu" gtk.Toolbar Signalcallbacktoolbarxybuttonuser_param1...toolbar :the toolbar that received the
signalx :the x coordinate of the mouse
eventy :the u coordinate of the mouse
eventbutton :the number of the mouse buttonuser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)Returns :True if the signal was
handledThis signal is available in GTK+ 2.4 and above.The "popup-context-menu" signal is 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
keyboard, button is -1.The "style-changed" gtk.Toolbar Signalcallbacktoolbarstyleuser_param1...toolbar :the toolbar that received the
signalstyle :the new styleuser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "style-changed" signal is emitted when the
style of toolbar is
changed.