Index

Package: Tree_View_Column

Description

package Gtk.Tree_View_Column is

The GtkTreeViewColumn object represents a visible column in a Gtk.Tree_View.Gtk_Tree_View widget. It allows to set properties of the column header, and functions as a holding pen for the cell renderers which determine how the data in the column is displayed.

Please refer to the <link linkend="TreeWidget">tree widget conceptual overview</link> for an overview of all the objects and data types related to the tree widget and how they work together.

Packages

Column_List (new Glib.Glist.Generic_List)

Gtk_Tree_View_Column_Sizing_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gtk_Tree_View_Column_Sizing_Properties is
      new Generic_Internal_Discrete_Property (Gtk_Tree_View_Column_Sizing);

Set_Cell_Data_Func_User_Data (generic)

Implements_Gtk_Buildable (new Glib.Types.Implements)

Implements_Gtk_Cell_Layout (new Glib.Types.Implements)

Classes

Gtk_Tree_View_Column_Record

type Gtk_Tree_View_Column_Record is new GObject_Record with null record;

Ancestors:

Primitive operations:

Add_Attribute
Cell_Get_Position
Cell_Get_Size
Cell_Is_Visible
Cell_Set_Cell_Data
Clear_Attributes
Get_Alignment
Get_Clickable
Get_Fixed_Width
Get_Max_Width
Get_Min_Width
Get_Reorderable
Get_Resizable
Get_Sort_Column_Id
Get_Sort_Indicator
Get_Sort_Order
Get_Tree_View
Get_X_Offset
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)
Queue_Resize
Set_Alignment
Set_Cell_Data_Func
Set_Clickable
Set_Fixed_Width
Set_Max_Width
Set_Min_Width
Set_Reorderable
Set_Resizable
Set_Sort_Column_Id
Set_Sort_Indicator
Set_Sort_Order

Types

Gtk_Tree_View_Column

type Gtk_Tree_View_Column is access all Gtk_Tree_View_Column_Record'Class;

Gtk_Tree_View_Column_Sizing

type Gtk_Tree_View_Column_Sizing is (
      Tree_View_Column_Grow_Only,
      Tree_View_Column_Autosize,
      Tree_View_Column_Fixed);

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. "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

Property_Gtk_Tree_View_Column_Sizing

type Property_Gtk_Tree_View_Column_Sizing is new Gtk_Tree_View_Column_Sizing_Properties.Property;

Cb_Gtk_Tree_View_Column_Void

