package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Combo_Box_Text_Record, Gtk_Combo_Box_Text);
package Implements_Gtk_Cell_Editable is new Glib.Types.Implements (Gtk.Cell_Editable.Gtk_Cell_Editable, Gtk_Combo_Box_Text_Record, Gtk_Combo_Box_Text);
package Implements_Gtk_Cell_Layout is new Glib.Types.Implements (Gtk.Cell_Layout.Gtk_Cell_Layout, Gtk_Combo_Box_Text_Record, Gtk_Combo_Box_Text);
type Gtk_Combo_Box_Text_Record is new Gtk_Combo_Box_Record with null record;
type Gtk_Combo_Box_Text is access all Gtk_Combo_Box_Text_Record'Class;
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);
procedure Gtk_New
( | Self | : out Gtk_Combo_Box_Text); |
procedure Initialize
( | Self | : not null access Gtk_Combo_Box_Text_Record'Class); |
function Gtk_Combo_Box_Text_New return Gtk_Combo_Box_Text;
procedure Gtk_New_With_Entry
( | Self | : out Gtk_Combo_Box_Text); |
procedure Initialize_With_Entry
( | Self | : not null access Gtk_Combo_Box_Text_Record'Class); |
function Gtk_Combo_Box_Text_New_With_Entry return Gtk_Combo_Box_Text;
function Get_Type return Glib.GType;
procedure Append
( | Self | : not null access Gtk_Combo_Box_Text_Record; |
Id | : UTF8_String := ""; | |
Text | : UTF8_String); |
procedure Append_Text
( | Self | : not null access Gtk_Combo_Box_Text_Record; |
Text | : UTF8_String); |
function Get_Active_Text
( | Self | : not null access Gtk_Combo_Box_Text_Record) return UTF8_String; |
procedure Insert
( | Self | : not null access Gtk_Combo_Box_Text_Record; |
Position | : Gint; | |
Id | : UTF8_String := ""; | |
Text | : UTF8_String); |
procedure Insert_Text
( | Self | : not null access Gtk_Combo_Box_Text_Record; |
Position | : Gint; | |
Text | : UTF8_String); |
procedure Prepend
( | Self | : not null access Gtk_Combo_Box_Text_Record; |
Id | : UTF8_String := ""; | |
Text | : UTF8_String); |
procedure Prepend_Text
( | Self | : not null access Gtk_Combo_Box_Text_Record; |
Text | : UTF8_String); |
procedure Remove
( | Self | : not null access Gtk_Combo_Box_Text_Record; |
Position | : Gint); |
procedure Remove_All
( | Self | : not null access Gtk_Combo_Box_Text_Record); |
procedure Set_Cell_Data_Func
( | Cell_Layout | : not null access Gtk_Combo_Box_Text_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; | |
Func | : Gtk_Cell_Layout_Data_Func); |
procedure Editing_Done
( | Cell_Editable | : not null access Gtk_Combo_Box_Text_Record); |
procedure Remove_Widget
( | Cell_Editable | : not null access Gtk_Combo_Box_Text_Record); |
procedure Start_Editing
( | Cell_Editable | : not null access Gtk_Combo_Box_Text_Record; |
Event | : Gdk.Event.Gdk_Event); |
procedure Add_Attribute
( | Cell_Layout | : not null access Gtk_Combo_Box_Text_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_Text_Record); |
procedure Clear_Attributes
( | Cell_Layout | : not null access Gtk_Combo_Box_Text_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); |
function Get_Cells
( | Cell_Layout | : not null access Gtk_Combo_Box_Text_Record) return Glib.Object.Object_Simple_List.Glist; |
procedure Pack_End
( | Cell_Layout | : not null access Gtk_Combo_Box_Text_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_Text_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_Text_Record; |
Cell | : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; | |
Position | : Gint); |
function "+"
( | Widget | : access Gtk_Combo_Box_Text_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Combo_Box_Text renames Implements_Gtk_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Combo_Box_Text_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_Text renames Implements_Gtk_Cell_Editable.To_Object; |
function "+"
( | Widget | : access Gtk_Combo_Box_Text_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_Text renames Implements_Gtk_Cell_Layout.To_Object; |
A GtkComboBoxText is a simple variant of Gtk.Combo_Box.Gtk_Combo_Box that hides the model-view complexity for simple text-only use cases.
To create a GtkComboBoxText, use Gtk.Combo_Box_Text.Gtk_New or Gtk.Combo_Box_Text.Gtk_New_With_Entry.
You can add items to a GtkComboBoxText with Gtk.Combo_Box_Text.Append_Text, Gtk.Combo_Box_Text.Insert_Text or Gtk.Combo_Box_Text.Prepend_Text and remove options with Gtk.Combo_Box_Text.Remove.
If the GtkComboBoxText contains an entry (via the 'has-entry' property), its contents can be retrieved using Gtk.Combo_Box_Text.Get_Active_Text. The entry itself can be accessed by calling Gtk.Bin.Get_Child on the combo box.
You should not call Gtk.Combo_Box.Set_Model or attempt to pack more cells into this combo box via its GtkCellLayout interface. == GtkComboBoxText as GtkBuildable == The GtkComboBoxText implementation of the GtkBuildable interface supports adding items directly using the <items> element and specifying <item> elements for each item. Each <item> element supports the regular translation attributes "translatable", "context" and "comments". == A UI definition fragment specifying GtkComboBoxText items == <object class="GtkComboBoxText"> <items> <item translatable="yes">Factory</item> <item translatable="yes">Home</item> <item translatable="yes">Subway</item> </items> </object>