Gtk.Cell_View

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

A Gtk.Cell_View.Gtk_Cell_View displays a single row of a Gtk.Tree_Model.Gtk_Tree_Model using a Gtk.Cell_Area.Gtk_Cell_Area and Gtk.Cell_Area_Context.Gtk_Cell_Area_Context. A Gtk.Cell_Area_Context.Gtk_Cell_Area_Context can be provided to the Gtk.Cell_View.Gtk_Cell_View at construction time in order to keep the cellview in context of a group of cell views, this ensures that the renderers displayed will be properly aligned with eachother (like the aligned cells in the menus of Gtk.Combo_Box.Gtk_Combo_Box).

Gtk.Cell_View.Gtk_Cell_View is Gtk.Orientable.Gtk_Orientable in order to decide in which orientation the underlying Gtk.Cell_Area_Context.Gtk_Cell_Area_Context should be allocated. Taking the Gtk.Combo_Box.Gtk_Combo_Box menu as an example, cellviews should be oriented horizontally if the menus are listed top-to-bottom and thus all share the same width but may have separate individual heights (left-to-right menus should be allocated vertically since they all share the same height but may have variable widths).

# CSS nodes

GtkCellView has a single CSS node with name cellview.

"+"

function "+"
  (Widget : access Gtk_Cell_View_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Cell_View_Record'Class)
return Gtk.Cell_Layout.Gtk_Cell_Layout
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Cell_View_Record'Class)
return Gtk.Orientable.Gtk_Orientable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Cell_View
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Cell_Layout.Gtk_Cell_Layout)
return Gtk_Cell_View
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Orientable.Gtk_Orientable)
return Gtk_Cell_View
Parameters
Interf
Return Value

Add_Attribute

procedure Add_Attribute
   (Cell_Layout : not null access Gtk_Cell_View_Record;
    Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
    Attribute   : UTF8_String;
    Column      : Glib.Gint)
Parameters
Cell_Layout
Cell
Attribute
Column

Background_Gdk_Property

Background_Gdk_Property : constant Gdk.Color.Property_Gdk_Color;

Type: Gdk.Color.Gdk_Color The background color as a Gdk.Color.Gdk_Color

Background_Property

Background_Property : constant Glib.Properties.Property_String;

Flags: write

Background_Rgba_Property

Background_Rgba_Property : constant Gdk.RGBA.Property_RGBA;

Type: Gdk.RGBA.Gdk_RGBA The background color as a Gdk.RGBA.Gdk_RGBA

Background_Set_Property

Background_Set_Property : constant Glib.Properties.Property_Boolean;

Cell_Area_Context_Property

Cell_Area_Context_Property : constant Glib.Properties.Property_Object;

Type: Gtk.Cell_Area_Context.Gtk_Cell_Area_Context The Gtk.Cell_Area_Context.Gtk_Cell_Area_Context used to compute the geometry of the cell view.

A group of cell views can be assigned the same context in order to ensure the sizes and cell alignments match across all the views with the same context.

Gtk.Combo_Box.Gtk_Combo_Box menus uses this to assign the same context to all cell views in the menu items for a single menu (each submenu creates its own context since the size of each submenu does not depend on parent or sibling menus).

since 3.0

Cell_Area_Property

Cell_Area_Property : constant Glib.Properties.Property_Object;

Type: Gtk.Cell_Area.Gtk_Cell_Area The Gtk.Cell_Area.Gtk_Cell_Area rendering cells

If no area is specified when creating the cell view with Gtk.Cell_View.Gtk_New_With_Context a horizontally oriented Gtk.Cell_Area_Box.Gtk_Cell_Area_Box will be used.

since 3.0

Clear

procedure Clear (Cell_Layout : not null access Gtk_Cell_View_Record)
Parameters
Cell_Layout

Clear_Attributes

procedure Clear_Attributes
   (Cell_Layout : not null access Gtk_Cell_View_Record;
    Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class)
Parameters
Cell_Layout
Cell

Draw_Sensitive_Property

Draw_Sensitive_Property : constant Glib.Properties.Property_Boolean;

Whether all cells should be draw as sensitive for this view regardless of the actual cell properties (used to make menus with submenus appear sensitive when the items in submenus might be insensitive).

since 3.0

Fit_Model_Property

Fit_Model_Property : constant Glib.Properties.Property_Boolean;

Whether the view should request enough space to always fit the size of every row in the model (used by the combo box to ensure the combo box size doesnt change when different items are selected).

since 3.0

Get_Cells

function Get_Cells
   (Cell_Layout : not null access Gtk_Cell_View_Record)
    return Gtk.Cell_Renderer.Cell_Renderer_List.Glist
