Package ch.bailu.gtk.gtk
Class ColumnViewColumn
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.ColumnViewColumn
- All Implemented Interfaces:
PointerInterface
`GtkColumnViewColumn` represents the columns being added to `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 [method@Gtk.ColumnViewColumn.set_header_menu].
A sorter can be associated with a column using
[method@Gtk.ColumnViewColumn.set_sorter], to let users influence sorting
by clicking on the column header.
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 [method@Gtk.ColumnViewColumn.set_header_menu].
A sorter can be associated with a column using
[method@Gtk.ColumnViewColumn.set_sorter], to let users influence sorting
by clicking on the column header.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionColumnViewColumn
(PointerContainer pointer) ColumnViewColumn
(Str title, ListItemFactory factory) Creates a new `GtkColumnViewColumn` that uses the given @factory for
mapping items to widgets.ColumnViewColumn
(String title, ListItemFactory factory) Creates a new `GtkColumnViewColumn` that uses the given @factory for
mapping items to widgets. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
Gets the column view that's currently displaying this column.boolean
Returns whether this column should expand.Gets the factory that's currently used to populate list items for
this column.int
Gets the fixed width of the column.Gets the menu model that is used to create the context menu
for the column header.static int
static long
static TypeSystem.TypeSize
boolean
Returns whether this column is resizable.Returns the sorter that is associated with the column.getTitle()
Returns the title set with gtk_column_view_column_set_title().static long
static TypeSystem.TypeSize
boolean
Returns whether this column is visible.void
setExpand
(boolean expand) Sets the column to take available extra space.void
setFactory
(ListItemFactory factory) Sets the `GtkListItemFactory` to use for populating list items for this
column.void
setFixedWidth
(int fixed_width) If @fixed_width is not -1, sets the fixed width of @column;
otherwise unsets it.void
setHeaderMenu
(MenuModel menu) Sets the menu model that is used to create the context menu
for the column header.void
setResizable
(boolean resizable) Sets whether this column should be resizable by dragging.void
Associates a sorter with the column.void
Sets the title of this column.void
Sets the title of this column.void
setVisible
(boolean visible) Sets whether this column should be visible in views.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
ColumnViewColumn
-
ColumnViewColumn
Creates a new `GtkColumnViewColumn` that uses the given @factory for
mapping items to widgets.
You most likely want to call [method@Gtk.ColumnView.append_column] next.
The function takes ownership of the argument, so you can write code like:
```c
column = gtk_column_view_column_new (_("Name"),
gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
```- Parameters:
title
- Title to use for this columnfactory
- The factory to populate items with
-
ColumnViewColumn
Creates a new `GtkColumnViewColumn` that uses the given @factory for
mapping items to widgets.
You most likely want to call [method@Gtk.ColumnView.append_column] next.
The function takes ownership of the argument, so you can write code like:
```c
column = gtk_column_view_column_new (_("Name"),
gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
```- Parameters:
title
- Title to use for this columnfactory
- The factory to populate items with
-
-
Method Details
-
getClassHandler
-
getColumnView
Gets the column view that's currently displaying this column.
If @self has not been added to a column view yet, %NULL is returned.- Returns:
- The column view displaying @self.
-
getExpand
public boolean getExpand()Returns whether this column should expand.- Returns:
- %TRUE if this column expands
-
getFactory
Gets the factory that's currently used to populate list items for
this column.- Returns:
- The factory in use
-
getFixedWidth
public int getFixedWidth()Gets the fixed width of the column.- Returns:
- the fixed with of the column
-
getHeaderMenu
Gets the menu model that is used to create the context menu
for the column header.- Returns:
- the `GMenuModel`
-
getResizable
public boolean getResizable()Returns whether this column is resizable.- Returns:
- %TRUE if this column is resizable
-
getSorter
Returns the sorter that is associated with the column.- Returns:
- the `GtkSorter` of @self
-
getTitle
Returns the title set with gtk_column_view_column_set_title().- Returns:
- The column's title
-
getVisible
public boolean getVisible()Returns whether this column is visible.- Returns:
- %TRUE if this column is visible
-
setExpand
public void setExpand(boolean 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.- Parameters:
expand
- %TRUE if this column should expand to fill available sace
-
setFactory
Sets the `GtkListItemFactory` to use for populating list items for this
column.- Parameters:
factory
- the factory to use
-
setFixedWidth
public void setFixedWidth(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.- Parameters:
fixed_width
- the new fixed width, or -1
-
setHeaderMenu
Sets the menu model that is used to create the context menu
for the column header.- Parameters:
menu
- a `GMenuModel`
-
setResizable
public void setResizable(boolean resizable) Sets whether this column should be resizable by dragging.- Parameters:
resizable
- whether this column should be resizable
-
setSorter
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 [method@Gtk.ColumnView.sort_by_column].
See [method@Gtk.ColumnView.get_sorter] for the necessary steps
for setting up customizable sorting for [class@Gtk.ColumnView].- Parameters:
sorter
- the `GtkSorter` to associate with @column
-
setTitle
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.- Parameters:
title
- Title to use for this column
-
setTitle
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.- Parameters:
title
- Title to use for this column
-
setVisible
public void setVisible(boolean visible) Sets whether this column should be visible in views.- Parameters:
visible
- whether this column should be visible
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-