| Top |
| GtkColumnView * | column-view | Read |
| gboolean | expand | Read / Write |
| GtkListItemFactory * | factory | Read / Write |
| int | fixed-width | Read / Write |
| GMenuModel * | header-menu | Read / Write |
| gboolean | resizable | Read / Write |
| GtkSorter * | sorter | Read / Write |
| char * | title | Read / Write |
| gboolean | visible | Read / Write |
GtkColumnViewColumn represents the columns being added to GtkColumnView.
Columns have a title, and can optionally have a header menu set
with gtk_column_view_column_set_header_menu().
A sorter can be associated with a column using
gtk_column_view_column_set_sorter(), to let users influence sorting by
clicking on the column header.
GtkColumnViewColumn * gtk_column_view_column_new (const char *title,GtkListItemFactory *factory);
Creates a new GtkColumnViewColumn that uses the given factory
for
mapping items to widgets.
You most likely want to call gtk_column_add_column() next.
The function takes ownership of the
argument, so you can write code like
column = gtk_column_view_column_new (_("Name"),
gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
GtkColumnView *
gtk_column_view_column_get_column_view
(GtkColumnViewColumn *self);
Gets the column view that's currently displaying this column.
If self
has not been added to a column view yet, NULL is returned.
void gtk_column_view_column_set_factory (GtkColumnViewColumn *self,GtkListItemFactory *factory);
Sets the GtkListItemFactory to use for populating list items for this column.
GtkListItemFactory *
gtk_column_view_column_get_factory (GtkColumnViewColumn *self);
Gets the factory that's currently used to populate list items for this column.
void gtk_column_view_column_set_title (GtkColumnViewColumn *self,const char *title);
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.
const char *
gtk_column_view_column_get_title (GtkColumnViewColumn *self);
Returns the title set with gtk_column_view_column_set_title().
void gtk_column_view_column_set_sorter (GtkColumnViewColumn *self,GtkSorter *sorter);
Associates a sorter with the column.
If sorter
is NULL, 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 gtk_column_view_sort_by_column().
See gtk_column_view_get_sorter() for the necessary steps
for setting up customizable sorting for GtkColumnView.
GtkSorter *
gtk_column_view_column_get_sorter (GtkColumnViewColumn *self);
Returns the sorter that is associated with the column.
void gtk_column_view_column_set_visible (GtkColumnViewColumn *self,gboolean visible);
Sets whether this column should be visible in views.
gboolean
gtk_column_view_column_get_visible (GtkColumnViewColumn *self);
Returns whether this column is visible.
void gtk_column_view_column_set_resizable (GtkColumnViewColumn *self,gboolean resizable);
Sets whether this column should be resizable by dragging.
gboolean
gtk_column_view_column_get_resizable (GtkColumnViewColumn *self);
Returns whether this column is resizable.
void gtk_column_view_column_set_header_menu (GtkColumnViewColumn *self,GMenuModel *menu);
Sets the menu model that is used to create the context menu for the column header.
GMenuModel *
gtk_column_view_column_get_header_menu
(GtkColumnViewColumn *self);
Gets the menu model that is used to create the context menu for the column header.
void gtk_column_view_column_set_fixed_width (GtkColumnViewColumn *self,int fixed_width);
If fixed_width
is not -1, sets the fixed width of column
;
otherwise unsets it.
Setting a fixed width overrides the automatically calculated width. Interactive resizing also sets the “fixed-width” property.
int
gtk_column_view_column_get_fixed_width
(GtkColumnViewColumn *self);
Gets the fixed width of the column.
void gtk_column_view_column_set_expand (GtkColumnViewColumn *self,gboolean expand);
Sets the column to take available extra space.
The extra space is shared equally amongst all columns that
have the expand set to TRUE.
gboolean
gtk_column_view_column_get_expand (GtkColumnViewColumn *self);
Returns whether this column should expand.
typedef struct _GtkColumnViewColumn GtkColumnViewColumn;
GtkColumnViewColumns are added to GtkColumnViews.
“column-view” property“column-view” GtkColumnView *
GtkColumnView this column is a part of
Owner: GtkColumnViewColumn
Flags: Read
“expand” property“expand” gboolean
Column gets share of extra width allocated to the view
Owner: GtkColumnViewColumn
Flags: Read / Write
Default value: FALSE
“factory” property“factory” GtkListItemFactory *
Factory for populating list items
Owner: GtkColumnViewColumn
Flags: Read / Write
“fixed-width” property “fixed-width” int
If not -1, this is the width that the column is allocated, regardless of the size of its content.
Owner: GtkColumnViewColumn
Flags: Read / Write
Allowed values: >= -1
Default value: -1
“header-menu” property“header-menu” GMenuModel *
Menu model used to create the context menu for the column header.
Owner: GtkColumnViewColumn
Flags: Read / Write
“resizable” property“resizable” gboolean
Whether this column is resizable
Owner: GtkColumnViewColumn
Flags: Read / Write
Default value: FALSE
“sorter” property“sorter” GtkSorter *
Sorter for sorting items according to this column
Owner: GtkColumnViewColumn
Flags: Read / Write
“title” property “title” char *
Title displayed in the header
Owner: GtkColumnViewColumn
Flags: Read / Write
Default value: NULL
“visible” property“visible” gboolean
Whether this column is visible
Owner: GtkColumnViewColumn
Flags: Read / Write
Default value: TRUE