Gtk.Flow_Box

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

A GtkFlowBox positions child widgets in sequence according to its orientation.

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 Gtk.Scrolled_Window.Gtk_Scrolled_Window to enable that.

The children of a GtkFlowBox can be dynamically sorted and filtered.

Although a GtkFlowBox must have only Gtk.Flow_Box_Child.Gtk_Flow_Box_Child children, you can add any kind of widget to it via Gtk.Container.Add, and a GtkFlowBoxChild widget will automatically be inserted between the box and the widget.

Also see Gtk.List_Box.Gtk_List_Box.

GtkFlowBox was added in GTK+ 3.12.

# CSS nodes

flowbox
├── flowboxchild
│   ╰── <child>
├── flowboxchild
│   ╰── <child>
┊
╰── [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.

"+"

function "+"
  (Widget : access Gtk_Flow_Box_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Flow_Box_Record'Class)
return Gtk.Orientable.Gtk_Orientable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Flow_Box
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Orientable.Gtk_Orientable)
return Gtk_Flow_Box
Parameters
Interf
Return Value

Activate_On_Single_Click_Property

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.

Bind_Model

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;
    User_Data_Free_Func : Glib.G_Destroy_Notify_Address)

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 Gtk.Flow_Box.Insert or Gtk.Container.Add) 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. Since: gtk+ 3.18

Parameters
Self
Model

the Glib.List_Model.Glist_Model to be bound to Box

Create_Widget_Func

a function that creates widgets for items

User_Data_Free_Func

function for freeing User_Data

Cb_GObject_Gtk_Flow_Box_Child_Void

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);
Parameters
Self
Child

Cb_GObject_Gtk_Movement_Step_Gint_Boolean

type Cb_GObject_Gtk_Movement_Step_Gint_Boolean is not null access function
  (Self  : access Glib.Object.GObject_Record'Class;
   Step  : Gtk.Enums.Gtk_Movement_Step;
   Count : Glib.Gint) return Boolean;
Parameters
Self
Step
Count
Return Value

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
  (Self : access Glib.Object.GObject_Record'Class);
Parameters
Self

Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void

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);
Parameters
Self
Child

Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Boolean

type Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Boolean is not null access function
  (Self  : access Gtk_Flow_Box_Record'Class;
   Step  : Gtk.Enums.Gtk_Movement_Step;
   Count : Glib.Gint) return Boolean;
Parameters
Self
Step
Count
Return Value

Cb_Gtk_Flow_Box_Void