type Cb_Gtk_Tree_View_Column_Void is not null access procedure
     (Self : access Gtk_Tree_View_Column_Record'Class);

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
     (Self : access Glib.Object.GObject_Record'Class);

Constants & Global variables

Cell_Area_Property (Glib.Properties.Property_Object)

Cell_Area_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Cell_Area.Gtk_Cell_Area The Gtk.Cell_Area.Gtk_Cell_Area used to layout cell renderers for this column. If no area is specified when creating the tree view column with Gtk.Tree_View_Column.Gtk_New_With_Area a horizontally oriented Gtk.Cell_Area_Box.Gtk_Cell_Area_Box will be used.

Fixed_Width_Property (Glib.Properties.Property_Int)

Fixed_Width_Property : constant Glib.Properties.Property_Int;

Max_Width_Property (Glib.Properties.Property_Int)

Max_Width_Property : constant Glib.Properties.Property_Int;

Min_Width_Property (Glib.Properties.Property_Int)

Min_Width_Property : constant Glib.Properties.Property_Int;

Reorderable_Property (Glib.Properties.Property_Boolean)

Reorderable_Property : constant Glib.Properties.Property_Boolean;

Sort_Column_Id_Property (Glib.Properties.Property_Int)

Sort_Column_Id_Property : constant Glib.Properties.Property_Int;
Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header clickable. Set to -1 to make the column unsortable.

Sort_Indicator_Property (Glib.Properties.Property_Boolean)

Sort_Indicator_Property : constant Glib.Properties.Property_Boolean;

Signal_Clicked (Glib.Signal_Name)

Signal_Clicked : constant Glib.Signal_Name := "clicked";

Subprograms & Entries

Convert

function Convert 
(R: Gtk.Tree_View_Column.Gtk_Tree_View_Column) return System.Address;

Convert

function Convert 
(R: System.Address) return Gtk.Tree_View_Column.Gtk_Tree_View_Column;

Gtk_New

procedure Gtk_New 
(Tree_Column: out Gtk_Tree_View_Column);

Initialize

procedure Initialize 
(Tree_Column: not null access Gtk_Tree_View_Column_Record'Class);

Gtk_Tree_View_Column_New

function Gtk_Tree_View_Column_New return Gtk_Tree_View_Column;

Gtk_New_With_Area

procedure Gtk_New_With_Area 
(Tree_Column: out Gtk_Tree_View_Column;
Area: not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class);

Initialize_With_Area

procedure Initialize_With_Area 
(Tree_Column: not null access Gtk_Tree_View_Column_Record'Class;
Area: not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class);
Creates a new Gtk.Tree_View_Column.Gtk_Tree_View_Column using Area to render its cells. Since: gtk+ 3.0 "area": the Gtk.Cell_Area.Gtk_Cell_Area that the newly created column should use to layout cells.

Gtk_Tree_View_Column_New_With_Area

function Gtk_Tree_View_Column_New_With_Area 
(Area: not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class) return Gtk_Tree_View_Column;
Creates a new Gtk.Tree_View_Column.Gtk_Tree_View_Column using Area to render its cells. Since: gtk+ 3.0 "area": the Gtk.Cell_Area.Gtk_Cell_Area that the newly created column should use to layout cells.

Get_Type

function Get_Type return Glib.GType;

Cell_Get_Position

procedure Cell_Get_Position 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Cell_Renderer: not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
X_Offset: out Gint;
Width: out Gint;
Success: out Boolean);
Obtains the horizontal position and size of a cell in a column. If the cell is not found in the column, Start_Pos and Width are not changed and False is returned. "cell_renderer": a Gtk.Cell_Renderer.Gtk_Cell_Renderer "x_offset": return location for the horizontal position of Cell within Tree_Column, may be null "width": return location for the width of Cell, may be null

Cell_Get_Size

procedure Cell_Get_Size 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Cell_Area: Gdk.Rectangle.Gdk_Rectangle;
X_Offset: out Gint;
Y_Offset: out Gint;
Width: out Gint;
Height: out Gint);
Obtains the width and height needed to render the column. This is used primarily by the Gtk.Tree_View.Gtk_Tree_View. "cell_area": The area a cell in the column will be allocated, or null "x_offset": location to return x offset of a cell relative to Cell_Area, or null "y_offset": location to return y offset of a cell relative to Cell_Area, or null "width": location to return width needed to render a cell, or null "height": location to return height needed to render a cell, or null

Cell_Is_Visible

function Cell_Is_Visible 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Boolean;
Returns True if any of the cells packed into the Tree_Column are visible. For this to be meaningful, you must first initialize the cells with Gtk.Tree_View_Column.Cell_Set_Cell_Data

Cell_Set_Cell_Data

procedure Cell_Set_Cell_Data 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Tree_Model: Gtk.Tree_Model.Gtk_Tree_Model;
Iter: Gtk.Tree_Model.Gtk_Tree_Iter;
Is_Expander: Boolean;
Is_Expanded: Boolean);
Sets the cell renderer based on the Tree_Model and Iter. That is, for every attribute mapping in Tree_Column, it will get a value from the set column on the Iter, and use that value to set the attribute on the cell renderer. This is used primarily by the Gtk.Tree_View.Gtk_Tree_View. "tree_model": The Gtk.Tree_Model.Gtk_Tree_Model to to get the cell renderers attributes from. "iter": The Gtk.Tree_Model.Gtk_Tree_Iter to to get the cell renderer's attributes from. "is_expander": True, if the row has children "is_expanded": True, if the row has visible children

Clicked

procedure Clicked 
(Tree_Column: not null access Gtk_Tree_View_Column_Record);
Emits the "clicked" signal on the column. This function will only work if Tree_Column is clickable.

Focus_Cell

procedure Focus_Cell 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Cell: not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class);
Sets the current keyboard focus to be at Cell, if the column contains 2 or more editable and activatable cells. Since: gtk+ 2.2 "cell": A Gtk.Cell_Renderer.Gtk_Cell_Renderer

Get_Alignment

function Get_Alignment 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gfloat;
Returns the current x alignment of Tree_Column. This value can range between 0.0 and 1.0.

Set_Alignment

procedure Set_Alignment 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Xalign: Gfloat);
Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -- 0.0 for left, 0.5 for center, 1.0 for right. "xalign": The alignment, which is between [0.0 and 1.0] inclusive.

Get_Button

