package Implements_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Combo_Record, Gtk_Combo);
package Implements_Orientable is new Glib.Types.Implements (Gtk.Orientable.Gtk_Orientable, Gtk_Combo_Record, Gtk_Combo);
type Gtk_Combo_Record is new Gtk_Hbox_Record with null record;
type Gtk_Combo is access all Gtk_Combo_Record'Class;
Allow_Empty_Property : constant Glib.Properties.Property_Boolean;
Case_Sensitive_Property : constant Glib.Properties.Property_Boolean;
Enable_Arrow_Keys_Property : constant Glib.Properties.Property_Boolean;
Enable_Arrows_Always_Property : constant Glib.Properties.Property_Boolean;
Value_In_List_Property : constant Glib.Properties.Property_Boolean;
procedure Gtk_New
( | Combo_Box | : out Gtk_Combo); |
procedure Initialize
( | Combo_Box | : access Gtk_Combo_Record'Class); |
function Get_Type return Glib.GType;
procedure Disable_Activate
( | Combo_Box | : access Gtk_Combo_Record); |
procedure Set_Case_Sensitive
( | Combo_Box | : access Gtk_Combo_Record; |
Val | : Boolean := True); |
procedure Set_Item_String
( | Combo_Box | : access Gtk_Combo_Record; |
Item | : access Gtk.Item.Gtk_Item_Record'Class; | |
Item_Value | : UTF8_String); |
procedure Set_Popdown_Strings
( | Combo_Box | : access Gtk_Combo_Record; |
Strings | : Gtk.Enums.String_List.Glist); |
procedure Set_Use_Arrows
( | Combo_Box | : access Gtk_Combo_Record; |
Val | : Boolean := True); |
procedure Set_Use_Arrows_Always
( | Combo_Box | : access Gtk_Combo_Record; |
Val | : Boolean := True); |
procedure Set_Value_In_List
( | Combo_Box | : access Gtk_Combo_Record; |
Val | : Boolean := True; | |
Ok_If_Empty | : Boolean := False); |
function Get_Entry
( | Combo_Box | : access Gtk_Combo_Record) return Gtk.Widget.Gtk_Widget; |
procedure Set_Entry
( | Combo_Box | : access Gtk_Combo_Record; |
Value | : access Gtk.Widget.Gtk_Widget_Record'Class); |
function Get_List
( | Combo_Box | : access Gtk_Combo_Record) return Gtk.Widget.Gtk_Widget; |
function Get_Orientation
( | Self | : access Gtk_Combo_Record) return Gtk.Enums.Gtk_Orientation; |
procedure Set_Orientation
( | Self | : access Gtk_Combo_Record; |
Orientation | : Gtk.Enums.Gtk_Orientation); |
function "+"
( | Widget | : access Gtk_Combo_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Combo renames Implements_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Combo_Record'Class) return Gtk.Orientable.Gtk_Orientable renames Implements_Orientable.To_Interface; |
function "-"
( | Interf | : Gtk.Orientable.Gtk_Orientable) return Gtk_Combo renames Implements_Orientable.To_Object; |
The Gtk_Combo widget consists of a single-line text entry field and a drop-down list. The drop-down list is displayed when the user clicks on a small arrow button to the right of the entry field.
The drop-down list is a Gtk_List widget and can be accessed using the list member of the Gtk_Combo. List elements can contain arbitrary widgets, but if an element is not a plain label, then you must use the Gtk_List.Set_Item_String function. This sets the string which will be placed in the text entry field when the item is selected.
By default, the user can step through the items in the list using the arrow (cursor) keys, though this behaviour can be turned off with Set_Use_Arrows.
Normally the arrow keys are only active when the contents of the text entry field matches one of the items in the list. If the contents of the entry field do not match any of the list items, then pressing the arrow keys does nothing. However, by calling Set_Use_Arrows_Always you can specify that the arrow keys are always active. If the contents of the entry field does not match any of the items in the list, then pressing the up or down arrow key will set the entry field to the last or first item in the list, respectively.