type Cb_Gtk_Flow_Box_Void is not null access procedure (Self : access Gtk_Flow_Box_Record'Class);
Parameters
Self

Column_Spacing_Property

Column_Spacing_Property : constant Glib.Properties.Property_Uint;

The amount of horizontal space between two children.

Get_Activate_On_Single_Click

function Get_Activate_On_Single_Click
   (Self : not null access Gtk_Flow_Box_Record) return Boolean

Returns whether children activate on single clicks. Since: gtk+ 3.12

Parameters
Self
Return Value

True if children are activated on single click, False otherwise

Get_Child_At_Index

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. Since: gtk+ 3.12

Parameters
Self
Idx

the position of the child

Return Value

the child widget, which will always be a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child or null in case no child widget with the given index exists.

Get_Child_At_Pos

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. Since: gtk+ 3.22.6

Parameters
Self
X

the x coordinate of the child

Y

the y coordinate of the child

Return Value

the child widget, which will always be a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child or null in case no child widget exists for the given x and y coordinates.

Get_Column_Spacing

function Get_Column_Spacing
   (Self : not null access Gtk_Flow_Box_Record) return Guint

Gets the horizontal spacing. Since: gtk+ 3.12

Parameters
Self
Return Value

the horizontal spacing

Get_Homogeneous

function Get_Homogeneous
   (Self : not null access Gtk_Flow_Box_Record) return Boolean

Returns whether the box is homogeneous (all children are the same size). See Gtk.Box.Set_Homogeneous. Since: gtk+ 3.12

Parameters
Self
Return Value

True if the box is homogeneous.

Get_Max_Children_Per_Line

function Get_Max_Children_Per_Line
   (Self : not null access Gtk_Flow_Box_Record) return Guint

Gets the maximum number of children per line. Since: gtk+ 3.12

Parameters
Self
Return Value

the maximum number of children per line

Get_Min_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. Since: gtk+ 3.12

Parameters
Self
Return Value

the minimum number of children per line

Get_Orientation

function Get_Orientation
   (Self : not null access Gtk_Flow_Box_Record)
    return Gtk.Enums.Gtk_Orientation
Parameters
Self
Return Value

Get_Row_Spacing

function Get_Row_Spacing
   (Self : not null access Gtk_Flow_Box_Record) return Guint

Gets the vertical spacing. Since: gtk+ 3.12

Parameters
Self
Return Value

the vertical spacing

Get_Selected_Children

function Get_Selected_Children
   (Self : not null access Gtk_Flow_Box_Record)
    return Gtk.Widget.Widget_List.Glist

Creates a list of all selected children. Since: gtk+ 3.12

Parameters
Self
Return Value

Get_Selection_Mode

function Get_Selection_Mode
   (Self : not null access Gtk_Flow_Box_Record)
    return Gtk.Enums.Gtk_Selection_Mode

Gets the selection mode of Box. Since: gtk+ 3.12

Parameters
Self
Return Value

the Gtk.Enums.Gtk_Selection_Mode

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Flow_Box

type Gtk_Flow_Box is access all Gtk_Flow_Box_Record'Class;

Gtk_Flow_Box_Create_Widget_Func

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 Glib.List_Model.Glist_Model with Gtk.Flow_Box.Bind_Model for each item that gets added to the model. Since: gtk+ 3.18

Parameters
Item

the item from the model for which to create a widget for

Return Value

a Gtk.Widget.Gtk_Widget that represents Item

Gtk_Flow_Box_Filter_Func

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 whenrever a child changes or is added. It lets you control if the child should be visible or not. Since: gtk+ 3.12

Parameters
Child

a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child that may be filtered

Return Value

True if the row should be visible, False otherwise

Gtk_Flow_Box_Foreach_Func

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. Since: gtk+ 3.12

Parameters
Box

a Gtk.Flow_Box.Gtk_Flow_Box

Child

a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child

Gtk_Flow_Box_New

function Gtk_Flow_Box_New return Gtk_Flow_Box

Creates a GtkFlowBox. Since: gtk+ 3.12

Return Value

Gtk_Flow_Box_Record

type Gtk_Flow_Box_Record is new Gtk_Container_Record with null record;

Gtk_Flow_Box_Sort_Func

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. Since: gtk+ 3.12

Parameters
Child1

the first child

Child2

the second child

Return Value

< 0 if Child1 should be before Child2, 0 if the are equal, and > 0 otherwise

Gtk_New

procedure Gtk_New (Self : out Gtk_Flow_Box)

Creates a GtkFlowBox. Since: gtk+ 3.12 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Homogeneous_Property

Homogeneous_Property : constant Glib.Properties.Property_Boolean;

Determines whether all children should be allocated the same size.

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Flow_Box_Record, Gtk_Flow_Box);

Implements_Gtk_Orientable

package Implements_Gtk_Orientable is new Glib.Types.Implements
  (Gtk.Orientable.Gtk_Orientable, Gtk_Flow_Box_Record, Gtk_Flow_Box);

Initialize

