package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Toolbar_Record, Gtk_Toolbar);
package Implements_Gtk_Orientable is new Glib.Types.Implements (Gtk.Orientable.Gtk_Orientable, Gtk_Toolbar_Record, Gtk_Toolbar);
package Implements_Gtk_Tool_Shell is new Glib.Types.Implements (Gtk.Tool_Shell.Gtk_Tool_Shell, Gtk_Toolbar_Record, Gtk_Toolbar);
type Gtk_Toolbar_Record is new Gtk_Container_Record with null record;
type Gtk_Toolbar is access all Gtk_Toolbar_Record'Class;
type Cb_Gtk_Toolbar_Boolean_Boolean is not null access function (Self : access Gtk_Toolbar_Record'Class; Focus_Home : Boolean) return Boolean;
type Cb_GObject_Boolean_Boolean is not null access function (Self : access Glib.Object.GObject_Record'Class; Focus_Home : Boolean) return Boolean;
type Cb_Gtk_Toolbar_Gtk_Orientation_Void is not null access procedure (Self : access Gtk_Toolbar_Record'Class; Orientation : Gtk.Enums.Gtk_Orientation);
type Cb_GObject_Gtk_Orientation_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class; Orientation : Gtk.Enums.Gtk_Orientation);
type Cb_Gtk_Toolbar_Gint_Gint_Gint_Boolean is not null access function (Self : access Gtk_Toolbar_Record'Class; X : Gint; Y : Gint; Button : Gint) return Boolean;
type Cb_GObject_Gint_Gint_Gint_Boolean is not null access function (Self : access Glib.Object.GObject_Record'Class; X : Gint; Y : Gint; Button : Gint) return Boolean;
type Cb_Gtk_Toolbar_Gtk_Toolbar_Style_Void is not null access procedure (Self : access Gtk_Toolbar_Record'Class; Style : Gtk.Enums.Gtk_Toolbar_Style);
type Cb_GObject_Gtk_Toolbar_Style_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class; Style : Gtk.Enums.Gtk_Toolbar_Style);
Icon_Size_Property : constant Glib.Properties.Property_Int;
Icon_Size_Set_Property : constant Glib.Properties.Property_Boolean;
Show_Arrow_Property : constant Glib.Properties.Property_Boolean;
Toolbar_Style_Property : constant Gtk.Enums.Property_Gtk_Toolbar_Style;
Signal_Focus_Home_Or_End : constant Glib.Signal_Name := "focus-home-or-end";
Signal_Orientation_Changed : constant Glib.Signal_Name := "orientation-changed";
Signal_Popup_Context_Menu : constant Glib.Signal_Name := "popup-context-menu";
Signal_Style_Changed : constant Glib.Signal_Name := "style-changed";
procedure Gtk_New
( | Toolbar | : out Gtk_Toolbar); |
procedure Initialize
( | Toolbar | : not null access Gtk_Toolbar_Record'Class); |
function Get_Type return Glib.GType;
function Get_Drop_Index
( | Toolbar | : not null access Gtk_Toolbar_Record; |
X | : Gint; | |
Y | : Gint) return Gint; |
function Get_Icon_Size
( | Toolbar | : not null access Gtk_Toolbar_Record) return Gtk.Enums.Gtk_Icon_Size; |
procedure Set_Icon_Size
( | Toolbar | : not null access Gtk_Toolbar_Record; |
Icon_Size | : Gtk.Enums.Gtk_Icon_Size); |
function Get_Item_Index
( | Toolbar | : not null access Gtk_Toolbar_Record; |
Item | : not null access Gtk.Tool_Item.Gtk_Tool_Item_Record'Class) return Gint; |
function Get_N_Items
( | Toolbar | : not null access Gtk_Toolbar_Record) return Gint; |
function Get_Nth_Item
( | Toolbar | : not null access Gtk_Toolbar_Record; |
N | : Gint) return Gtk.Tool_Item.Gtk_Tool_Item; |
function Get_Relief_Style
( | Toolbar | : not null access Gtk_Toolbar_Record) return Gtk.Enums.Gtk_Relief_Style; |
function Get_Show_Arrow
( | Toolbar | : not null access Gtk_Toolbar_Record) return Boolean; |
procedure Set_Show_Arrow
( | Toolbar | : not null access Gtk_Toolbar_Record; |
Show_Arrow | : Boolean := True); |
function Get_Style
( | Toolbar | : not null access Gtk_Toolbar_Record) return Gtk.Enums.Gtk_Toolbar_Style; |
procedure Set_Style
( | Toolbar | : not null access Gtk_Toolbar_Record; |
Style | : Gtk.Enums.Gtk_Toolbar_Style); |
procedure Insert
( | Toolbar | : not null access Gtk_Toolbar_Record; |
Item | : not null access Gtk.Tool_Item.Gtk_Tool_Item_Record'Class; | |
Pos | : Gint := -1); |
procedure Set_Drop_Highlight_Item
( | Toolbar | : not null access Gtk_Toolbar_Record; |
Tool_Item | : access Gtk.Tool_Item.Gtk_Tool_Item_Record'Class; | |
Index | : Gint); |
procedure Unset_Icon_Size
( | Toolbar | : not null access Gtk_Toolbar_Record); |
procedure Unset_Style
( | Toolbar | : not null access Gtk_Toolbar_Record); |
function Get_Orientation
( | Self | : not null access Gtk_Toolbar_Record) return Gtk.Enums.Gtk_Orientation; |
procedure Set_Orientation
( | Self | : not null access Gtk_Toolbar_Record; |
Orientation | : Gtk.Enums.Gtk_Orientation); |
function Get_Ellipsize_Mode
( | Self | : not null access Gtk_Toolbar_Record) return Pango.Layout.Pango_Ellipsize_Mode; |
function Get_Text_Alignment
( | Self | : not null access Gtk_Toolbar_Record) return Gfloat; |
function Get_Text_Orientation
( | Self | : not null access Gtk_Toolbar_Record) return Gtk.Enums.Gtk_Orientation; |
function Get_Text_Size_Group
( | Self | : not null access Gtk_Toolbar_Record) return Gtk.Size_Group.Gtk_Size_Group; |
procedure Rebuild_Menu
( | Self | : not null access Gtk_Toolbar_Record); |
procedure On_Focus_Home_Or_End
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_Gtk_Toolbar_Boolean_Boolean; | |
After | : Boolean := False); |
procedure On_Focus_Home_Or_End
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_GObject_Boolean_Boolean; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Orientation_Changed
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_Gtk_Toolbar_Gtk_Orientation_Void; | |
After | : Boolean := False); |
procedure On_Orientation_Changed
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_GObject_Gtk_Orientation_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Popup_Context_Menu
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_Gtk_Toolbar_Gint_Gint_Gint_Boolean; | |
After | : Boolean := False); |
procedure On_Popup_Context_Menu
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_GObject_Gint_Gint_Gint_Boolean; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Style_Changed
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_Gtk_Toolbar_Gtk_Toolbar_Style_Void; | |
After | : Boolean := False); |
procedure On_Style_Changed
( | Self | : not null access Gtk_Toolbar_Record; |
Call | : Cb_GObject_Gtk_Toolbar_Style_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Toolbar_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Toolbar renames Implements_Gtk_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Toolbar_Record'Class) return Gtk.Orientable.Gtk_Orientable renames Implements_Gtk_Orientable.To_Interface; |
function "-"
( | Interf | : Gtk.Orientable.Gtk_Orientable) return Gtk_Toolbar renames Implements_Gtk_Orientable.To_Object; |
function "+"
( | Widget | : access Gtk_Toolbar_Record'Class) return Gtk.Tool_Shell.Gtk_Tool_Shell renames Implements_Gtk_Tool_Shell.To_Interface; |
function "-"
( | Interf | : Gtk.Tool_Shell.Gtk_Tool_Shell) return Gtk_Toolbar renames Implements_Gtk_Tool_Shell.To_Object; |
A toolbar is created with a call to Gtk.Toolbar.Gtk_New.
A toolbar can contain instances of a subclass of Gtk.Tool_Item.Gtk_Tool_Item. To add a Gtk.Tool_Item.Gtk_Tool_Item to the a toolbar, use Gtk.Toolbar.Insert. To remove an item from the toolbar use Gtk.Container.Remove. To add a button to the toolbar, add an instance of Gtk.Tool_Button.Gtk_Tool_Button.
Toolbar items can be visually grouped by adding instances of Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item to the toolbar. If the GtkToolbar child property "expand" is TRUE and the property Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item:draw 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 Gtk.Toolbar.Gtk_Toolbar::popup-context-menu signal.