Libraries:Gtk:Gtk:Toolbar
Types
T
Inherits from:A toolbar is created with a call to gtk_toolbar_new().
A toolbar can contain instances of a subclass of Gtk.Gtk.ToolItem.T. To add a Gtk.Gtk.ToolItem.T to the a toolbar, use Insert. To remove an item from the toolbar use Gtk.Gtk.Container.Remove. To add a button to the toolbar, add an instance of Gtk.Gtk.ToolButton.T.
Toolbar items can be visually grouped by adding instances of Gtk.Gtk.SeparatorToolItem.T to the toolbar. If a Gtk.Gtk.SeparatorToolItem.T 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.
Constants
Nil : T
Functions
GetType() : Gtk.GObject.Type.T
New() : Gtk.Gtk.Toolbar.T
Creates a new toolbar.
Returns | the newly-created toolbar. |
Methods
:AppendElement(self @ T, type @ Gtk.Gtk.ToolbarChildType.T, widget @ Gtk.Gtk.Widget.T, text @ Std.String.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, icon @ Gtk.Gtk.Widget.T, callback @ Std.Object.T, user_data) : Gtk.Gtk.Widget.T
Warning
AppendElement has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:AppendItem(self @ T, text @ Std.String.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, icon @ Gtk.Gtk.Widget.T, callback @ Std.Object.T, user_data) : Gtk.Gtk.Widget.T
Warning
AppendItem has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:AppendSpace(self @ T) : Std.Object.T
Warning
AppendSpace has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:AppendWidget(self @ T, widget @ Gtk.Gtk.Widget.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T) : Std.Object.T
Warning
AppendWidget has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:GetDropIndex(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Integer.SmallT
Returns the position corresponding to the indicated point on toolbar. This is useful when dragging items to the toolbar: this function returns the position a new item should be inserted.
x and y are in toolbar coordinates.
toolbar | a T |
x | x coordinate of a point on the toolbar |
y | y coordinate of a point on the toolbar |
Returns | The position corresponding to the point (x, y) on the toolbar. |
:GetIconSize(self @ T) : Gtk.Gtk.IconSize.T
Retrieves the icon size for the toolbar. See SetIconSize.
toolbar | a T |
Returns | the current icon size for the icons on the toolbar. [type int] |
:GetItemIndex(self @ T, item @ Gtk.Gtk.ToolItem.T) : Std.Integer.SmallT
Returns the position of item on the toolbar, starting from 0. It is an error if item is not a child of the toolbar.
toolbar | a T |
item | a Gtk.Gtk.ToolItem.T that is a child of toolbar |
Returns | the position of item on the toolbar. |
:GetNItems(self @ T) : Std.Integer.SmallT
:GetNthItem(self @ T, n @ Std.Integer.SmallT) : Gtk.Gtk.ToolItem.T
Returns the n'th item on toolbar, or NULL if the toolbar does not contain an n'th item.
toolbar | a T |
n | A position on the toolbar |
Returns | The n'th Gtk.Gtk.ToolItem.T on toolbar, or NULL if there isn't an n'th item. [transfer none] |
:GetOrientation(self @ T) : Gtk.Gtk.Orientation.T
Warning
GetOrientation has been deprecated since version 2.16 and should not be used in newly-written code. Use Gtk.Gtk.Orientable.GetOrientation instead.
:GetReliefStyle(self @ T) : Gtk.Gtk.ReliefStyle.T
Returns the relief style of buttons on toolbar. See Gtk.Gtk.Button.SetRelief.
toolbar | a T |
Returns | The relief style of buttons on toolbar. |
:GetShowArrow(self @ T) : Std.Symbol.T
Returns whether the toolbar has an overflow menu. See SetShowArrow.
toolbar | a T |
Returns | TRUE if the toolbar has an overflow menu. |
:GetStyle(self @ T) : Gtk.Gtk.ToolbarStyle.T
Retrieves whether the toolbar has text, icons, or both . See SetStyle.
toolbar | a T |
Returns | the current style of toolbar |
:GetTooltips(self @ T) : Std.Symbol.T
Warning
GetTooltips has been deprecated since version 2.14 and should not be used in newly-written code. The toolkit-wide "gtk-enable-tooltips" property is now used instead.
:GtkReserved1(self @ T) : Std.Integer.SmallT
:GtkReserved2(self @ T) : Std.Integer.SmallT
:Insert(self @ T, item @ Gtk.Gtk.ToolItem.T, pos @ Std.Integer.SmallT) : Std.Object.T
Insert a Gtk.Gtk.ToolItem.T into the toolbar at position pos. If pos is 0 the item is prepended to the start of the toolbar. If pos is negative, the item is appended to the end of the toolbar.
toolbar | a T |
item | a Gtk.Gtk.ToolItem.T |
pos | the position of the new item |
:InsertElement(self @ T, type @ Gtk.Gtk.ToolbarChildType.T, widget @ Gtk.Gtk.Widget.T, text @ Std.String.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, icon @ Gtk.Gtk.Widget.T, callback @ Std.Object.T, user_data, position @ Std.Integer.SmallT) : Gtk.Gtk.Widget.T
Warning
InsertElement has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:InsertItem(self @ T, text @ Std.String.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, icon @ Gtk.Gtk.Widget.T, callback @ Std.Object.T, user_data, position @ Std.Integer.SmallT) : Gtk.Gtk.Widget.T
Warning
InsertItem has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:InsertSpace(self @ T, position @ Std.Integer.SmallT) : Std.Object.T
Warning
InsertSpace has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:InsertStock(self @ T, stock_id @ Std.String.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, callback @ Std.Object.T, user_data, position @ Std.Integer.SmallT) : Gtk.Gtk.Widget.T
Warning
InsertStock has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:InsertWidget(self @ T, widget @ Gtk.Gtk.Widget.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, position @ Std.Integer.SmallT) : Std.Object.T
Warning
InsertWidget has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:PrependElement(self @ T, type @ Gtk.Gtk.ToolbarChildType.T, widget @ Gtk.Gtk.Widget.T, text @ Std.String.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, icon @ Gtk.Gtk.Widget.T, callback @ Std.Object.T, user_data) : Gtk.Gtk.Widget.T
Warning
PrependElement has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:PrependItem(self @ T, text @ Std.String.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T, icon @ Gtk.Gtk.Widget.T, callback @ Std.Object.T, user_data) : Gtk.Gtk.Widget.T
Warning
PrependItem has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:PrependSpace(self @ T) : Std.Object.T
Warning
PrependSpace has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:PrependWidget(self @ T, widget @ Gtk.Gtk.Widget.T, tooltip_text @ Std.String.T, tooltip_private_text @ Std.String.T) : Std.Object.T
Warning
PrependWidget has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:RemoveSpace(self @ T, position @ Std.Integer.SmallT) : Std.Object.T
Warning
RemoveSpace has been deprecated since version 2.4 and should not be used in newly-written code. Use Insert instead.
:SetDropHighlightItem(self @ T, tool_item @ Gtk.Gtk.ToolItem.T, index_ @ Std.Integer.SmallT) : Std.Object.T
Highlights toolbar to give an idea of what it would look like if item was added to toolbar at the position indicated by index_. If item is NULL, highlighting is turned off. In that case index_ is ignored.
The tool_item passed to this function 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.
toolbar | a T |
tool_item | a Gtk.Gtk.ToolItem.T, or NULL to turn of highlighting. [allow-none] |
index_ | a position on toolbar |
:SetIconSize(self @ T, icon_size @ Gtk.Gtk.IconSize.T) : Std.Object.T
This function sets the size of stock icons in the toolbar. You can call it both before you add the icons and after they've been added. The size you set will override user preferences for the default icon size.
This should only be used for special-purpose toolbars, normal application toolbars should respect the user preferences for the size of icons.
toolbar | A T |
icon_size | The Gtk.Gtk.IconSize.T that stock icons in the toolbar shall have. [type int] |
:SetOrientation(self @ T, orientation @ Gtk.Gtk.Orientation.T) : Std.Object.T
Warning
SetOrientation has been deprecated since version 2.16 and should not be used in newly-written code. Use Gtk.Gtk.Orientable.SetOrientation instead.
:SetShowArrow(self @ T, show_arrow @ Std.Symbol.T) : Std.Object.T
Sets whether to show an overflow menu when toolbar doesn't have room for all items on it. If TRUE, items that there are not room are available through an overflow menu.
toolbar | a T |
show_arrow | Whether to show an overflow menu |
:SetStyle(self @ T, style @ Gtk.Gtk.ToolbarStyle.T) : Std.Object.T
Alters the view of toolbar to display either icons only, text only, or both.
toolbar | a T. |
style | the new style for toolbar. |
:SetTooltips(self @ T, enable @ Std.Symbol.T) : Std.Object.T
Warning
SetTooltips has been deprecated since version 2.14 and should not be used in newly-written code. The toolkit-wide "gtk-enable-tooltips" property is now used instead.
:UnsetIconSize(self @ T) : Std.Object.T
Unsets toolbar icon size set with SetIconSize, so that user preferences will be used to determine the icon size.
toolbar | a T |
:UnsetStyle(self @ T) : Std.Object.T
Unsets a toolbar style set with SetStyle, so that user preferences will be used to determine the toolbar style.
toolbar | a T |