procedure Initialize (Self : not null access Gtk_Flow_Box_Record'Class)

Creates a GtkFlowBox. Since: gtk+ 3.12 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Insert

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 and this function has the same effect as Gtk.Container.Add. If Position is -1, or larger than the total number of children in the Box, then the Widget will be appended to the end. Since: gtk+ 3.12

Parameters
Self
Widget

the Gtk.Widget.Gtk_Widget to add

Position

the position to insert Child in

Invalidate_Filter

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 ot 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. Since: gtk+ 3.12

Parameters
Self

Invalidate_Sort

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. Since: gtk+ 3.12

Parameters
Self

Max_Children_Per_Line_Property

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

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.

On_Activate_Cursor_Child

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)

The ::activate-cursor-child signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user activates the Box.

Parameters
Self
Call
Slot
After

On_Activate_Cursor_Child

procedure On_Activate_Cursor_Child
   (Self  : not null access Gtk_Flow_Box_Record;
    Call  : Cb_Gtk_Flow_Box_Void;
    After : Boolean := False)

The ::activate-cursor-child signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user activates the Box.

Parameters
Self
Call
After

On_Child_Activated

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)

The ::child-activated signal is emitted when a child has been activated by the user.

Parameters
Self
Call
Slot
After

On_Child_Activated

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)

The ::child-activated signal is emitted when a child has been activated by the user.

Parameters
Self
Call
After

On_Move_Cursor

procedure On_Move_Cursor
   (Self  : not null access Gtk_Flow_Box_Record;
    Call  : Cb_GObject_Gtk_Movement_Step_Gint_Boolean;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::move-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a cursor movement.

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 modifer does not. There are too many key combinations to list them all here. - Arrow keys move by individual children - Home/End keys move to the ends of the box - PageUp/PageDown keys move vertically by pages

Callback parameters: -- @param Step the granularity fo the move, as a -- Gtk.Enums.Gtk_Movement_Step -- @param Count the number of Step units to move

Parameters
Self
Call
Slot
After

On_Move_Cursor

procedure On_Move_Cursor
   (Self  : not null access Gtk_Flow_Box_Record;
    Call  : Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Boolean;
    After : Boolean := False)

The ::move-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a cursor movement.

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 modifer does not. There are too many key combinations to list them all here. - Arrow keys move by individual children - Home/End keys move to the ends of the box - PageUp/PageDown keys move vertically by pages

Callback parameters: -- @param Step the granularity fo the move, as a -- Gtk.Enums.Gtk_Movement_Step -- @param Count the number of Step units to move

Parameters
Self
Call
After

On_Select_All

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)

The ::select-all signal is a [keybinding signal][GtkBindingSignal] which gets emitted to select all children of the box, if the selection mode permits it.

The default bindings for this signal is Ctrl-a.

Parameters
Self
Call
Slot
After

On_Select_All

procedure On_Select_All
   (Self  : not null access Gtk_Flow_Box_Record;
    Call  : Cb_Gtk_Flow_Box_Void;
    After : Boolean := False)

The ::select-all signal is a [keybinding signal][GtkBindingSignal] which gets emitted to select all children of the box, if the selection mode permits it.

The default bindings for this signal is Ctrl-a.

Parameters
Self
Call
After

On_Selected_Children_Changed

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)

The ::selected-children-changed signal is emitted when the set of selected children changes.

Use Gtk.Flow_Box.Selected_Foreach or Gtk.Flow_Box.Get_Selected_Children to obtain the selected children.

Parameters
Self
Call
Slot
After

On_Selected_Children_Changed

procedure On_Selected_Children_Changed
   (Self  : not null access Gtk_Flow_Box_Record;
    Call  : Cb_Gtk_Flow_Box_Void;
    After : Boolean := False)

The ::selected-children-changed signal is emitted when the set of selected children changes.

Use Gtk.Flow_Box.Selected_Foreach or Gtk.Flow_Box.Get_Selected_Children to obtain the selected children.

Parameters
Self
Call
After

On_Toggle_Cursor_Child

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)

The ::toggle-cursor-child signal is a [keybinding signal][GtkBindingSignal] which toggles the selection of the child that has the focus.

