Represents the columns in a GtkColumnView.
The main ingredient for a GtkColumnViewColumn is the GtkListItemFactory that tells the columnview how to create cells for this column from items in the model.
Columns have a title, and can optionally have a header menu set with [methodGtk.ColumnViewColumn.set_header_menu].
A sorter can be associated with a column using [methodGtk.ColumnViewColumn.set_sorter], to let users influence sorting by clicking on the column header.
Column_View_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Column_View.Gtk_Column_View The GtkColumnView this column is a part of.
Expand_Property : constant Glib.Properties.Property_Boolean;
Column gets share of extra width allocated to the view.
Factory_Property : constant Glib.Properties.Property_Object;
Type: Gtk.List_Item_Factory.Gtk_List_Item_Factory Factory for populating list items.
The factory must be for configuring [classGtk.ColumnViewCell] objects.
Fixed_Width_Property : constant Glib.Properties.Property_Int;
If not -1, this is the width that the column is allocated, regardless of the size of its content.
function Get_Column_View
(Self : not null access Gtk_Column_View_Column_Record)
return Gtk.Column_View.Gtk_Column_View
Gets the column view that's currently displaying this column. If Self has not been added to a column view yet, NULL is returned.
The column view displaying Self. Has transfer-ownership='none'.
function Get_Expand
(Self : not null access Gtk_Column_View_Column_Record) return Boolean
Returns whether this column should expand.
true if this column expands
function Get_Factory
(Self : not null access Gtk_Column_View_Column_Record)
return Gtk.List_Item_Factory.Gtk_List_Item_Factory
Gets the factory that's currently used to populate list items for this column.
The factory in use. Has transfer-ownership='none'.
function Get_Fixed_Width
(Self : not null access Gtk_Column_View_Column_Record)
return Glib.Gint
Gets the fixed width of the column.
the fixed with of the column
function Get_Header_Menu
(Self : not null access Gtk_Column_View_Column_Record)
return Glib.Menu_Model.Gmenu_Model
Gets the menu model that is used to create the context menu for the column header.
the GMenuModel. Has transfer-ownership='none'.
function Get_Id
(Self : not null access Gtk_Column_View_Column_Record)
return UTF8_String
Returns the ID set with [methodGtk.ColumnViewColumn.set_id]. Since: gtk+ 4.10
The column's ID
function Get_Resizable
(Self : not null access Gtk_Column_View_Column_Record) return Boolean
Returns whether this column is resizable.
true if this column is resizable
function Get_Sorter
(Self : not null access Gtk_Column_View_Column_Record)
return Gtk.Sorter.Gtk_Sorter
Returns the sorter that is associated with the column.
the GtkSorter of Self. Has transfer-ownership='none'.
function Get_Title
(Self : not null access Gtk_Column_View_Column_Record)
return UTF8_String
Returns the title set with [methodGtk.ColumnViewColumn.set_title].
The column's title
function Get_Type return Glib.GType
function Get_Visible
(Self : not null access Gtk_Column_View_Column_Record) return Boolean
Returns whether this column is visible.
true if this column is visible
type Gtk_Column_View_Column is access all Gtk_Column_View_Column_Record'Class;
function Gtk_Column_View_Column_New
(Title : UTF8_String := "";
Factory : access Gtk.List_Item_Factory.Gtk_List_Item_Factory_Record'Class)
return Gtk_Column_View_Column
Creates a new GtkColumnViewColumn that uses the given Factory for mapping items to widgets. You most likely want to call [methodGtk.ColumnView.append_column] next. The function takes ownership of the argument, so you can write code like:
gtk_builder_list_item_factory_new_from_resource ("/name.ui")); ```
Title to use for this column
The factory to populate items with. Has transfer-ownership='full'.
type Gtk_Column_View_Column_Record is new GObject_Record with null record;
procedure Gtk_New
(Self : out Gtk_Column_View_Column;
Title : UTF8_String := "";
Factory : access Gtk.List_Item_Factory.Gtk_List_Item_Factory_Record'Class)
Creates a new GtkColumnViewColumn that uses the given Factory for mapping items to widgets. You most likely want to call [methodGtk.ColumnView.append_column] next. The function takes ownership of the argument, so you can write code like:
gtk_builder_list_item_factory_new_from_resource ("/name.ui")); ```
Initialize does nothing if the object was already created with another
call to Initialize* or G_New.
Title to use for this column
The factory to populate items with. Has transfer-ownership='full'.
Header_Menu_Property : constant Glib.Properties.Property_Boxed;
Type: Gio.Menu_Model Menu model used to create the context menu for the column header.
Id_Property : constant Glib.Properties.Property_String;
An ID for the column.
GTK is not currently using the ID for anything, but it can be used by applications when saving column view configurations.
It is up to applications to ensure uniqueness of IDs.
procedure Initialize
(Self : not null access Gtk_Column_View_Column_Record'Class;
Title : UTF8_String := "";
Factory : access Gtk.List_Item_Factory.Gtk_List_Item_Factory_Record'Class)
Creates a new GtkColumnViewColumn that uses the given Factory for mapping items to widgets. You most likely want to call [methodGtk.ColumnView.append_column] next. The function takes ownership of the argument, so you can write code like:
gtk_builder_list_item_factory_new_from_resource ("/name.ui")); ```
Initialize does nothing if the object was already created with another
call to Initialize* or G_New.
Title to use for this column
The factory to populate items with. Has transfer-ownership='full'.
Resizable_Property : constant Glib.Properties.Property_Boolean;
Whether this column is resizable.
procedure Set_Expand
(Self : not null access Gtk_Column_View_Column_Record;
Expand : Boolean)
Sets the column to take available extra space. The extra space is shared equally amongst all columns that have are set to expand.
whether this column should expand to fill available space
procedure Set_Factory
(Self : not null access Gtk_Column_View_Column_Record;
Factory : access Gtk.List_Item_Factory.Gtk_List_Item_Factory_Record'Class)
Sets the GtkListItemFactory to use for populating list items for this column.
the factory to use
procedure Set_Fixed_Width
(Self : not null access Gtk_Column_View_Column_Record;
Fixed_Width : Glib.Gint)
Sets the fixed width of the column. If Fixed_Width is -1, the fixed width of the column is unset. Setting a fixed width overrides the automatically calculated width. Interactive resizing also sets the "fixed-width" property.
the new fixed width, or -1
procedure Set_Header_Menu
(Self : not null access Gtk_Column_View_Column_Record;
Menu : access Glib.Menu_Model.Gmenu_Model_Record'Class)
Sets the menu model that is used to create the context menu for the column header.
a GMenuModel
procedure Set_Id
(Self : not null access Gtk_Column_View_Column_Record;
Id : UTF8_String := "")
Sets the id of this column. GTK makes no use of this, but applications can use it when storing column view configuration. It is up to callers to ensure uniqueness of IDs. Since: gtk+ 4.10
ID to use for this column
procedure Set_Resizable
(Self : not null access Gtk_Column_View_Column_Record;
Resizable : Boolean)
Sets whether this column should be resizable by dragging.
whether this column should be resizable
procedure Set_Sorter
(Self : not null access Gtk_Column_View_Column_Record;
Sorter : access Gtk.Sorter.Gtk_Sorter_Record'Class)
Associates a sorter with the column. If Sorter is unset, the column will not let users change the sorting by clicking on its header. This sorter can be made active by clicking on the column header, or by calling [methodGtk.ColumnView.sort_by_column]. See [methodGtk.ColumnView.get_sorter] for the necessary steps for setting up customizable sorting for [classGtk.ColumnView].
the GtkSorter to associate with Column
procedure Set_Title
(Self : not null access Gtk_Column_View_Column_Record;
Title : UTF8_String := "")
Sets the title of this column. The title is displayed in the header of a GtkColumnView for this column and is therefore user-facing text that should be translated.
Title to use for this column
procedure Set_Visible
(Self : not null access Gtk_Column_View_Column_Record;
Visible : Boolean)
Sets whether this column should be visible in views.
whether this column should be visible
Sorter_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Sorter.Gtk_Sorter Sorter for sorting items according to this column.
Title_Property : constant Glib.Properties.Property_String;
Title displayed in the header.
Visible_Property : constant Glib.Properties.Property_Boolean;
Whether this column is visible.