package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Combo_Box_Record, Gtk_Combo_Box);
package Implements_Gtk_Cell_Editable is new Glib.Types.Implements (Gtk.Cell_Editable.Gtk_Cell_Editable, Gtk_Combo_Box_Record, Gtk_Combo_Box);
package Implements_Gtk_Cell_Layout is new Glib.Types.Implements (Gtk.Cell_Layout.Gtk_Cell_Layout, Gtk_Combo_Box_Record, Gtk_Combo_Box);
type Gtk_Combo_Box_Record is new Gtk_Bin_Record with null record;
type Gtk_Combo_Box is access all Gtk_Combo_Box_Record'Class;
type Gtk_Tree_View_Row_Separator_Func is access function (Model : Gtk.Tree_Model.Gtk_Tree_Model; Iter : Gtk.Tree_Model.Gtk_Tree_Iter) return Boolean;
type Gtk_Cell_Layout_Data_Func is access procedure (Cell_Layout : Gtk.Cell_Layout.Gtk_Cell_Layout; Cell : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; Tree_Model : Gtk.Tree_Model.Gtk_Tree_Model; Iter : Gtk.Tree_Model.Gtk_Tree_Iter);
type Cb_Gtk_Combo_Box_Void is not null access procedure (Self : access Gtk_Combo_Box_Record'Class);
type Cb_GObject_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Combo_Box_UTF8_String_UTF8_String is not null access function (Self : access Gtk_Combo_Box_Record'Class; Path : UTF8_String) return UTF8_String;
type Cb_GObject_UTF8_String_UTF8_String is not null access function (Self : access Glib.Object.GObject_Record'Class; Path : UTF8_String) return UTF8_String;
type Cb_Gtk_Combo_Box_Gtk_Scroll_Type_Void is not null access procedure (Self : access Gtk_Combo_Box_Record'Class; Scroll_Type : Gtk.Enums.Gtk_Scroll_Type);
type Cb_GObject_Gtk_Scroll_Type_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class; Scroll_Type : Gtk.Enums.Gtk_Scroll_Type);
type Cb_Gtk_Combo_Box_Boolean is not null access function (Self : access Gtk_Combo_Box_Record'Class) return Boolean;
type Cb_GObject_Boolean is not null access function (Self : access Glib.Object.GObject_Record'Class) return Boolean;
Active_Property : constant Glib.Properties.Property_Int;
Active_Id_Property : constant Glib.Properties.Property_String;
Add_Tearoffs_Property : constant Glib.Properties.Property_Boolean;
Button_Sensitivity_Property : constant Gtk.Enums.Property_Gtk_Sensitivity_Type;
Cell_Area_Property : constant Glib.Properties.Property_Object;
Column_Span_Column_Property : constant Glib.Properties.Property_Int;
Entry_Text_Column_Property : constant Glib.Properties.Property_Int;
Focus_On_Click_Property : constant Glib.Properties.Property_Boolean;
Has_Entry_Property : constant Glib.Properties.Property_Boolean;
Has_Frame_Property : constant Glib.Properties.Property_Boolean;
Id_Column_Property : constant Glib.Properties.Property_Int;
Model_Property : constant Glib.Properties.Property_Interface;
Popup_Fixed_Width_Property : constant Glib.Properties.Property_Boolean;
Popup_Shown_Property : constant Glib.Properties.Property_Boolean;
Row_Span_Column_Property : constant Glib.Properties.Property_Int;
Tearoff_Title_Property : constant Glib.Properties.Property_String;
Wrap_Width_Property : constant Glib.Properties.Property_Int;
Signal_Changed : constant Glib.Signal_Name := "changed";
Signal_Format_Entry_Text : constant Glib.Signal_Name := "format-entry-text";
Signal_Move_Active : constant Glib.Signal_Name := "move-active";
Signal_Popdown : constant Glib.Signal_Name := "popdown";
Signal_Popup : constant Glib.Signal_Name := "popup";
procedure Gtk_New
( | Combo_Box | : out Gtk_Combo_Box); |
procedure Initialize
( | Combo_Box | : not null access Gtk_Combo_Box_Record'Class); |
function Gtk_Combo_Box_New return Gtk_Combo_Box;
procedure Gtk_New_With_Area
( | Combo_Box | : out Gtk_Combo_Box; |
Area | : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class); |
procedure Initialize_With_Area
( | Combo_Box | : not null access Gtk_Combo_Box_Record'Class; |
Area | : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class); |
function Gtk_Combo_Box_New_With_Area
( | Area | : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class) return Gtk_Combo_Box; |
procedure Gtk_New_With_Area_And_Entry
( | Combo_Box | : out Gtk_Combo_Box; |
Area | : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class); |
procedure Initialize_With_Area_And_Entry
( | Combo_Box | : not null access Gtk_Combo_Box_Record'Class; |
Area | : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class); |
function Gtk_Combo_Box_New_With_Area_And_Entry
( | Area | : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class) return Gtk_Combo_Box; |
procedure Gtk_New_With_Entry
( | Combo_Box | : out Gtk_Combo_Box); |
procedure Initialize_With_Entry
( | Combo_Box | : not null access Gtk_Combo_Box_Record'Class); |
function Gtk_Combo_Box_New_With_Entry return Gtk_Combo_Box;
procedure Gtk_New_With_Model
( | Combo_Box | : out Gtk_Combo_Box; |
Model | : Gtk.Tree_Model.Gtk_Tree_Model); |
procedure Initialize_With_Model
( | Combo_Box | : not null access Gtk_Combo_Box_Record'Class; |
Model | : Gtk.Tree_Model.Gtk_Tree_Model); |
function Gtk_Combo_Box_New_With_Model
( | Model | : Gtk.Tree_Model.Gtk_Tree_Model) return Gtk_Combo_Box; |
procedure Gtk_New_With_Model_And_Entry
( | Combo_Box | : out Gtk_Combo_Box; |
Model | : Gtk.Tree_Model.Gtk_Tree_Model); |
procedure Initialize_With_Model_And_Entry
( | Combo_Box | : not null access Gtk_Combo_Box_Record'Class; |
Model | : Gtk.Tree_Model.Gtk_Tree_Model); |
function Gtk_Combo_Box_New_With_Model_And_Entry
( | Model | : Gtk.Tree_Model.Gtk_Tree_Model) return Gtk_Combo_Box; |
function Get_Type return Glib.GType;
function Get_Active
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gint; |
procedure Set_Active
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Index | : Gint); |
function Get_Active_Id
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return UTF8_String; |
function Set_Active_Id
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Active_Id | : UTF8_String := "") return Boolean; |
function Get_Add_Tearoffs
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Boolean; |
procedure Set_Add_Tearoffs
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Add_Tearoffs | : Boolean); |
function Get_Button_Sensitivity
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gtk.Enums.Gtk_Sensitivity_Type; |
procedure Set_Button_Sensitivity
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Sensitivity | : Gtk.Enums.Gtk_Sensitivity_Type); |
function Get_Column_Span_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gint; |
procedure Set_Column_Span_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Column_Span | : Gint); |
function Get_Entry_Text_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gint; |
procedure Set_Entry_Text_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Text_Column | : Gint); |
function Get_Focus_On_Click
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Boolean; |
procedure Set_Focus_On_Click
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Focus_On_Click | : Boolean); |
function Get_Has_Entry
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Boolean; |
function Get_Id_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gint; |
procedure Set_Id_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Id_Column | : Gint); |
function Get_Model
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gtk.Tree_Model.Gtk_Tree_Model; |
procedure Set_Model
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Model | : Gtk.Tree_Model.Gtk_Tree_Model); |
function Get_Popup_Fixed_Width
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Boolean; |
procedure Set_Popup_Fixed_Width
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Fixed | : Boolean); |
procedure Get_Row_Separator_Func
( | Combo_Box | : not null access Gtk_Combo_Box_Record); |
procedure Set_Row_Separator_Func
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Func | : Gtk.Tree_View.Gtk_Tree_View_Row_Separator_Func); |
function Get_Row_Span_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gint; |
procedure Set_Row_Span_Column
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Row_Span | : Gint); |
function Get_Title
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return UTF8_String; |
procedure Set_Title
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Title | : UTF8_String); |
function Get_Wrap_Width
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gint; |
procedure Set_Wrap_Width
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Width | : Gint); |
procedure Popdown
( | Combo_Box | : not null access Gtk_Combo_Box_Record); |
procedure Popup
( | Combo_Box | : not null access Gtk_Combo_Box_Record); |
procedure Set_Active_Iter
( | Combo_Box | : not null access Gtk_Combo_Box_Record; |
Iter | : Gtk.Tree_Model.Gtk_Tree_Iter); |
procedure Set_Cell_Data_Func
( | Cell_Layout | : not null access Gtk_Combo_Box_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; | |
Func | : Gtk_Cell_Layout_Data_Func); |
function Get_Active_Iter
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return Gtk.Tree_Model.Gtk_Tree_Iter; |
function Get_Active_Text
( | Combo_Box | : not null access Gtk_Combo_Box_Record) return UTF8_String; |
procedure Editing_Done
( | Cell_Editable | : not null access Gtk_Combo_Box_Record); |
procedure Remove_Widget
( | Cell_Editable | : not null access Gtk_Combo_Box_Record); |
procedure Start_Editing
( | Cell_Editable | : not null access Gtk_Combo_Box_Record; |
Event | : Gdk.Event.Gdk_Event); |
procedure Add_Attribute
( | Cell_Layout | : not null access Gtk_Combo_Box_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; | |
Attribute | : UTF8_String; | |
Column | : Gint); |
procedure Clear
( | Cell_Layout | : not null access Gtk_Combo_Box_Record); |
procedure Clear_Attributes
( | Cell_Layout | : not null access Gtk_Combo_Box_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); |
function Get_Cells
( | Cell_Layout | : not null access Gtk_Combo_Box_Record) return Glib.Object.Object_Simple_List.Glist; |
procedure Pack_End
( | Cell_Layout | : not null access Gtk_Combo_Box_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; | |
Expand | : Boolean); |
procedure Pack_Start
( | Cell_Layout | : not null access Gtk_Combo_Box_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; | |
Expand | : Boolean); |
procedure Reorder
( | Cell_Layout | : not null access Gtk_Combo_Box_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; | |
Position | : Gint); |
procedure On_Changed
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_Gtk_Combo_Box_Void; | |
After | : Boolean := False); |
procedure On_Changed
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Format_Entry_Text
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_Gtk_Combo_Box_UTF8_String_UTF8_String; | |
After | : Boolean := False); |
procedure On_Format_Entry_Text
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_GObject_UTF8_String_UTF8_String; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Move_Active
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_Gtk_Combo_Box_Gtk_Scroll_Type_Void; | |
After | : Boolean := False); |
procedure On_Move_Active
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_GObject_Gtk_Scroll_Type_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Popdown
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_Gtk_Combo_Box_Boolean; | |
After | : Boolean := False); |
procedure On_Popdown
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_GObject_Boolean; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Popup
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_Gtk_Combo_Box_Void; | |
After | : Boolean := False); |
procedure On_Popup
( | Self | : not null access Gtk_Combo_Box_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Combo_Box_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Combo_Box renames Implements_Gtk_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Combo_Box_Record'Class) return Gtk.Cell_Editable.Gtk_Cell_Editable renames Implements_Gtk_Cell_Editable.To_Interface; |
function "-"
( | Interf | : Gtk.Cell_Editable.Gtk_Cell_Editable) return Gtk_Combo_Box renames Implements_Gtk_Cell_Editable.To_Object; |
function "+"
( | Widget | : access Gtk_Combo_Box_Record'Class) return Gtk.Cell_Layout.Gtk_Cell_Layout renames Implements_Gtk_Cell_Layout.To_Interface; |
function "-"
( | Interf | : Gtk.Cell_Layout.Gtk_Cell_Layout) return Gtk_Combo_Box renames Implements_Gtk_Cell_Layout.To_Object; |
A GtkComboBox is a widget that allows the user to choose from a list of valid choices. The GtkComboBox displays the selected choice. When activated, the GtkComboBox displays a popup which allows the user to make a new choice. The style in which the selected value is displayed, and the style of the popup is determined by the current theme. It may be similar to a Windows-style combo box.
The GtkComboBox uses the model-view pattern; the list of valid choices is specified in the form of a tree model, and the display of the choices can be adapted to the data in the model by using cell renderers, as you would in a tree view. This is possible since GtkComboBox implements the Gtk.Cell_Layout.Gtk_Cell_Layout interface. The tree model holding the valid choices is not restricted to a flat list, it can be a real tree, and the popup will reflect the tree structure.
To allow the user to enter values not in the model, the 'has-entry' property allows the GtkComboBox to contain a Gtk.GEntry.Gtk_Entry. This entry can be accessed by calling Gtk.Bin.Get_Child on the combo box.
For a simple list of textual choices, the model-view API of GtkComboBox can be a bit overwhelming. In this case, Gtk.Combo_Box_Text.Gtk_Combo_Box_Text offers a simple alternative. Both GtkComboBox and Gtk.Combo_Box_Text.Gtk_Combo_Box_Text can contain an entry.