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 [tree widget conceptual overview][TreeWidget] for an overview of all the objects and data types related to the tree widget and how they work together.
function "+"
(Widget : access Gtk_Tree_View_Column_Record'Class)
return Gtk.Buildable.Gtk_Buildable
function "+"
(Widget : access Gtk_Tree_View_Column_Record'Class)
return Gtk.Cell_Layout.Gtk_Cell_Layout
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Tree_View_Column
function "-"
(Interf : Gtk.Cell_Layout.Gtk_Cell_Layout)
return Gtk_Tree_View_Column
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 : Glib.Gint)
Alignment_Property : constant Glib.Properties.Property_Float;
type Cb_GObject_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Tree_View_Column_Void is not null access procedure
(Self : access Gtk_Tree_View_Column_Record'Class);
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.
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 Glib.Gint;
Width : out Glib.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.
a Gtk.Cell_Renderer.Gtk_Cell_Renderer
return location for the horizontal position of Cell within Tree_Column, may be null
return location for the width of Cell, may be null @return True if Cell belongs to Tree_Column.
procedure Cell_Get_Size
(Tree_Column : not null access Gtk_Tree_View_Column_Record;
Cell_Area : Gdk.Rectangle.Gdk_Rectangle;
X_Offset : out Glib.Gint;
Y_Offset : out Glib.Gint;
Width : out Glib.Gint;
Height : out Glib.Gint)
Obtains the width and height needed to render the column. This is used primarily by the Gtk.Tree_View.Gtk_Tree_View.
The area a cell in the column will be allocated, or null
location to return x offset of a cell relative to Cell_Area, or null
location to return y offset of a cell relative to Cell_Area, or null
location to return width needed to render a cell, or null
location to return height needed to render a cell, or null
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
True, if any of the cells packed into the Tree_Column are currently visible
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.
The Gtk.Tree_Model.Gtk_Tree_Model to to get the cell renderers attributes from.
The Gtk.Tree_Model.Gtk_Tree_Iter to to get the cell renderer's attributes from.
True, if the row has children
True, if the row has visible children
procedure Clear
(Cell_Layout : not null access Gtk_Tree_View_Column_Record)
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)
Clickable_Property : constant Glib.Properties.Property_Boolean;
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.
package Column_List is new Generic_List (Gtk.Tree_View_Column.Gtk_Tree_View_Column);
function Convert (R : Gtk.Tree_View_Column.Gtk_Tree_View_Column) return System.Address
function Convert (R : System.Address) return Gtk.Tree_View_Column.Gtk_Tree_View_Column
Expand_Property : constant Glib.Properties.Property_Boolean;
Fixed_Width_Property : constant Glib.Properties.Property_Int;
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
A Gtk.Cell_Renderer.Gtk_Cell_Renderer
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.
The current alignent of Tree_Column.
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
The button for the column header.
function Get_Cells
(Cell_Layout : not null access Gtk_Tree_View_Column_Record)
return Gtk.Cell_Renderer.Cell_Renderer_List.Glist
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.
True if user can click the column header.
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
True if the column expands to fill available space.
function Get_Fixed_Width
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Glib.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.
The fixed width of the column.
function Get_Max_Width
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Glib.Gint
Returns the maximum width in pixels of the Tree_Column, or -1 if no maximum width is set.
The maximum width of the Tree_Column.
function Get_Min_Width
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Glib.Gint
Returns the minimum width in pixels of the Tree_Column, or -1 if no minimum width is set.
The minimum width of the Tree_Column.
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.
True if the Tree_Column can be reordered by the user.
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.
True, if the Tree_Column can be resized.
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.
The type of Tree_Column.
function Get_Sort_Column_Id
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Glib.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.
the current Sort_Column_Id for this column, or -1 if this column can't be used for sorting.
function Get_Sort_Indicator
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Boolean
Gets the value set by Gtk.Tree_View_Column.Set_Sort_Indicator.
whether the sort indicator arrow is displayed
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.
the sort order the sort indicator is indicating
function Get_Spacing
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Glib.Gint
Returns the spacing of Tree_Column.
the spacing of Tree_Column.
function Get_Title
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return UTF8_String
Returns the title of the widget.
the title of the column. This string should not be modified or freed.
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
The tree view wherein Column has been inserted if any, null otherwise.
function Get_Type return Glib.GType
function Get_Visible
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Boolean
Returns True if Tree_Column is visible.
whether the column is visible or not. If it is visible, then the tree will show the column.
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.
The Gtk.Widget.Gtk_Widget in the column header, or null
function Get_Width
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Glib.Gint
Returns the current size of Tree_Column in pixels.
The current width of Tree_Column.
function Get_X_Offset
(Tree_Column : not null access Gtk_Tree_View_Column_Record)
return Glib.Gint
Returns the current X offset of Tree_Column in pixels. Since: gtk+ 3.2
The current X offset of Tree_Column.
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.
a Gtk.Cell_Layout.Gtk_Cell_Layout
the cell renderer whose value is to be set
the model
a Gtk.Tree_Model.Gtk_Tree_Iter indicating the row to set the value for
procedure Gtk_New (Tree_Column : out Gtk_Tree_View_Column)
Creates a new Gtk.Tree_View_Column.Gtk_Tree_View_Column. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Gtk_New_With_Area
(Tree_Column : out Gtk_Tree_View_Column;
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 Initialize_With_Area does nothing if the object was already created with another call to Initialize* or G_New.
the Gtk.Cell_Area.Gtk_Cell_Area that the newly created column should use to layout cells.
type Gtk_Tree_View_Column is access all Gtk_Tree_View_Column_Record'Class;
function Gtk_Tree_View_Column_New return Gtk_Tree_View_Column
Creates a new Gtk.Tree_View_Column.Gtk_Tree_View_Column.
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
the Gtk.Cell_Area.Gtk_Cell_Area that the newly created column should use to layout cells.
type Gtk_Tree_View_Column_Record is new GObject_Record with null record;
type Gtk_Tree_View_Column_Sizing is (
Tree_View_Column_Grow_Only,
Tree_View_Column_Autosize,
Tree_View_Column_Fixed);
The sizing method the column uses to determine its width. Please note that Gtk_Tree_View_Column_Autosize are inefficient for large views, and can make columns appear choppy.
package Gtk_Tree_View_Column_Sizing_Properties is
new Generic_Internal_Discrete_Property (Gtk_Tree_View_Column_Sizing);
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Tree_View_Column_Record, Gtk_Tree_View_Column);
package Implements_Gtk_Cell_Layout is new Glib.Types.Implements
(Gtk.Cell_Layout.Gtk_Cell_Layout, Gtk_Tree_View_Column_Record, Gtk_Tree_View_Column);
procedure Initialize
(Tree_Column : not null access Gtk_Tree_View_Column_Record'Class)
Creates a new Gtk.Tree_View_Column.Gtk_Tree_View_Column. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
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 Initialize_With_Area does nothing if the object was already created with another call to Initialize* or G_New.
the Gtk.Cell_Area.Gtk_Cell_Area that the newly created column should use to layout cells.
Max_Width_Property : constant Glib.Properties.Property_Int;
Min_Width_Property : constant Glib.Properties.Property_Int;
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)
procedure On_Clicked
(Self : not null access Gtk_Tree_View_Column_Record;
Call : Cb_Gtk_Tree_View_Column_Void;
After : Boolean := False)
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)
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)
type Property_Gtk_Tree_View_Column_Sizing is new Gtk_Tree_View_Column_Sizing_Properties.Property;
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
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 : Glib.Gint)
Reorderable_Property : constant Glib.Properties.Property_Boolean;
Resizable_Property : constant Glib.Properties.Property_Boolean;
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.
The alignment, which is between [0.0 and 1.0] inclusive.
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
a Gtk.Cell_Renderer.Gtk_Cell_Renderer
the Gtk_Cell_Layout_Data_Func to use, or null
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.
True if the header is active.
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
True if the column should expand to fill available space.
procedure Set_Fixed_Width
(Tree_Column : not null access Gtk_Tree_View_Column_Record;
Fixed_Width : Glib.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 minimum 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.
The new fixed width, in pixels, or -1.
procedure Set_Max_Width
(Tree_Column : not null access Gtk_Tree_View_Column_Record;
Max_Width : Glib.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.
The maximum width of the column in pixels, or -1.
procedure Set_Min_Width
(Tree_Column : not null access Gtk_Tree_View_Column_Record;
Min_Width : Glib.Gint)
Sets the minimum width of the Tree_Column. If Min_Width is -1, then the minimum width is unset.
The minimum width of the column in pixels, or -1.
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.
True, if the column can be reordered.
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.
True, if the column can be resized
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.
The Gtk.Tree_View_Column.Gtk_Tree_View_Column_Sizing.
procedure Set_Sort_Column_Id
(Tree_Column : not null access Gtk_Tree_View_Column_Record;
Sort_Column_Id : Glib.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.
The Sort_Column_Id of the model to sort on.
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.
True to display an indicator that the column is sorted
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.
sort order that the sort indicator should indicate
procedure Set_Spacing
(Tree_Column : not null access Gtk_Tree_View_Column_Record;
Spacing : Glib.Gint)
Sets the spacing field of Tree_Column, which is the number of pixels to place between cell renderers packed into it.
distance between cell renderers in pixels.
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.
The title of the Tree_Column.
procedure Set_Visible
(Tree_Column : not null access Gtk_Tree_View_Column_Record;
Visible : Boolean)
Sets the visibility of Tree_Column.
True if the Tree_Column is visible.
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.
A child Gtk.Widget.Gtk_Widget, or null.
Signal_Clicked : constant Glib.Signal_Name := "clicked";
Sizing_Property : constant Gtk.Tree_View_Column.Property_Gtk_Tree_View_Column_Sizing;
Type: Gtk_Tree_View_Column_Sizing
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 : constant Glib.Properties.Property_Boolean;
Sort_Order_Property : constant Gtk.Enums.Property_Gtk_Sort_Type;
Spacing_Property : constant Glib.Properties.Property_Int;
Title_Property : constant Glib.Properties.Property_String;
Visible_Property : constant Glib.Properties.Property_Boolean;
Widget_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Widget.Gtk_Widget
Width_Property : constant Glib.Properties.Property_Int;
X_Offset_Property : constant Glib.Properties.Property_Int;