Learn R Programming

RGtk2 (version 2.20.31)

GtkToolbar: GtkToolbar

Description

Create bars of buttons and other widgets

Arguments

Methods and Functions

gtkToolbarNew(show = TRUE) gtkToolbarInsert(object, item, pos) gtkToolbarGetItemIndex(object, item) gtkToolbarGetNItems(object) gtkToolbarGetNthItem(object, n) gtkToolbarGetDropIndex(object, x, y) gtkToolbarSetDropHighlightItem(object, tool.item = NULL, index) gtkToolbarSetShowArrow(object, show.arrow) gtkToolbarSetOrientation(object, orientation) gtkToolbarSetTooltips(object, enable) gtkToolbarUnsetIconSize(object) gtkToolbarGetShowArrow(object) gtkToolbarGetOrientation(object) gtkToolbarGetStyle(object) gtkToolbarGetIconSize(object) gtkToolbarGetTooltips(object) gtkToolbarGetReliefStyle(object) gtkToolbarAppendItem(object, text, tooltip.text, tooltip.private.text, icon, callback, user.data = NULL) gtkToolbarPrependItem(object, text, tooltip.text, tooltip.private.text, icon, callback, user.data) gtkToolbarInsertItem(object, text, tooltip.text, tooltip.private.text, icon, callback, user.data, position) gtkToolbarAppendSpace(object) gtkToolbarPrependSpace(object) gtkToolbarInsertSpace(object, position) gtkToolbarAppendElement(object, type, widget, text, tooltip.text, tooltip.private.text, icon, callback, user.data = NULL) gtkToolbarPrependElement(object, type, widget, text, tooltip.text, tooltip.private.text, icon, callback, user.data = NULL) gtkToolbarInsertElement(object, type, widget, text, tooltip.text, tooltip.private.text, icon, callback, user.data = NULL, position) gtkToolbarAppendWidget(object, widget, tooltip.text = NULL, tooltip.private.text = NULL) gtkToolbarPrependWidget(object, widget, tooltip.text = NULL, tooltip.private.text = NULL) gtkToolbarInsertWidget(object, widget, tooltip.text = NULL, tooltip.private.text = NULL, position) gtkToolbarSetStyle(object, style) gtkToolbarInsertStock(object, stock.id, tooltip.text, tooltip.private.text, callback, user.data, position) gtkToolbarSetIconSize(object, icon.size) gtkToolbarRemoveSpace(object, position) gtkToolbarUnsetStyle(object) gtkToolbar(show = TRUE)

Hierarchy

GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkToolbar

Interfaces

GtkToolbar implements AtkImplementorIface, GtkBuildable, GtkToolShell and GtkOrientable.

Detailed Description

A toolbar is created with a call to gtkToolbarNew. A toolbar can contain instances of a subclass of GtkToolItem. To add a GtkToolItem to the a toolbar, use gtkToolbarInsert. To remove an item from the toolbar use gtkContainerRemove. To add a button to the toolbar, add an instance of GtkToolButton. Toolbar items can be visually grouped by adding instances of GtkSeparatorToolItem to the toolbar. If a GtkSeparatorToolItem 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.

Structures

Convenient Construction

gtkToolbar is the equivalent of gtkToolbarNew.

Enums and Flags

GtkToolbarChildType
WARNING: GtkToolbarChildType is deprecated and should not be used in newly-written code. GtkToolbarChildType is used to set the type of new elements that are added to a GtkToolbar.
space
a space in the style of the toolbar's GtkToolbarSpaceStyle.
button
a GtkButton.
togglebutton
a GtkToggleButton.
radiobutton
a GtkRadioButton.
widget
a standard GtkWidget.
GtkToolbarSpaceStyle
undocumented
empty
undocumented
line
undocumented

Signals

focus-home-or-end(toolbar, focus.home, user.data)
A keybinding signal used internally by GTK+. This signal can't be used in application code
toolbar
the GtkToolbar which emitted the signal
focus.home
TRUE if the first item should be focused
user.data
user data set when the signal handler was connected.
Returns: [logical] TRUE if the signal was handled, FALSE if not
orientation-changed(toolbar, orientation, user.data)
Emitted when the orientation of the toolbar changes.
toolbar
the object which emitted the signal
orientation
the new GtkOrientation of the toolbar
user.data
user data set when the signal handler was connected.
popup-context-menu(toolbar, x, y, button, user.data)
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 GtkToolbar 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
user.data
user data set when the signal handler was connected.
Returns: [logical] return TRUE if the signal was handled, FALSE if not
style-changed(toolbar, style, user.data)
Emitted when the style of the toolbar changes.
toolbar
The GtkToolbar which emitted the signal
style
the new GtkToolbarStyle of the toolbar
user.data
user data set when the signal handler was connected.

Properties

icon-size [integer : 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 [logical : Read / Write]
Is TRUE if the icon-size property has been set. Default value: FALSE Since 2.10
show-arrow [logical : Read / Write]
If an arrow should be shown if the toolbar doesn't fit. Default value: TRUE
toolbar-style [GtkToolbarStyle : Read / Write]
How to draw the toolbar. Default value: GTK_TOOLBAR_BOTH
tooltips [logical : Read / Write]
If the tooltips of the toolbar should be active or not. Default value: TRUE Since 2.8

Style Properties

button-relief [GtkReliefStyle : Read]
Type of bevel around toolbar buttons. Default value: GTK_RELIEF_NONE
internal-padding [integer : Read]
Amount of border space between the toolbar shadow and the buttons. Allowed values: >= 0 Default value: 0
max-child-expand [integer : Read]
Maximum amount of space an expandable item will be given. Allowed values: >= 0 Default value: 2147483647
shadow-type [GtkShadowType : Read]
Style of bevel around the toolbar. Default value: GTK_SHADOW_OUT
space-size [integer : Read]
Size of spacers. Allowed values: >= 0 Default value: 12
space-style [GtkToolbarSpaceStyle : Read]
Whether spacers are vertical lines or just blank. Default value: GTK_TOOLBAR_SPACE_LINE

References

http://library.gnome.org/devel//gtk/GtkToolbar.html