function Get_Button 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gtk.Widget.Gtk_Widget;
Returns the button used in the treeview column header Since: gtk+ 3.0

Get_Clickable

function Get_Clickable 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Boolean;
Returns True if the user can click on the header for the column.

Set_Clickable

procedure Set_Clickable 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Clickable: Boolean);
Sets the header to be active if Clickable is True. When the header is active, then it can take keyboard focus, and can be clicked. "clickable": True if the header is active.

Get_Expand

function Get_Expand 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Boolean;
Returns True if the column expands to fill available space. Since: gtk+ 2.4

Set_Expand

procedure Set_Expand 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Expand: Boolean);
Sets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to True. If no column has this option set, then the last column gets all extra space. By default, every column is created with this False. Along with "fixed-width", the "expand" property changes when the column is resized by the user. Since: gtk+ 2.4 "expand": True if the column should expand to fill available space.

Get_Fixed_Width

function Get_Fixed_Width 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gint;
Gets the fixed width of the column. This may not be the actual displayed width of the column; for that, use Gtk.Tree_View_Column.Get_Width.

Set_Fixed_Width

procedure Set_Fixed_Width 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Fixed_Width: Gint);
If Fixed_Width is not -1, sets the fixed width of Tree_Column; otherwise unsets it. The effective value of Fixed_Width is clamped between the minumum and maximum width of the column; however, the value stored in the "fixed-width" property is not clamped. If the column sizing is GTK_TREE_VIEW_COLUMN_GROW_ONLY or GTK_TREE_VIEW_COLUMN_AUTOSIZE, setting a fixed width overrides the automatically calculated width. Note that Fixed_Width is only a hint to GTK+; the width actually allocated to the column may be greater or less than requested. Along with "expand", the "fixed-width" property changes when the column is resized by the user. "fixed_width": The new fixed width, in pixels, or -1.

Get_Max_Width

function Get_Max_Width 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gint;
Returns the maximum width in pixels of the Tree_Column, or -1 if no maximum width is set.

Set_Max_Width

procedure Set_Max_Width 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Max_Width: Gint);
Sets the maximum width of the Tree_Column. If Max_Width is -1, then the maximum width is unset. Note, the column can actually be wider than max width if it's the last column in a view. In this case, the column expands to fill any extra space. "max_width": The maximum width of the column in pixels, or -1.

Get_Min_Width

function Get_Min_Width 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gint;
Returns the minimum width in pixels of the Tree_Column, or -1 if no minimum width is set.

Set_Min_Width

procedure Set_Min_Width 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Min_Width: Gint);
Sets the minimum width of the Tree_Column. If Min_Width is -1, then the minimum width is unset. "min_width": The minimum width of the column in pixels, or -1.

Get_Reorderable

function Get_Reorderable 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Boolean;
Returns True if the Tree_Column can be reordered by the user.

Set_Reorderable

procedure Set_Reorderable 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Reorderable: Boolean);
If Reorderable is True, then the column can be reordered by the end user dragging the header. "reorderable": True, if the column can be reordered.

Get_Resizable

function Get_Resizable 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Boolean;
Returns True if the Tree_Column can be resized by the end user.

Set_Resizable

procedure Set_Resizable 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Resizable: Boolean);
If Resizable is True, then the user can explicitly resize the column by grabbing the outer edge of the column button. If resizable is True and sizing mode of the column is GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing mode is changed to GTK_TREE_VIEW_COLUMN_GROW_ONLY. "resizable": True, if the column can be resized

Get_Sizing

function Get_Sizing 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gtk_Tree_View_Column_Sizing;
Returns the current type of Tree_Column.

Set_Sizing

procedure Set_Sizing 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
The_Type: Gtk_Tree_View_Column_Sizing);
Sets the growth behavior of Tree_Column to Type. "type": The Gtk.Tree_View_Column.Gtk_Tree_View_Column_Sizing.

Get_Sort_Column_Id

function Get_Sort_Column_Id 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gint;
Gets the logical Sort_Column_Id that the model sorts on when this column is selected for sorting. See Gtk.Tree_View_Column.Set_Sort_Column_Id.

Set_Sort_Column_Id

procedure Set_Sort_Column_Id 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Sort_Column_Id: Gint);
Sets the logical Sort_Column_Id that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable. "sort_column_id": The Sort_Column_Id of the model to sort on.

Get_Sort_Indicator

function Get_Sort_Indicator 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Boolean;

Set_Sort_Indicator

