Puts child widgets in a reflowing grid.
<picture> <source srcset="flow-box-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkFlowBox" src="flow-box.png"> </picture> For instance, with the horizontal orientation, the widgets will be arranged from left to right, starting a new row under the previous row when necessary. Reducing the width in this case will require more rows, so a larger height will be requested.
Likewise, with the vertical orientation, the widgets will be arranged from top to bottom, starting a new column to the right when necessary. Reducing the height will require more columns, so a larger width will be requested.
The size request of a GtkFlowBox alone may not be what you expect; if you need to be able to shrink it along both axes and dynamically reflow its children, you may have to wrap it in a GtkScrolledWindow to enable that.
The children of a GtkFlowBox can be dynamically sorted and filtered.
Although a GtkFlowBox must have only GtkFlowBoxChild children, you can add any kind of widget to it via [methodGtk.FlowBox.insert], and a GtkFlowBoxChild widget will automatically be inserted between the box and the widget.
Also see [classGtk.ListBox].
# Shortcuts and Gestures
The following signals have default keybindings:
[signalGtk.FlowBox::move-cursor] - [signalGtk.FlowBox::select-all] -
[signalGtk.FlowBox::toggle-cursor-child] - [signalGtk.FlowBox::unselect-all]
# CSS nodes
â â°ââ [rubberband] ```
`GtkFlowBox` uses a single CSS node with name flowbox. `GtkFlowBoxChild`
uses a single CSS node with name flowboxchild. For rubberband selection, a
subnode with name rubberband is used.
# Accessibility
`GtkFlowBox` uses the [enumGtk.AccessibleRole.grid] role, and
`GtkFlowBoxChild` uses the [enumGtk.AccessibleRole.grid_cell] role.
<group>Layout containers</group>
<gtkada_demo>create_flow_box.adb</gtkada_demo>
function "+"
(Widget : access Gtk_Flow_Box_Record'Class)
return Gtk.Accessible.Gtk_Accessible
function "+"
(Widget : access Gtk_Flow_Box_Record'Class)
return Gtk.Buildable.Gtk_Buildable
function "+"
(Widget : access Gtk_Flow_Box_Record'Class)
return Gtk.Constraint_Target.Gtk_Constraint_Target
function "+"
(Widget : access Gtk_Flow_Box_Record'Class)
return Gtk.Orientable.Gtk_Orientable
function "-"
(Interf : Gtk.Accessible.Gtk_Accessible)
return Gtk_Flow_Box
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Flow_Box
function "-"
(Interf : Gtk.Constraint_Target.Gtk_Constraint_Target)
return Gtk_Flow_Box
function "-"
(Interf : Gtk.Orientable.Gtk_Orientable)
return Gtk_Flow_Box
Accept_Unpaired_Release_Property : constant Glib.Properties.Property_Boolean;
Whether to accept unpaired release events.
Activate_On_Single_Click_Property : constant Glib.Properties.Property_Boolean;
Determines whether children can be activated with a single click, or require a double-click.
procedure Announce
(Self : not null access Gtk_Flow_Box_Record;
Message : UTF8_String;
Priority : Gtk.Accessible.Gtk_Accessible_Announcement_Priority)
procedure Append
(Self : not null access Gtk_Flow_Box_Record;
Child : not null access Gtk.Widget.Gtk_Widget_Record'Class)
Adds Child to the end of Self. If a sort function is set, the widget will actually be inserted at the calculated position. See also: [methodGtk.FlowBox.insert]. Since: gtk+ 4.6
the GtkWidget to add
procedure Bind_Model
(Self : not null access Gtk_Flow_Box_Record;
Model : Glib.List_Model.Glist_Model;
Create_Widget_Func : Gtk_Flow_Box_Create_Widget_Func)
Binds Model to Box. If Box was already bound to a model, that previous binding is destroyed. The contents of Box are cleared and then filled with widgets that represent items from Model. Box is updated whenever Model changes. If Model is null, Box is left empty. It is undefined to add or remove widgets directly (for example, with [methodGtk.FlowBox.insert]) while Box is bound to a model. Note that using a model is incompatible with the filtering and sorting functionality in GtkFlowBox. When using a model, filtering and sorting should be implemented by the model.
the GListModel to be bound to Box
a function that creates widgets for items
type Cb_GObject_Gtk_Flow_Box_Child_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class);
type Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Boolean_Boolean is not null access function
(Self : access Glib.Object.GObject_Record'Class;
Step : Gtk.Enums.Gtk_Movement_Step;
Count : Glib.Gint;
Extend : Boolean;
Modify : Boolean) return Boolean;
type Cb_GObject_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void is not null access procedure
(Self : access Gtk_Flow_Box_Record'Class;
Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class);
type Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Boolean_Boolean_Boolean is not null access function
(Self : access Gtk_Flow_Box_Record'Class;
Step : Gtk.Enums.Gtk_Movement_Step;
Count : Glib.Gint;
Extend : Boolean;
Modify : Boolean) return Boolean;
type Cb_Gtk_Flow_Box_Void is not null access procedure (Self : access Gtk_Flow_Box_Record'Class);
Column_Spacing_Property : constant Glib.Properties.Property_Uint;
The amount of horizontal space between two children.
function Get_Accessible_Id
(Self : not null access Gtk_Flow_Box_Record) return UTF8_String
function Get_Accessible_Parent
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Accessible.Gtk_Accessible
function Get_Accessible_Role
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Accessible.Gtk_Accessible_Role
function Get_Activate_On_Single_Click
(Self : not null access Gtk_Flow_Box_Record) return Boolean
Returns whether children activate on single clicks.
True if children are activated on single click, False otherwise
function Get_At_Context
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Atcontext.Gtk_Atcontext
function Get_Bounds
(Self : not null access Gtk_Flow_Box_Record;
X : out Glib.Gint;
Y : out Glib.Gint;
Width : out Glib.Gint;
Height : out Glib.Gint) return Boolean
function Get_Child_At_Index
(Self : not null access Gtk_Flow_Box_Record;
Idx : Glib.Gint) return Gtk.Flow_Box_Child.Gtk_Flow_Box_Child
Gets the nth child in the Box.
the position of the child
the child widget, which will always be a GtkFlowBoxChild or null in case no child widget with the given index exists. Has transfer-ownership='none'.
function Get_Child_At_Pos
(Self : not null access Gtk_Flow_Box_Record;
X : Glib.Gint;
Y : Glib.Gint) return Gtk.Flow_Box_Child.Gtk_Flow_Box_Child
Gets the child in the (X, Y) position. Both X and Y are assumed to be relative to the origin of Box.
the x coordinate of the child
the y coordinate of the child
the child widget, which will always be a GtkFlowBoxChild or null in case no child widget exists for the given x and y coordinates. Has transfer-ownership='none'.
function Get_Column_Spacing
(Self : not null access Gtk_Flow_Box_Record) return Guint
Gets the horizontal spacing.
the horizontal spacing
function Get_First_Accessible_Child
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Accessible.Gtk_Accessible
function Get_Homogeneous
(Self : not null access Gtk_Flow_Box_Record) return Boolean
Returns whether the box is homogeneous.
True if the box is homogeneous.
function Get_Max_Children_Per_Line
(Self : not null access Gtk_Flow_Box_Record) return Guint
Gets the maximum number of children per line.
the maximum number of children per line
function Get_Min_Children_Per_Line
(Self : not null access Gtk_Flow_Box_Record) return Guint
Gets the minimum number of children per line.
the minimum number of children per line
function Get_Next_Accessible_Sibling
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Accessible.Gtk_Accessible
function Get_Orientation
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Enums.Gtk_Orientation
function Get_Platform_State
(Self : not null access Gtk_Flow_Box_Record;
State : Gtk.Accessible.Gtk_Accessible_Platform_State) return Boolean
function Get_Row_Spacing
(Self : not null access Gtk_Flow_Box_Record) return Guint
Gets the vertical spacing.
the vertical spacing
function Get_Selected_Children
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Flow_Box_Child.Flow_Box_Child_List.Glist
Creates a list of all selected children.
A GList containing the GtkWidget for each selected child. Free with g_list_free when done.
function Get_Selection_Mode
(Self : not null access Gtk_Flow_Box_Record)
return Gtk.Enums.Gtk_Selection_Mode
Gets the selection mode of Box.
the GtkSelectionMode
function Get_Type return Glib.GType
type Gtk_Flow_Box is access all Gtk_Flow_Box_Record'Class;
type Gtk_Flow_Box_Create_Widget_Func is access function (Item : System.Address) return Gtk.Widget.Gtk_Widget;
Called for flow boxes that are bound to a GListModel. This function is called for each item that gets added to the model.
the item from the model for which to create a widget for
a GtkWidget that represents Item. Has transfer-ownership='full'.
type Gtk_Flow_Box_Filter_Func is access function
(Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class)
return Boolean;
A function that will be called whenever a child changes or is added. It lets you control if the child should be visible or not.
a GtkFlowBoxChild that may be filtered
True if the row should be visible, False otherwise
type Gtk_Flow_Box_Foreach_Func is access procedure
(Box : not null access Gtk_Flow_Box_Record'Class;
Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class);
A function used by Gtk.Flow_Box.Selected_Foreach. It will be called on every selected child of the Box.
a GtkFlowBox
a GtkFlowBoxChild
function Gtk_Flow_Box_New return Gtk_Flow_Box
Creates a GtkFlowBox.
type Gtk_Flow_Box_Record is new Gtk_Widget_Record with null record;
type Gtk_Flow_Box_Sort_Func is access function
(Child1 : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class;
Child2 : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class)
return Glib.Gint;
A function to compare two children to determine which should come first.
the first child
the second child
< 0 if Child1 should be before Child2, 0 if they are equal, and > 0 otherwise
procedure Gtk_New (Self : out Gtk_Flow_Box)
Creates a GtkFlowBox. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
Homogeneous_Property : constant Glib.Properties.Property_Boolean;
Determines whether all children should be allocated the same size.
package Implements_Gtk_Accessible is new Glib.Types.Implements
(Gtk.Accessible.Gtk_Accessible, Gtk_Flow_Box_Record, Gtk_Flow_Box);
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Flow_Box_Record, Gtk_Flow_Box);
package Implements_Gtk_Constraint_Target is new Glib.Types.Implements
(Gtk.Constraint_Target.Gtk_Constraint_Target, Gtk_Flow_Box_Record, Gtk_Flow_Box);
package Implements_Gtk_Orientable is new Glib.Types.Implements
(Gtk.Orientable.Gtk_Orientable, Gtk_Flow_Box_Record, Gtk_Flow_Box);
procedure Initialize (Self : not null access Gtk_Flow_Box_Record'Class)
Creates a GtkFlowBox. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Insert
(Self : not null access Gtk_Flow_Box_Record;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class;
Position : Glib.Gint)
Inserts the Widget into Box at Position. If a sort function is set, the widget will actually be inserted at the calculated position. If Position is -1, or larger than the total number of children in the Box, then the Widget will be appended to the end.
the GtkWidget to add
the position to insert Child in
procedure Invalidate_Filter (Self : not null access Gtk_Flow_Box_Record)
Updates the filtering for all children. Call this function when the result of the filter function on the Box is changed due to an external factor. For instance, this would be used if the filter function just looked for a specific search term, and the entry with the string has changed.
procedure Invalidate_Sort (Self : not null access Gtk_Flow_Box_Record)
Updates the sorting for all children. Call this when the result of the sort function on Box is changed due to an external factor.
Max_Children_Per_Line_Property : constant Glib.Properties.Property_Uint;
The maximum amount of children to request space for consecutively in the given orientation.
Min_Children_Per_Line_Property : constant Glib.Properties.Property_Uint;
The minimum number of children to allocate consecutively in the given orientation.
Setting the minimum children per line ensures that a reasonably small height will be requested for the overall minimum width of the box.
procedure On_Activate_Cursor_Child
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the user activates the Box.
This is a keybinding signal.
procedure On_Activate_Cursor_Child
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_Gtk_Flow_Box_Void;
After : Boolean := False)
Emitted when the user activates the Box.
This is a keybinding signal.
procedure On_Child_Activated
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_GObject_Gtk_Flow_Box_Child_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when a child has been activated by the user.
procedure On_Child_Activated
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void;
After : Boolean := False)
Emitted when a child has been activated by the user.
procedure On_Move_Cursor
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Boolean_Boolean;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the user initiates a cursor movement.
This is a keybinding signal. Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the cursor programmatically.
The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifier does not. There are too many key combinations to list them all here.
<kbd>â</kbd>, <kbd>â</kbd>, <kbd>â</kbd>, <kbd>â</kbd> move by
individual children - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the box - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages
Callback parameters: -- @param Step the granularity of the move, as a GtkMovementStep -- @param Count the number of Step units to move -- @param Extend whether to extend the selection -- @param Modify whether to modify the selection
procedure On_Move_Cursor
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Boolean_Boolean_Boolean;
After : Boolean := False)
Emitted when the user initiates a cursor movement.
This is a keybinding signal. Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the cursor programmatically.
The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifier does not. There are too many key combinations to list them all here.
<kbd>â</kbd>, <kbd>â</kbd>, <kbd>â</kbd>, <kbd>â</kbd> move by
individual children - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the box - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages
Callback parameters: -- @param Step the granularity of the move, as a GtkMovementStep -- @param Count the number of Step units to move -- @param Extend whether to extend the selection -- @param Modify whether to modify the selection
procedure On_Select_All
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted to select all children of the box, if the selection mode permits it.
This is a keybinding signal.
The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>a</kbd>.
procedure On_Select_All
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_Gtk_Flow_Box_Void;
After : Boolean := False)
Emitted to select all children of the box, if the selection mode permits it.
This is a keybinding signal.
The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>a</kbd>.
procedure On_Selected_Children_Changed
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the set of selected children changes.
Use [methodGtk.FlowBox.selected_foreach] or [methodGtk.FlowBox.get_selected_children] to obtain the selected children.
procedure On_Selected_Children_Changed
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_Gtk_Flow_Box_Void;
After : Boolean := False)
Emitted when the set of selected children changes.
Use [methodGtk.FlowBox.selected_foreach] or [methodGtk.FlowBox.get_selected_children] to obtain the selected children.
procedure On_Toggle_Cursor_Child
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted to toggle the selection of the child that has the focus.
This is a keybinding signal.
The default binding for this signal is <kbd>Ctrl</kbd>-<kbd>Space</kbd>.
procedure On_Toggle_Cursor_Child
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_Gtk_Flow_Box_Void;
After : Boolean := False)
Emitted to toggle the selection of the child that has the focus.
This is a keybinding signal.
The default binding for this signal is <kbd>Ctrl</kbd>-<kbd>Space</kbd>.
procedure On_Unselect_All
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted to unselect all children of the box, if the selection mode permits it.
This is a keybinding signal.
The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>a</kbd>.
procedure On_Unselect_All
(Self : not null access Gtk_Flow_Box_Record;
Call : Cb_Gtk_Flow_Box_Void;
After : Boolean := False)
Emitted to unselect all children of the box, if the selection mode permits it.
This is a keybinding signal.
The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>a</kbd>.
procedure Prepend
(Self : not null access Gtk_Flow_Box_Record;
Child : not null access Gtk.Widget.Gtk_Widget_Record'Class)
Adds Child to the start of Self. If a sort function is set, the widget will actually be inserted at the calculated position. See also: [methodGtk.FlowBox.insert]. Since: gtk+ 4.6
the GtkWidget to add
procedure Remove
(Self : not null access Gtk_Flow_Box_Record;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class)
Removes a child from Box.
the child widget to remove
procedure Remove_All (Self : not null access Gtk_Flow_Box_Record)
Removes all children from Box. This function does nothing if Box is backed by a model. Since: gtk+ 4.12
procedure Reset_Property
(Self : not null access Gtk_Flow_Box_Record;
Property : Gtk.Accessible.Gtk_Accessible_Property)
procedure Reset_Relation
(Self : not null access Gtk_Flow_Box_Record;
Relation : Gtk.Accessible.Gtk_Accessible_Relation)
procedure Reset_State
(Self : not null access Gtk_Flow_Box_Record;
State : Gtk.Accessible.Gtk_Accessible_State)
Row_Spacing_Property : constant Glib.Properties.Property_Uint;
The amount of vertical space between two children.
procedure Select_All (Self : not null access Gtk_Flow_Box_Record)
Select all children of Box, if the selection mode allows it.
procedure Select_Child
(Self : not null access Gtk_Flow_Box_Record;
Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class)
Selects a single child of Box, if the selection mode allows it.
a child of Box
procedure Selected_Foreach
(Self : not null access Gtk_Flow_Box_Record;
Func : Gtk_Flow_Box_Foreach_Func)
Calls a function for each selected child. Note that the selection cannot be modified from within this function.
the function to call for each selected child
Selection_Mode_Property : constant Gtk.Enums.Property_Gtk_Selection_Mode;
The selection mode used by the flow box.
procedure Set_Accessible_Parent
(Self : not null access Gtk_Flow_Box_Record;
Parent : Gtk.Accessible.Gtk_Accessible;
Next_Sibling : Gtk.Accessible.Gtk_Accessible)
procedure Set_Activate_On_Single_Click
(Self : not null access Gtk_Flow_Box_Record;
Single : Boolean)
If Single is True, children will be activated when you click on them, otherwise you need to double-click.
True to emit child-activated on a single click
procedure Set_Column_Spacing
(Self : not null access Gtk_Flow_Box_Record;
Spacing : Guint)
Sets the horizontal space to add between children.
the spacing to use
procedure Set_Filter_Func
(Self : not null access Gtk_Flow_Box_Record;
Filter_Func : Gtk_Flow_Box_Filter_Func)
By setting a filter function on the Box one can decide dynamically which of the children to show. For instance, to implement a search function that only shows the children matching the search terms. The Filter_Func will be called for each child after the call, and it will continue to be called each time a child changes (via [methodGtk.FlowBoxChild.changed]) or when [methodGtk.FlowBox.invalidate_filter] is called. Note that using a filter function is incompatible with using a model (see [methodGtk.FlowBox.bind_model]).
callback that lets you filter which children to show
procedure Set_Hadjustment
(Self : not null access Gtk_Flow_Box_Record;
Adjustment : not null access Gtk.Adjustment.Gtk_Adjustment_Record'Class)
Hooks up an adjustment to focus handling in Box. The adjustment is also used for autoscrolling during rubberband selection. See [methodGtk.ScrolledWindow.get_hadjustment] for a typical way of obtaining the adjustment, and [methodGtk.FlowBox.set_vadjustment] for setting the vertical adjustment. The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the box.
an adjustment which should be adjusted when the focus is moved among the descendents of Container
procedure Set_Homogeneous
(Self : not null access Gtk_Flow_Box_Record;
Homogeneous : Boolean)
Sets whether or not all children of Box are given equal space in the box.
True to create equal allotments, False for variable allotments
procedure Set_Max_Children_Per_Line
(Self : not null access Gtk_Flow_Box_Record;
N_Children : Guint)
Sets the maximum number of children to request and allocate space for in Box's orientation. Setting the maximum number of children per line limits the overall natural size request to be no more than N_Children children long in the given orientation.
the maximum number of children per line
procedure Set_Min_Children_Per_Line
(Self : not null access Gtk_Flow_Box_Record;
N_Children : Guint)
Sets the minimum number of children to line up in Box's orientation before flowing.
the minimum number of children per line
procedure Set_Orientation
(Self : not null access Gtk_Flow_Box_Record;
Orientation : Gtk.Enums.Gtk_Orientation)
procedure Set_Row_Spacing
(Self : not null access Gtk_Flow_Box_Record;
Spacing : Guint)
Sets the vertical space to add between children.
the spacing to use
procedure Set_Selection_Mode
(Self : not null access Gtk_Flow_Box_Record;
Mode : Gtk.Enums.Gtk_Selection_Mode)
Sets how selection works in Box.
the new selection mode
procedure Set_Sort_Func
(Self : not null access Gtk_Flow_Box_Record;
Sort_Func : Gtk_Flow_Box_Sort_Func)
By setting a sort function on the Box, one can dynamically reorder the children of the box, based on the contents of the children. The Sort_Func will be called for each child after the call, and will continue to be called each time a child changes (via [methodGtk.FlowBoxChild.changed]) and when [methodGtk.FlowBox.invalidate_sort] is called. Note that using a sort function is incompatible with using a model (see [methodGtk.FlowBox.bind_model]).
the sort function
procedure Set_Vadjustment
(Self : not null access Gtk_Flow_Box_Record;
Adjustment : not null access Gtk.Adjustment.Gtk_Adjustment_Record'Class)
Hooks up an adjustment to focus handling in Box. The adjustment is also used for autoscrolling during rubberband selection. See [methodGtk.ScrolledWindow.get_vadjustment] for a typical way of obtaining the adjustment, and [methodGtk.FlowBox.set_hadjustment] for setting the horizontal adjustment. The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the box.
an adjustment which should be adjusted when the focus is moved among the descendents of Container
Signal_Activate_Cursor_Child : constant Glib.Signal_Name := "activate-cursor-child";
Emitted when the user activates the Box.
This is a keybinding signal.
Signal_Child_Activated : constant Glib.Signal_Name := "child-activated";
Emitted when a child has been activated by the user.
Signal_Move_Cursor : constant Glib.Signal_Name := "move-cursor";
Emitted when the user initiates a cursor movement.
This is a keybinding signal. Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the cursor programmatically.
The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifier does not. There are too many key combinations to list them all here.
<kbd>â</kbd>, <kbd>â</kbd>, <kbd>â</kbd>, <kbd>â</kbd> move by
individual children - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the box - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages
Callback parameters: -- @param Step the granularity of the move, as a GtkMovementStep -- @param Count the number of Step units to move -- @param Extend whether to extend the selection -- @param Modify whether to modify the selection
Signal_Select_All : constant Glib.Signal_Name := "select-all";
Emitted to select all children of the box, if the selection mode permits it.
This is a keybinding signal.
The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>a</kbd>.
Signal_Selected_Children_Changed : constant Glib.Signal_Name := "selected-children-changed";
Emitted when the set of selected children changes.
Use [methodGtk.FlowBox.selected_foreach] or [methodGtk.FlowBox.get_selected_children] to obtain the selected children.
Signal_Toggle_Cursor_Child : constant Glib.Signal_Name := "toggle-cursor-child";
Emitted to toggle the selection of the child that has the focus.
This is a keybinding signal.
The default binding for this signal is <kbd>Ctrl</kbd>-<kbd>Space</kbd>.
Signal_Unselect_All : constant Glib.Signal_Name := "unselect-all";
Emitted to unselect all children of the box, if the selection mode permits it.
This is a keybinding signal.
The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>a</kbd>.
procedure Unselect_All (Self : not null access Gtk_Flow_Box_Record)
Unselect all children of Box, if the selection mode allows it.
procedure Unselect_Child
(Self : not null access Gtk_Flow_Box_Record;
Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class)
Unselects a single child of Box, if the selection mode allows it.
a child of Box
procedure Update_Next_Accessible_Sibling
(Self : not null access Gtk_Flow_Box_Record;
New_Sibling : Gtk.Accessible.Gtk_Accessible)
procedure Update_Platform_State
(Self : not null access Gtk_Flow_Box_Record;
State : Gtk.Accessible.Gtk_Accessible_Platform_State)