Index

Package: Cell_Renderer_Combo

Description

package Gtk.Cell_Renderer_Combo is

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.

Classes

Gtk_Cell_Renderer_Combo_Record

type Gtk_Cell_Renderer_Combo_Record is new Gtk_Cell_Renderer_Text_Record with null record;

Ancestors:

Primitive operations:

Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Gtk.Cell_Renderer.Activate (Inherited)
Gtk.Cell_Renderer.Get_Aligned_Area (Inherited)
Gtk.Cell_Renderer.Get_Alignment (Inherited)
Gtk.Cell_Renderer.Get_Fixed_Size (Inherited)
Gtk.Cell_Renderer.Get_Padding (Inherited)
Gtk.Cell_Renderer.Get_Preferred_Height (Inherited)
Gtk.Cell_Renderer.Get_Preferred_Height_For_Width (Inherited)
Gtk.Cell_Renderer.Get_Preferred_Size (Inherited)
Gtk.Cell_Renderer.Get_Preferred_Width (Inherited)
Gtk.Cell_Renderer.Get_Preferred_Width_For_Height (Inherited)
Gtk.Cell_Renderer.Get_Request_Mode (Inherited)
Gtk.Cell_Renderer.Get_Sensitive (Inherited)
Gtk.Cell_Renderer.Get_Size (Inherited)
Gtk.Cell_Renderer.Get_State (Inherited)
Gtk.Cell_Renderer.Get_Visible (Inherited)
Gtk.Cell_Renderer.Is_Activatable (Inherited)
Gtk.Cell_Renderer.On_Editing_Canceled (Inherited)
Gtk.Cell_Renderer.On_Editing_Canceled (Inherited)
Gtk.Cell_Renderer.On_Editing_Started (Inherited)
Gtk.Cell_Renderer.On_Editing_Started (Inherited)
Gtk.Cell_Renderer.Render (Inherited)
Gtk.Cell_Renderer.Set_Alignment (Inherited)
Gtk.Cell_Renderer.Set_Fixed_Size (Inherited)
Gtk.Cell_Renderer.Set_Padding (Inherited)
Gtk.Cell_Renderer.Set_Sensitive (Inherited)
Gtk.Cell_Renderer.Set_Visible (Inherited)
Gtk.Cell_Renderer.Start_Editing (Inherited)
Gtk.Cell_Renderer.Stop_Editing (Inherited)
Gtk.Cell_Renderer_Text.On_Edited (Inherited)
Gtk.Cell_Renderer_Text.On_Edited (Inherited)
Gtk.Cell_Renderer_Text.Set_Fixed_Height_From_Font (Inherited)

Types

Gtk_Cell_Renderer_Combo

type Gtk_Cell_Renderer_Combo is access all Gtk_Cell_Renderer_Combo_Record'Class;

Cb_Gtk_Cell_Renderer_Combo_UTF8_String_Gtk_Tree_Iter_Void

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);

Cb_GObject_UTF8_String_Gtk_Tree_Iter_Void

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);

Constants & Global variables

Has_Entry_Property (Glib.Properties.Property_Boolean)

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.

Model_Property (Glib.Properties.Property_Interface)

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.

Text_Column_Property (Glib.Properties.Property_Int)

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.

Signal_Changed (Glib.Signal_Name)

Signal_Changed : constant Glib.Signal_Name := "changed";

Subprograms & Entries

Gtk_New

procedure Gtk_New 
(Self: out Gtk_Cell_Renderer_Combo);

Initialize

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

Gtk_Cell_Renderer_Combo_New

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

Get_Type

function Get_Type return Glib.GType;

On_Changed

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);

On_Changed

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: -- "path_string": a string of the path identifying the edited cell -- (relative to the tree view model) -- "new_iter": the new iter selected in the combo box (relative to the -- combo box model)