procedure Set_Sort_Indicator 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Setting: Boolean);
Call this function with a Setting of True to display an arrow in the header button indicating the column is sorted. Call Gtk.Tree_View_Column.Set_Sort_Order to change the direction of the arrow. "setting": True to display an indicator that the column is sorted

Get_Sort_Order

function Get_Sort_Order 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gtk.Enums.Gtk_Sort_Type;
Gets the value set by Gtk.Tree_View_Column.Set_Sort_Order.

Set_Sort_Order

procedure Set_Sort_Order 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Order: Gtk.Enums.Gtk_Sort_Type);
Changes the appearance of the sort indicator. This *does not* actually sort the model. Use Gtk.Tree_View_Column.Set_Sort_Column_Id if you want automatic sorting support. This function is primarily for custom sorting behavior, and should be used in conjunction with Gtk.Tree_Sortable.Set_Sort_Column_Id to do that. For custom models, the mechanism will vary. The sort indicator changes direction to indicate normal sort or reverse sort. Note that you must have the sort indicator enabled to see anything when calling this function; see Gtk.Tree_View_Column.Set_Sort_Indicator. "order": sort order that the sort indicator should indicate

Get_Spacing

function Get_Spacing 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gint;
Returns the spacing of Tree_Column.

Set_Spacing

procedure Set_Spacing 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Spacing: Gint);
Sets the spacing field of Tree_Column, which is the number of pixels to place between cell renderers packed into it. "spacing": distance between cell renderers in pixels.

Get_Title

function Get_Title 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return UTF8_String;
Returns the title of the widget.

Set_Title

procedure Set_Title 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Title: UTF8_String);
Sets the title of the Tree_Column. If a custom widget has been set, then this value is ignored. "title": The title of the Tree_Column.

Get_Tree_View

function Get_Tree_View 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gtk.Widget.Gtk_Widget;
Returns the Gtk.Tree_View.Gtk_Tree_View wherein Tree_Column has been inserted. If Column is currently not inserted in any tree view, null is returned. Since: gtk+ 2.12

Get_Visible

function Get_Visible 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Boolean;
Returns True if Tree_Column is visible.

Set_Visible

procedure Set_Visible 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Visible: Boolean);
Sets the visibility of Tree_Column. "visible": True if the Tree_Column is visible.

Get_Widget

function Get_Widget 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gtk.Widget.Gtk_Widget;
Returns the Gtk.Widget.Gtk_Widget in the button on the column header. If a custom widget has not been set then null is returned.

Set_Widget

procedure Set_Widget 
(Tree_Column: not null access Gtk_Tree_View_Column_Record;
Widget: access Gtk.Widget.Gtk_Widget_Record'Class);
Sets the widget in the header to be Widget. If widget is null, then the header button is set with a Gtk.Label.Gtk_Label set to the title of Tree_Column. "widget": A child Gtk.Widget.Gtk_Widget, or null.

Get_Width

function Get_Width 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gint;
Returns the current size of Tree_Column in pixels.

Get_X_Offset

function Get_X_Offset 
(Tree_Column: not null access Gtk_Tree_View_Column_Record) return Gint;
Returns the current X offset of Tree_Column in pixels. Since: gtk+ 3.2

Queue_Resize

procedure Queue_Resize 
(Tree_Column: not null access Gtk_Tree_View_Column_Record);
Flags the column, and the cell renderers added to this column, to have their sizes renegotiated. Since: gtk+ 2.8

Set_Cell_Data_Func

procedure Set_Cell_Data_Func 
(Cell_Layout: not null access Gtk_Tree_View_Column_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 "cell": a Gtk.Cell_Renderer.Gtk_Cell_Renderer "func": the Gtk_Cell_Layout_Data_Func to use, or null

Add_Attribute

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

Clear

procedure Clear 
(Cell_Layout: not null access Gtk_Tree_View_Column_Record);

Clear_Attributes

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

Get_Cells

function Get_Cells 
(Cell_Layout: not null access Gtk_Tree_View_Column_Record) return Glib.Object.Object_Simple_List.Glist;

Pack_End

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

Pack_Start

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

Reorder

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

On_Clicked

procedure On_Clicked 
(Self: not null access Gtk_Tree_View_Column_Record;
Call: Cb_Gtk_Tree_View_Column_Void;
After: Boolean := False);

On_Clicked

procedure On_Clicked 
(Self: not null access Gtk_Tree_View_Column_Record;
Call: Cb_GObject_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);