Parameters
Cell_Layout
Return Value

Get_Displayed_Row

function Get_Displayed_Row
   (Cell_View : not null access Gtk_Cell_View_Record)
    return Gtk.Tree_Model.Gtk_Tree_Path

Returns a Gtk.Tree_Model.Gtk_Tree_Path referring to the currently displayed row. If no row is currently displayed, null is returned. Since: gtk+ 2.6

Parameters
Cell_View
Return Value

the currently displayed row or null

Get_Draw_Sensitive

function Get_Draw_Sensitive
   (Cell_View : not null access Gtk_Cell_View_Record) return Boolean

Gets whether Cell_View is configured to draw all of its cells in a sensitive state. Since: gtk+ 3.0

Parameters
Cell_View
Return Value

whether Cell_View draws all of its cells in a sensitive state

Get_Fit_Model

function Get_Fit_Model
   (Cell_View : not null access Gtk_Cell_View_Record) return Boolean

Gets whether Cell_View is configured to request space to fit the entire Gtk.Tree_Model.Gtk_Tree_Model. Since: gtk+ 3.0

Parameters
Cell_View
Return Value

whether Cell_View requests space to fit the entire Gtk.Tree_Model.Gtk_Tree_Model.

Get_Model

function Get_Model
   (Cell_View : not null access Gtk_Cell_View_Record)
    return Gtk.Tree_Model.Gtk_Tree_Model

Returns the model for Cell_View. If no model is used null is returned. Since: gtk+ 2.16

Parameters
Cell_View
Return Value

a Gtk.Tree_Model.Gtk_Tree_Model used or null

Get_Orientation

function Get_Orientation
   (Self : not null access Gtk_Cell_View_Record)
    return Gtk.Enums.Gtk_Orientation
Parameters
Self
Return Value

Get_Size_Of_Row

function Get_Size_Of_Row
   (Cell_View   : not null access Gtk_Cell_View_Record;
    Path        : Gtk.Tree_Model.Gtk_Tree_Path;
    Requisition : access Gtk.Widget.Gtk_Requisition) return Boolean

Sets Requisition to the size needed by Cell_View to display the model row pointed to by Path. Since: gtk+ 2.6 Deprecated since 3.0, 1

Parameters
Cell_View
Path

a Gtk.Tree_Model.Gtk_Tree_Path

Requisition

return location for the size

Return Value

True

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Cell_Layout_Data_Func

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

A function which should set the value of Cell_Layout's cell renderer(s) as appropriate.

Parameters
Cell_Layout

a Gtk.Cell_Layout.Gtk_Cell_Layout

Cell

the cell renderer whose value is to be set

Tree_Model

the model

Iter

a Gtk.Tree_Model.Gtk_Tree_Iter indicating the row to set the value for

Gtk_Cell_View

type Gtk_Cell_View is access all Gtk_Cell_View_Record'Class;

Gtk_Cell_View_New

function Gtk_Cell_View_New return Gtk_Cell_View

Creates a new Gtk.Cell_View.Gtk_Cell_View widget. Since: gtk+ 2.6

Return Value

Gtk_Cell_View_New_With_Context

function Gtk_Cell_View_New_With_Context
   (Area    : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class;
    Context : not null access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class)
    return Gtk_Cell_View

Creates a new Gtk.Cell_View.Gtk_Cell_View widget with a specific Gtk.Cell_Area.Gtk_Cell_Area to layout cells and a specific Gtk.Cell_Area_Context.Gtk_Cell_Area_Context. Specifying the same context for a handfull of cells lets the underlying area synchronize the geometry for those cells, in this way alignments with cellviews for other rows are possible. Since: gtk+ 2.6

Parameters
Area

the Gtk.Cell_Area.Gtk_Cell_Area to layout cells

Context

the Gtk.Cell_Area_Context.Gtk_Cell_Area_Context in which to calculate cell geometry

Return Value

Gtk_Cell_View_New_With_Markup

function Gtk_Cell_View_New_With_Markup
   (Markup : UTF8_String) return Gtk_Cell_View

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show Markup. The text can be marked up with the [Pango text markup language][PangoMarkupFormat]. Since: gtk+ 2.6

Parameters
Markup

the text to display in the cell view

Return Value

Gtk_Cell_View_New_With_Pixbuf

function Gtk_Cell_View_New_With_Pixbuf
   (Pixbuf : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class)
    return Gtk_Cell_View

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Pixbuf.Gtk_Cell_Renderer_Pixbuf to it, and makes it show Pixbuf. Since: gtk+ 2.6