The default binding for this signal is Ctrl-Space.

Parameters
Self
Call
Slot
After

On_Toggle_Cursor_Child

procedure On_Toggle_Cursor_Child
   (Self  : not null access Gtk_Flow_Box_Record;
    Call  : Cb_Gtk_Flow_Box_Void;
    After : Boolean := False)

The ::toggle-cursor-child signal is a [keybinding signal][GtkBindingSignal] which toggles the selection of the child that has the focus.

The default binding for this signal is Ctrl-Space.

Parameters
Self
Call
After

On_Unselect_All

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)

The ::unselect-all signal is a [keybinding signal][GtkBindingSignal] which gets emitted to unselect all children of the box, if the selection mode permits it.

The default bindings for this signal is Ctrl-Shift-a.

Parameters
Self
Call
Slot
After

On_Unselect_All

procedure On_Unselect_All
   (Self  : not null access Gtk_Flow_Box_Record;
    Call  : Cb_Gtk_Flow_Box_Void;
    After : Boolean := False)

The ::unselect-all signal is a [keybinding signal][GtkBindingSignal] which gets emitted to unselect all children of the box, if the selection mode permits it.

The default bindings for this signal is Ctrl-Shift-a.

Parameters
Self
Call
After

Row_Spacing_Property

Row_Spacing_Property : constant Glib.Properties.Property_Uint;

The amount of vertical space between two children.

Select_All

procedure Select_All (Self : not null access Gtk_Flow_Box_Record)

Select all children of Box, if the selection mode allows it. Since: gtk+ 3.12

Parameters
Self

Select_Child

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. Since: gtk+ 3.12

Parameters
Self
Child

a child of Box

Selected_Foreach

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. Since: gtk+ 3.12

Parameters
Self
Func

the function to call for each selected child

Selection_Mode_Property

Selection_Mode_Property : constant Gtk.Enums.Property_Gtk_Selection_Mode;

The selection mode used by the flow box.

Set_Activate_On_Single_Click

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. Since: gtk+ 3.12

Parameters
Self
Single

True to emit child-activated on a single click

Set_Column_Spacing

procedure Set_Column_Spacing
   (Self    : not null access Gtk_Flow_Box_Record;
    Spacing : Guint)

Sets the horizontal space to add between children. See the Gtk.Flow_Box.Gtk_Flow_Box:column-spacing property. Since: gtk+ 3.12

Parameters
Self
Spacing

the spacing to use

Set_Filter_Func

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 Gtk.Flow_Box_Child.Changed) or when Gtk.Flow_Box.Invalidate_Filter is called. Note that using a filter function is incompatible with using a model (see Gtk.Flow_Box.Bind_Model). Since: gtk+ 3.12

Parameters
Self
Filter_Func

callback that lets you filter which children to show

Set_Hadjustment

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 Gtk.Scrolled_Window.Get_Hadjustment for a typical way of obtaining the adjustment, and Gtk.Flow_Box.Set_Vadjustmentfor 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. Since: gtk+ 3.12

Parameters
Self
Adjustment

an adjustment which should be adjusted when the focus is moved among the descendents of Container

Set_Homogeneous

procedure Set_Homogeneous
   (Self        : not null access Gtk_Flow_Box_Record;
    Homogeneous : Boolean)

Sets the Gtk.Flow_Box.Gtk_Flow_Box:homogeneous property of Box, controlling whether or not all children of Box are given equal space in the box. Since: gtk+ 3.12

Parameters
Self
Homogeneous

True to create equal allotments, False for variable allotments

Set_Max_Children_Per_Line

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. Since: gtk+ 3.12

Parameters
Self
N_Children

the maximum number of children per line

Set_Min_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. Since: gtk+ 3.12

Parameters
Self
N_Children

the minimum number of children per line

Set_Orientation

