Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo renders text in a cell like Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text from which it is derived. But while Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text offers a simple entry to edit the text, Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo offers a Gtk.Combo_Box.Gtk_Combo_Box widget to edit the text. The values to display in the combo box are taken from the tree model specified in the Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo:model property.
The combo cell renderer takes care of adding a text cell renderer to the combo box and sets it to display the column specified by its Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo:text-column property. Further properties of the combo box can be set in a handler for the Gtk.Cell_Renderer.Gtk_Cell_Renderer::editing-started signal.
The Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo cell renderer was added in GTK+ 2.6.
type Cb_GObject_UTF8_String_Gtk_Tree_Iter_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Path_String : UTF8_String;
New_Iter : Gtk.Tree_Model.Gtk_Tree_Iter);
type Cb_Gtk_Cell_Renderer_Combo_UTF8_String_Gtk_Tree_Iter_Void is not null access procedure
(Self : access Gtk_Cell_Renderer_Combo_Record'Class;
Path_String : UTF8_String;
New_Iter : Gtk.Tree_Model.Gtk_Tree_Iter);
function Get_Type return Glib.GType
type Gtk_Cell_Renderer_Combo is access all Gtk_Cell_Renderer_Combo_Record'Class;
function Gtk_Cell_Renderer_Combo_New return Gtk_Cell_Renderer_Combo
Creates a new Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set). Also, with Gtk.Tree_View_Column.Gtk_Tree_View_Column, you can bind a property to a value in a Gtk.Tree_Model.Gtk_Tree_Model. For example, you can bind the "text" property on the cell renderer to a string value in the model, thus rendering a different string in each row of the Gtk.Tree_View.Gtk_Tree_View. Since: gtk+ 2.6
type Gtk_Cell_Renderer_Combo_Record is new Gtk_Cell_Renderer_Text_Record with null record;
procedure Gtk_New (Self : out Gtk_Cell_Renderer_Combo)
Creates a new Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set). Also, with Gtk.Tree_View_Column.Gtk_Tree_View_Column, you can bind a property to a value in a Gtk.Tree_Model.Gtk_Tree_Model. For example, you can bind the "text" property on the cell renderer to a string value in the model, thus rendering a different string in each row of the Gtk.Tree_View.Gtk_Tree_View. Since: gtk+ 2.6 Initialize does nothing if the object was already created with another call to Initialize* or G_New.
Has_Entry_Property : constant Glib.Properties.Property_Boolean;
If True, the cell renderer will include an entry and allow to enter values other than the ones in the popup list.
procedure Initialize
(Self : not null access Gtk_Cell_Renderer_Combo_Record'Class)
Creates a new Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set). Also, with Gtk.Tree_View_Column.Gtk_Tree_View_Column, you can bind a property to a value in a Gtk.Tree_Model.Gtk_Tree_Model. For example, you can bind the "text" property on the cell renderer to a string value in the model, thus rendering a different string in each row of the Gtk.Tree_View.Gtk_Tree_View. Since: gtk+ 2.6 Initialize does nothing if the object was already created with another call to Initialize* or G_New.
Model_Property : constant Glib.Properties.Property_Interface;
Type: Gtk.Tree_Model.Gtk_Tree_Model Holds a tree model containing the possible values for the combo box. Use the text_column property to specify the column holding the values.
procedure On_Changed
(Self : not null access Gtk_Cell_Renderer_Combo_Record;
Call : Cb_GObject_UTF8_String_Gtk_Tree_Iter_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
This signal is emitted each time after the user selected an item in the combo box, either by using the mouse or the arrow keys. Contrary to GtkComboBox, GtkCellRendererCombo::changed is not emitted for changes made to a selected item in the entry. The argument New_Iter corresponds to the newly selected item in the combo box and it is relative to the GtkTreeModel set via the model property on GtkCellRendererCombo.
Note that as soon as you change the model displayed in the tree view, the tree view will immediately cease the editing operating. This means that you most probably want to refrain from changing the model until the combo cell renderer emits the edited or editing_canceled signal.
Callback parameters: -- @param Path_String a string of the path identifying the edited cell -- (relative to the tree view model) -- @param New_Iter the new iter selected in the combo box (relative to the -- combo box model)
procedure On_Changed
(Self : not null access Gtk_Cell_Renderer_Combo_Record;
Call : Cb_Gtk_Cell_Renderer_Combo_UTF8_String_Gtk_Tree_Iter_Void;
After : Boolean := False)
This signal is emitted each time after the user selected an item in the combo box, either by using the mouse or the arrow keys. Contrary to GtkComboBox, GtkCellRendererCombo::changed is not emitted for changes made to a selected item in the entry. The argument New_Iter corresponds to the newly selected item in the combo box and it is relative to the GtkTreeModel set via the model property on GtkCellRendererCombo.
Note that as soon as you change the model displayed in the tree view, the tree view will immediately cease the editing operating. This means that you most probably want to refrain from changing the model until the combo cell renderer emits the edited or editing_canceled signal.
Callback parameters: -- @param Path_String a string of the path identifying the edited cell -- (relative to the tree view model) -- @param New_Iter the new iter selected in the combo box (relative to the -- combo box model)
Signal_Changed : constant Glib.Signal_Name := "changed";
This signal is emitted each time after the user selected an item in the combo box, either by using the mouse or the arrow keys. Contrary to GtkComboBox, GtkCellRendererCombo::changed is not emitted for changes made to a selected item in the entry. The argument New_Iter corresponds to the newly selected item in the combo box and it is relative to the GtkTreeModel set via the model property on GtkCellRendererCombo.
Note that as soon as you change the model displayed in the tree view, the tree view will immediately cease the editing operating. This means that you most probably want to refrain from changing the model until the combo cell renderer emits the edited or editing_canceled signal.
Callback parameters: -- @param Path_String a string of the path identifying the edited cell -- (relative to the tree view model) -- @param New_Iter the new iter selected in the combo box (relative to the -- combo box model)
Text_Column_Property : constant Glib.Properties.Property_Int;
Specifies the model column which holds the possible values for the combo box.
Note that this refers to the model specified in the model property, not the model backing the tree view to which this cell renderer is attached.
Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo automatically adds a text cell renderer for this column to its combo box.