Parameters
Pixbuf

the image to display in the cell view

Return Value

Gtk_Cell_View_New_With_Text

function Gtk_Cell_View_New_With_Text
   (Text : UTF8_String) return Gtk_Cell_View

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show Text. Since: gtk+ 2.6

Parameters
Text

the text to display in the cell view

Return Value

Gtk_Cell_View_Record

type Gtk_Cell_View_Record is new Gtk_Widget_Record with null record;

Gtk_New

procedure Gtk_New (Cell_View : out Gtk_Cell_View)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget. Since: gtk+ 2.6 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View

Gtk_New_With_Context

procedure Gtk_New_With_Context
   (Cell_View : out Gtk_Cell_View;
    Area      : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class;
    Context   : not null access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget with a specific Gtk.Cell_Area.Gtk_Cell_Area to layout cells and a specific Gtk.Cell_Area_Context.Gtk_Cell_Area_Context. Specifying the same context for a handfull of cells lets the underlying area synchronize the geometry for those cells, in this way alignments with cellviews for other rows are possible. Since: gtk+ 2.6 Initialize_With_Context does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Area

the Gtk.Cell_Area.Gtk_Cell_Area to layout cells

Context

the Gtk.Cell_Area_Context.Gtk_Cell_Area_Context in which to calculate cell geometry

Gtk_New_With_Markup

procedure Gtk_New_With_Markup
   (Cell_View : out Gtk_Cell_View;
    Markup    : UTF8_String)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show Markup. The text can be marked up with the [Pango text markup language][PangoMarkupFormat]. Since: gtk+ 2.6 Initialize_With_Markup does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Markup

the text to display in the cell view

Gtk_New_With_Pixbuf

procedure Gtk_New_With_Pixbuf
   (Cell_View : out Gtk_Cell_View;
    Pixbuf    : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Pixbuf.Gtk_Cell_Renderer_Pixbuf to it, and makes it show Pixbuf. Since: gtk+ 2.6 Initialize_With_Pixbuf does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Pixbuf

the image to display in the cell view

Gtk_New_With_Text

procedure Gtk_New_With_Text
   (Cell_View : out Gtk_Cell_View;
    Text      : UTF8_String)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show Text. Since: gtk+ 2.6 Initialize_With_Text does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Text

the text to display in the cell view

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Cell_View_Record, Gtk_Cell_View);

Implements_Gtk_Cell_Layout

package Implements_Gtk_Cell_Layout is new Glib.Types.Implements
  (Gtk.Cell_Layout.Gtk_Cell_Layout, Gtk_Cell_View_Record, Gtk_Cell_View);

Implements_Gtk_Orientable

package Implements_Gtk_Orientable is new Glib.Types.Implements
  (Gtk.Orientable.Gtk_Orientable, Gtk_Cell_View_Record, Gtk_Cell_View);

Initialize

procedure Initialize
   (Cell_View : not null access Gtk_Cell_View_Record'Class)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget. Since: gtk+ 2.6 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View

Initialize_With_Context

procedure Initialize_With_Context
   (Cell_View : not null access Gtk_Cell_View_Record'Class;
    Area      : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class;
    Context   : not null access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget with a specific Gtk.Cell_Area.Gtk_Cell_Area to layout cells and a specific Gtk.Cell_Area_Context.Gtk_Cell_Area_Context. Specifying the same context for a handfull of cells lets the underlying area synchronize the geometry for those cells, in this way alignments with cellviews for other rows are possible. Since: gtk+ 2.6 Initialize_With_Context does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Area

the Gtk.Cell_Area.Gtk_Cell_Area to layout cells

Context

the Gtk.Cell_Area_Context.Gtk_Cell_Area_Context in which to calculate cell geometry

Initialize_With_Markup

procedure Initialize_With_Markup
   (Cell_View : not null access Gtk_Cell_View_Record'Class;
    Markup    : UTF8_String)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show Markup. The text can be marked up with the [Pango text markup language][PangoMarkupFormat]. Since: gtk+ 2.6 Initialize_With_Markup does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Markup

the text to display in the cell view

Initialize_With_Pixbuf

procedure Initialize_With_Pixbuf
   (Cell_View : not null access Gtk_Cell_View_Record'Class;
    Pixbuf    : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Pixbuf.Gtk_Cell_Renderer_Pixbuf to it, and makes it show Pixbuf. Since: gtk+ 2.6 Initialize_With_Pixbuf does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Pixbuf

the image to display in the cell view

Initialize_With_Text

procedure Initialize_With_Text
   (Cell_View : not null access Gtk_Cell_View_Record'Class;
    Text      : UTF8_String)

Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show Text. Since: gtk+ 2.6 Initialize_With_Text does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Cell_View
Text

the text to display in the cell view

Model_Property

Model_Property : constant Glib.Properties.Property_Interface;

Type: Gtk.Tree_Model.Gtk_Tree_Model The model for cell view

since 2.10

Pack_End

procedure Pack_End
   (Cell_Layout : not null access Gtk_Cell_View_Record;
    Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
    Expand      : Boolean)
Parameters
Cell_Layout
Cell
Expand

Pack_Start

procedure Pack_Start
   (Cell_Layout : not null access Gtk_Cell_View_Record;
    Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
    Expand      : Boolean)
Parameters
Cell_Layout
Cell
Expand

Reorder

procedure Reorder
   (Cell_Layout : not null access Gtk_Cell_View_Record;
    Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
    Position    : Glib.Gint)
Parameters
Cell_Layout
Cell
Position

Set_Background_Color

procedure Set_Background_Color
   (Cell_View : not null access Gtk_Cell_View_Record;
    Color     : Gdk.Color.Gdk_Color)

Sets the background color of View. Since: gtk+ 2.6 Deprecated since 3.4, 1

Parameters
Cell_View
Color

the new background color

Set_Background_Rgba

procedure Set_Background_Rgba
   (Cell_View : not null access Gtk_Cell_View_Record;
    Rgba      : Gdk.RGBA.Gdk_RGBA)

Sets the background color of Cell_View. Since: gtk+ 3.0

Parameters
Cell_View
Rgba

the new background color

Set_Cell_Data_Func

procedure Set_Cell_Data_Func
   (Cell_Layout : not null access Gtk_Cell_View_Record;
    Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
    Func        : Gtk_Cell_Layout_Data_Func)

Sets the Gtk_Cell_Layout_Data_Func to use for Cell_Layout. This function is used instead of the standard attributes mapping for setting the column value, and should set the value of Cell_Layout's cell renderer(s) as appropriate. Func may be null to remove a previously set function. Since: gtk+ 2.4

Parameters
Cell_Layout
Cell

a Gtk.Cell_Renderer.Gtk_Cell_Renderer

Func

the Gtk_Cell_Layout_Data_Func to use, or null

Set_Displayed_Row

procedure Set_Displayed_Row
   (Cell_View : not null access Gtk_Cell_View_Record;
    Path      : Gtk.Tree_Model.Gtk_Tree_Path)

Sets the row of the model that is currently displayed by the Gtk.Cell_View.Gtk_Cell_View. If the path is unset, then the contents of the cellview "stick" at their last value; this is not normally a desired result, but may be a needed intermediate state if say, the model for the Gtk.Cell_View.Gtk_Cell_View becomes temporarily empty. Since: gtk+ 2.6

Parameters
Cell_View
Path

a Gtk.Tree_Model.Gtk_Tree_Path or null to unset.

Set_Draw_Sensitive

procedure Set_Draw_Sensitive
   (Cell_View      : not null access Gtk_Cell_View_Record;
    Draw_Sensitive : Boolean)

Sets whether Cell_View should draw all of its cells in a sensitive state, this is used by Gtk.Combo_Box.Gtk_Combo_Box menus to ensure that rows with insensitive cells that contain children appear sensitive in the parent menu item. Since: gtk+ 3.0

Parameters
Cell_View
Draw_Sensitive

whether to draw all cells in a sensitive state.

Set_Fit_Model

procedure Set_Fit_Model
   (Cell_View : not null access Gtk_Cell_View_Record;
    Fit_Model : Boolean)

Sets whether Cell_View should request space to fit the entire Gtk.Tree_Model.Gtk_Tree_Model. This is used by Gtk.Combo_Box.Gtk_Combo_Box to ensure that the cell view displayed on the combo box's button always gets enough space and does not resize when selection changes. Since: gtk+ 3.0

Parameters
Cell_View
Fit_Model

whether Cell_View should request space for the whole model.

Set_Model

procedure Set_Model
   (Cell_View : not null access Gtk_Cell_View_Record;
    Model     : Gtk.Tree_Model.Gtk_Tree_Model)

Sets the model for Cell_View. If Cell_View already has a model set, it will remove it before setting the new model. If Model is null, then it will unset the old model. Since: gtk+ 2.6

Parameters
Cell_View
Model

a Gtk.Tree_Model.Gtk_Tree_Model

Set_Orientation

procedure Set_Orientation
   (Self        : not null access Gtk_Cell_View_Record;
    Orientation : Gtk.Enums.Gtk_Orientation)
Parameters
Self
Orientation