procedure Set_Orientation
   (Self        : not null access Gtk_Flow_Box_Record;
    Orientation : Gtk.Enums.Gtk_Orientation)
Parameters
Self
Orientation

Set_Row_Spacing

procedure Set_Row_Spacing
   (Self    : not null access Gtk_Flow_Box_Record;
    Spacing : Guint)

Sets the vertical space to add between children. See the Gtk.Flow_Box.Gtk_Flow_Box:row-spacing property. Since: gtk+ 3.12

Parameters
Self
Spacing

the spacing to use

Set_Selection_Mode

procedure Set_Selection_Mode
   (Self : not null access Gtk_Flow_Box_Record;
    Mode : Gtk.Enums.Gtk_Selection_Mode)

Sets how selection works in Box. See Gtk.Enums.Gtk_Selection_Mode for details. Since: gtk+ 3.12

Parameters
Self
Mode

the new selection mode

Set_Sort_Func

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 Gtk.Flow_Box_Child.Changed) and when Gtk.Flow_Box.Invalidate_Sort is called. Note that using a sort function is incompatible with using a model (see Gtk.Flow_Box.Bind_Model). Since: gtk+ 3.12

Parameters
Self
Sort_Func

the sort function

Set_Vadjustment

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 Gtk.Scrolled_Window.Get_Vadjustment for a typical way of obtaining the adjustment, and Gtk.Flow_Box.Set_Hadjustmentfor 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. Since: gtk+ 3.12

Parameters
Self
Adjustment

an adjustment which should be adjusted when the focus is moved among the descendents of Container

Signal_Activate_Cursor_Child

Signal_Activate_Cursor_Child : constant Glib.Signal_Name := "activate-cursor-child";

The ::activate-cursor-child signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user activates the Box.

Signal_Child_Activated

Signal_Child_Activated : constant Glib.Signal_Name := "child-activated";

The ::child-activated signal is emitted when a child has been activated by the user.

Signal_Move_Cursor

Signal_Move_Cursor : constant Glib.Signal_Name := "move-cursor";

The ::move-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a cursor movement.

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 modifer does not. There are too many key combinations to list them all here. - Arrow keys move by individual children - Home/End keys move to the ends of the box - PageUp/PageDown keys move vertically by pages

Callback parameters: -- @param Step the granularity fo the move, as a -- Gtk.Enums.Gtk_Movement_Step -- @param Count the number of Step units to move

Signal_Select_All

Signal_Select_All : constant Glib.Signal_Name := "select-all";

The ::select-all signal is a [keybinding signal][GtkBindingSignal] which gets emitted to select all children of the box, if the selection mode permits it.

The default bindings for this signal is Ctrl-a.

Signal_Selected_Children_Changed

Signal_Selected_Children_Changed : constant Glib.Signal_Name := "selected-children-changed";

The ::selected-children-changed signal is emitted when the set of selected children changes.

Use Gtk.Flow_Box.Selected_Foreach or Gtk.Flow_Box.Get_Selected_Children to obtain the selected children.

Signal_Toggle_Cursor_Child

Signal_Toggle_Cursor_Child : constant Glib.Signal_Name := "toggle-cursor-child";

The ::toggle-cursor-child signal is a [keybinding signal][GtkBindingSignal] which toggles the selection of the child that has the focus.

The default binding for this signal is Ctrl-Space.

Signal_Unselect_All

Signal_Unselect_All : constant Glib.Signal_Name := "unselect-all";

The ::unselect-all signal is a [keybinding signal][GtkBindingSignal] which gets emitted to unselect all children of the box, if the selection mode permits it.

The default bindings for this signal is Ctrl-Shift-a.

Unselect_All

procedure Unselect_All (Self : not null access Gtk_Flow_Box_Record)

Unselect all children of Box, if the selection mode allows it. Since: gtk+ 3.12

Parameters
Self

Unselect_Child

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. Since: gtk+ 3.12

Parameters
Self
Child

a child of Box