| Top |
Functions
| GtkColumnViewColumn * | gtk_column_view_column_new () |
| GtkColumnViewColumn * | gtk_column_view_column_new_with_factory () |
| GtkColumnView * | gtk_column_view_column_get_column_view () |
| void | gtk_column_view_column_set_factory () |
| GtkListItemFactory * | gtk_column_view_column_get_factory () |
| void | gtk_column_view_column_set_title () |
| const char * | gtk_column_view_column_get_title () |
| void | gtk_column_view_column_set_sorter () |
| GtkSorter * | gtk_column_view_column_get_sorter () |
| void | gtk_column_view_column_set_visible () |
| gboolean | gtk_column_view_column_get_visible () |
| void | gtk_column_view_column_set_resizable () |
| gboolean | gtk_column_view_column_get_resizable () |
| void | gtk_column_view_column_set_header_menu () |
| GMenuModel * | gtk_column_view_column_get_header_menu () |
| void | gtk_column_view_column_set_fixed_width () |
| int | gtk_column_view_column_get_fixed_width () |
| void | gtk_column_view_column_set_expand () |
| gboolean | gtk_column_view_column_get_expand () |
Properties
| GtkColumnView * | column-view | Read |
| gboolean | expand | Read / Write |
| GtkListItemFactory * | factory | Read / Write |
| gint | fixed-width | Read / Write |
| GMenuModel * | header-menu | Read / Write |
| gboolean | resizable | Read / Write |
| GtkSorter * | sorter | Read / Write |
| gchar * | title | Read / Write |
| gboolean | visible | Read / Write |
Functions
gtk_column_view_column_new ()
GtkColumnViewColumn *
gtk_column_view_column_new (const char *title);
Creates a new GtkColumnViewColumn.
You most likely want to call gtk_column_add_column() next.
gtk_column_view_column_new_with_factory ()
GtkColumnViewColumn * gtk_column_view_column_new_with_factory (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_with_factory (_("Name"),
gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
gtk_column_view_column_get_column_view ()
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.
gtk_column_view_column_set_factory ()
void gtk_column_view_column_set_factory (GtkColumnViewColumn *self,GtkListItemFactory *factory);
Sets the GtkListItemFactory to use for populating list items for this column.
gtk_column_view_column_get_factory ()
GtkListItemFactory *
gtk_column_view_column_get_factory (GtkColumnViewColumn *self);
Gets the factory that's currently used to populate list items for this column.
gtk_column_view_column_set_title ()
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 therefor user-facing text that should be translated.
gtk_column_view_column_get_title ()
const char *
gtk_column_view_column_get_title (GtkColumnViewColumn *self);
Returns the title set with gtk_column_view_column_set_title().
gtk_column_view_column_set_sorter ()
void gtk_column_view_column_set_sorter (GtkColumnViewColumn *self,GtkSorter *sorter);
Associates a sorter with the column.
This sorter can be made active by clicking on the column
header, or by calling gtk_column_view_sort_by_column().
gtk_column_view_column_get_sorter ()
GtkSorter *
gtk_column_view_column_get_sorter (GtkColumnViewColumn *self);
Returns the sorter that is associated with the column.
gtk_column_view_column_set_visible ()
void gtk_column_view_column_set_visible (GtkColumnViewColumn *self,gboolean visible);
Sets whether this column should be visible in views.
gtk_column_view_column_get_visible ()
gboolean
gtk_column_view_column_get_visible (GtkColumnViewColumn *self);
Returns whether this column is visible.
gtk_column_view_column_set_resizable ()
void gtk_column_view_column_set_resizable (GtkColumnViewColumn *self,gboolean resizable);
Sets whether this column should be resizable by dragging.
gtk_column_view_column_get_resizable ()
gboolean
gtk_column_view_column_get_resizable (GtkColumnViewColumn *self);
Returns whether this column is resizable.
gtk_column_view_column_set_header_menu ()
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.
gtk_column_view_column_get_header_menu ()
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.
gtk_column_view_column_set_fixed_width ()
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.
gtk_column_view_column_get_fixed_width ()
int
gtk_column_view_column_get_fixed_width
(GtkColumnViewColumn *self);
Gets the fixed width of the column.
gtk_column_view_column_set_expand ()
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.
gtk_column_view_column_get_expand ()
gboolean
gtk_column_view_column_get_expand (GtkColumnViewColumn *self);
Returns whether this column should expand.
Types and Values
GtkColumnViewColumn
typedef struct _GtkColumnViewColumn GtkColumnViewColumn;
GtkColumnViewColumns are added to GtkColumnViews.
Property Details
The “column-view” property
“column-view” GtkColumnView *
GtkColumnView this column is a part of
Owner: GtkColumnViewColumn
Flags: Read
The “expand” property
“expand” gboolean
Column gets share of extra width allocated to the view
Owner: GtkColumnViewColumn
Flags: Read / Write
Default value: FALSE
The “factory” property
“factory” GtkListItemFactory *
Factory for populating list items
Owner: GtkColumnViewColumn
Flags: Read / Write
The “fixed-width” property
“fixed-width” gint
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
The “header-menu” property
“header-menu” GMenuModel *
Menu model used to create the context menu for the column header.
Owner: GtkColumnViewColumn
Flags: Read / Write
The “resizable” property
“resizable” gboolean
Whether this column is resizable
Owner: GtkColumnViewColumn
Flags: Read / Write
Default value: FALSE
The “sorter” property
“sorter” GtkSorter *
Sorter for sorting items according to this column
Owner: GtkColumnViewColumn
Flags: Read / Write
The “title” property
“title” gchar *
Title displayed in the header
Owner: GtkColumnViewColumn
Flags: Read / Write
Default value: NULL
