| Top |
AmtkTreeViewScrolledWindowSizingAmtkTreeViewScrolledWindowSizing — Custom GtkScrolledWindow sizing when it contains a GtkTreeView |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkScrolledWindow ╰── AmtkTreeViewScrolledWindowSizing
AmtkTreeViewScrolledWindowSizing implements AtkImplementorIface and GtkBuildable.
AmtkTreeViewScrolledWindowSizing is a subclass of GtkScrolledWindow to provide custom sizing when it contains a GtkTreeView.
If the GtkTreeView is small enough, its natural size is taken. If it exceeds a certain size, a smaller size is applied with the height at a row boundary.
To configure the size limits, you can use the following properties:
One use-case is to show a GtkTreeView in a popup GtkWindow.
The current AmtkTreeViewScrolledWindowSizing implementation has several limitations, so there is room for improvement in future versions.
The restrictions:
The “headers-visible” property should be FALSE.
The GtkTreeView should contain a list, not a tree.
All rows of the GtkTreeView should have the same height, see the “fixed-height-mode” property.
AmtkTreeViewScrolledWindowSizing *
amtk_tree_view_scrolled_window_sizing_new
(void);
Since: 5.10
GtkTreeView *
amtk_tree_view_scrolled_window_sizing_get_tree_view
(AmtkTreeViewScrolledWindowSizing *self);
the GtkTreeView, if the child widget is
a GtkTreeView. Otherwise NULL is returned.
[transfer none][nullable]
Since: 5.10
gboolean
amtk_tree_view_scrolled_window_sizing_get_monitor_limit
(AmtkTreeViewScrolledWindowSizing *self);
Since: 5.10
void amtk_tree_view_scrolled_window_sizing_set_monitor_limit (AmtkTreeViewScrolledWindowSizing *self,gboolean monitor_limit);
Sets the “monitor-limit-enabled” property.
Since: 5.10
“monitor-limit-enabled” property“monitor-limit-enabled” gboolean
Whether to take the GdkMonitor size into account as a maximum width and height to apply.
Owner: AmtkTreeViewScrolledWindowSizing
Flags: Read / Write / Construct
Default value: TRUE
Since: 5.10