FlowBoxProtocol
public protocol FlowBoxProtocol : OrientableProtocol, WidgetProtocol
A GtkFlowBox puts child widgets in reflowing grid.
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].
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.
Accessibility
GtkFlowBox uses the GTK_ACCESSIBLE_ROLE_GRID role, and GtkFlowBoxChild
uses the GTK_ACCESSIBLE_ROLE_GRID_CELL role.
The FlowBoxProtocol protocol exposes the methods and properties of an underlying GtkFlowBox instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see FlowBox.
Alternatively, use FlowBoxRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkFlowBoxinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
flow_box_ptrDefault implementationTyped pointer to the underlying
GtkFlowBoxinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkFlowBoxinstance.Declaration
Swift
var flow_box_ptr: UnsafeMutablePointer<GtkFlowBox>! { get } -
Required Initialiser for types conforming to
FlowBoxProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
FlowBoxPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: FlowBoxPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a FlowBox property
Declaration
Swift
@inlinable func get(property: FlowBoxPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a FlowBox property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: FlowBoxPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
FlowBoxSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: FlowBoxSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
FlowBoxSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: FlowBoxSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onActivateCursorChild(flags:Extension methodhandler: ) Emitted when the user activates the
box.This is a keybinding signal.
Note
This represents the underlyingactivate-cursor-childsignalDeclaration
Swift
@discardableResult @inlinable func onActivateCursorChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
activateCursorChildsignal is emitted -
activateCursorChildSignalExtension methodTyped
activate-cursor-childsignal for using theconnect(signal:)methodsDeclaration
Swift
static var activateCursorChildSignal: FlowBoxSignalName { get } -
onChildActivated(flags:Extension methodhandler: ) Emitted when a child has been activated by the user.
Note
This represents the underlyingchild-activatedsignalDeclaration
Swift
@discardableResult @inlinable func onChildActivated(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ child: FlowBoxChildRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
childthe child that is activated
handlerThe signal handler to call Run the given callback whenever the
childActivatedsignal is emitted -
childActivatedSignalExtension methodTyped
child-activatedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var childActivatedSignal: FlowBoxSignalName { get } -
onMoveCursor(flags:Extension methodhandler: ) 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
Note
This represents the underlyingmove-cursorsignalDeclaration
Swift
@discardableResult @inlinable func onMoveCursor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ step: MovementStep, _ count: Int, _ extend: Bool, _ modify: Bool) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
stepthe granularity fo the move, as a
GtkMovementStepcountthe number of
stepunits to moveextendwhether to extend the selection
modifywhether to modify the selection
handlertrueto stop other handlers from being invoked for the event.falseto propagate the event further. Run the given callback whenever themoveCursorsignal is emitted -
moveCursorSignalExtension methodTyped
move-cursorsignal for using theconnect(signal:)methodsDeclaration
Swift
static var moveCursorSignal: FlowBoxSignalName { get } -
onSelectAll(flags:Extension methodhandler: ) 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>.
Note
This represents the underlyingselect-allsignalDeclaration
Swift
@discardableResult @inlinable func onSelectAll(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
selectAllsignal is emitted -
selectAllSignalExtension methodTyped
select-allsignal for using theconnect(signal:)methodsDeclaration
Swift
static var selectAllSignal: FlowBoxSignalName { get } -
onSelectedChildrenChanged(flags:Extension methodhandler: ) Emitted when the set of selected children changes.
Use [method
Gtk.FlowBox.selected_foreach] or [methodGtk.FlowBox.get_selected_children] to obtain the selected children.Note
This represents the underlyingselected-children-changedsignalDeclaration
Swift
@discardableResult @inlinable func onSelectedChildrenChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
selectedChildrenChangedsignal is emitted -
selectedChildrenChangedSignalExtension methodTyped
selected-children-changedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var selectedChildrenChangedSignal: FlowBoxSignalName { get } -
onToggleCursorChild(flags:Extension methodhandler: ) 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>.
Note
This represents the underlyingtoggle-cursor-childsignalDeclaration
Swift
@discardableResult @inlinable func onToggleCursorChild(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
toggleCursorChildsignal is emitted -
toggleCursorChildSignalExtension methodTyped
toggle-cursor-childsignal for using theconnect(signal:)methodsDeclaration
Swift
static var toggleCursorChildSignal: FlowBoxSignalName { get } -
onUnselectAll(flags:Extension methodhandler: ) 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>.
Note
This represents the underlyingunselect-allsignalDeclaration
Swift
@discardableResult @inlinable func onUnselectAll(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
unselectAllsignal is emitted -
unselectAllSignalExtension methodTyped
unselect-allsignal for using theconnect(signal:)methodsDeclaration
Swift
static var unselectAllSignal: FlowBoxSignalName { get } -
onNotifyAcceptUnpairedRelease(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::accept-unpaired-releasesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptUnpairedRelease(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAcceptUnpairedReleasesignal is emitted -
notifyAcceptUnpairedReleaseSignalExtension methodTyped
notify::accept-unpaired-releasesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAcceptUnpairedReleaseSignal: FlowBoxSignalName { get } -
onNotifyActivateOnSingleClick(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::activate-on-single-clicksignalDeclaration
Swift
@discardableResult @inlinable func onNotifyActivateOnSingleClick(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyActivateOnSingleClicksignal is emitted -
notifyActivateOnSingleClickSignalExtension methodTyped
notify::activate-on-single-clicksignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyActivateOnSingleClickSignal: FlowBoxSignalName { get } -
onNotifyColumnSpacing(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::column-spacingsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyColumnSpacing(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyColumnSpacingsignal is emitted -
notifyColumnSpacingSignalExtension methodTyped
notify::column-spacingsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyColumnSpacingSignal: FlowBoxSignalName { get } -
onNotifyHomogeneous(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::homogeneoussignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHomogeneous(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHomogeneoussignal is emitted -
notifyHomogeneousSignalExtension methodTyped
notify::homogeneoussignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHomogeneousSignal: FlowBoxSignalName { get } -
onNotifyMaxChildrenPerLine(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::max-children-per-linesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMaxChildrenPerLine(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMaxChildrenPerLinesignal is emitted -
notifyMaxChildrenPerLineSignalExtension methodTyped
notify::max-children-per-linesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMaxChildrenPerLineSignal: FlowBoxSignalName { get } -
onNotifyMinChildrenPerLine(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::min-children-per-linesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMinChildrenPerLine(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyMinChildrenPerLinesignal is emitted -
notifyMinChildrenPerLineSignalExtension methodTyped
notify::min-children-per-linesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyMinChildrenPerLineSignal: FlowBoxSignalName { get } -
onNotifyRowSpacing(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::row-spacingsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyRowSpacing(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyRowSpacingsignal is emitted -
notifyRowSpacingSignalExtension methodTyped
notify::row-spacingsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyRowSpacingSignal: FlowBoxSignalName { get } -
onNotifySelectionMode(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::selection-modesignalDeclaration
Swift
@discardableResult @inlinable func onNotifySelectionMode(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifySelectionModesignal is emitted -
notifySelectionModeSignalExtension methodTyped
notify::selection-modesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifySelectionModeSignal: FlowBoxSignalName { get }
-
bind(model:Extension methodcreateWidgetFunc: userData: userDataFreeFunc: ) Binds
modeltobox.If
boxwas already bound to a model, that previous binding is destroyed.The contents of
boxare cleared and then filled with widgets that represent items frommodel.boxis updated whenevermodelchanges. Ifmodelisnil,boxis left empty.It is undefined to add or remove widgets directly (for example, with [method
Gtk.FlowBox.insert]) whileboxis 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.Declaration
Swift
@inlinable func bind(model: GIO.ListModelRef? = nil, createWidgetFunc: GtkFlowBoxCreateWidgetFunc?, userData: gpointer! = nil, userDataFreeFunc: GDestroyNotify?) -
bind(model:Extension methodcreateWidgetFunc: userData: userDataFreeFunc: ) Binds
modeltobox.If
boxwas already bound to a model, that previous binding is destroyed.The contents of
boxare cleared and then filled with widgets that represent items frommodel.boxis updated whenevermodelchanges. Ifmodelisnil,boxis left empty.It is undefined to add or remove widgets directly (for example, with [method
Gtk.FlowBox.insert]) whileboxis 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.Declaration
Swift
@inlinable func bind<ListModelT>(model: ListModelT?, createWidgetFunc: GtkFlowBoxCreateWidgetFunc?, userData: gpointer! = nil, userDataFreeFunc: GDestroyNotify?) where ListModelT : ListModelProtocol -
getActivateOnSingleClick()Extension methodReturns whether children activate on single clicks.
Declaration
Swift
@inlinable func getActivateOnSingleClick() -> Bool -
getChildAtIndex(idx:Extension method) Gets the nth child in the
box.Declaration
Swift
@inlinable func getChildAtIndex(idx: Int) -> FlowBoxChildRef! -
getChildAtPos(x:Extension methody: ) Gets the child in the (
x,y) position.Both
xandyare assumed to be relative to the origin ofbox.Declaration
Swift
@inlinable func getChildAtPos(x: Int, y: Int) -> FlowBoxChildRef! -
getColumnSpacing()Extension methodGets the horizontal spacing.
Declaration
Swift
@inlinable func getColumnSpacing() -> Int -
getHomogeneous()Extension methodReturns whether the box is homogeneous.
Declaration
Swift
@inlinable func getHomogeneous() -> Bool -
getMaxChildrenPerLine()Extension methodGets the maximum number of children per line.
Declaration
Swift
@inlinable func getMaxChildrenPerLine() -> Int -
getMinChildrenPerLine()Extension methodGets the minimum number of children per line.
Declaration
Swift
@inlinable func getMinChildrenPerLine() -> Int -
getRowSpacing()Extension methodGets the vertical spacing.
Declaration
Swift
@inlinable func getRowSpacing() -> Int -
getSelectedChildren()Extension methodCreates a list of all selected children.
Declaration
Swift
@inlinable func getSelectedChildren() -> GLib.ListRef! -
getSelectionMode()Extension methodGets the selection mode of
box.Declaration
Swift
@inlinable func getSelectionMode() -> GtkSelectionMode -
insert(widget:Extension methodposition: ) Inserts the
widgetintoboxatposition.If a sort function is set, the widget will actually be inserted at the calculated position.
If
positionis -1, or larger than the total number of children in thebox, then thewidgetwill be appended to the end.Declaration
Swift
@inlinable func insert<WidgetT>(widget: WidgetT, position: Int) where WidgetT : WidgetProtocol -
invalidateFilter()Extension methodUpdates the filtering for all children.
Call this function when the result of the filter function on the
boxis 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.Declaration
Swift
@inlinable func invalidateFilter() -
invalidateSort()Extension methodUpdates the sorting for all children.
Call this when the result of the sort function on
boxis changed due to an external factor.Declaration
Swift
@inlinable func invalidateSort() -
remove(widget:Extension method) Removes a child from
box.Declaration
Swift
@inlinable func remove<WidgetT>(widget: WidgetT) where WidgetT : WidgetProtocol -
selectAll()Extension methodSelect all children of
box, if the selection mode allows it.Declaration
Swift
@inlinable func selectAll() -
select(child:Extension method) Selects a single child of
box, if the selection mode allows it.Declaration
Swift
@inlinable func select<FlowBoxChildT>(child: FlowBoxChildT) where FlowBoxChildT : FlowBoxChildProtocol -
selectedForeach(func:Extension methoddata: ) Calls a function for each selected child.
Note that the selection cannot be modified from within this function.
Declaration
Swift
@inlinable func selectedForeach(func: GtkFlowBoxForeachFunc?, data: gpointer! = nil) -
setActivateOnSingleClick(single:Extension method) If
singleistrue, children will be activated when you click on them, otherwise you need to double-click.Declaration
Swift
@inlinable func setActivateOnSingleClick(single: Bool) -
setColumn(spacing:Extension method) Sets the horizontal space to add between children.
Declaration
Swift
@inlinable func setColumn(spacing: Int) -
set(filterFunc:Extension methoduserData: destroy: ) By setting a filter function on the
boxone 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_funcwill 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 [method
Gtk.FlowBox.bind_model]).Declaration
Swift
@inlinable func set(filterFunc: GtkFlowBoxFilterFunc? = nil, userData: gpointer! = nil, destroy: GDestroyNotify?) -
setHadjustment(adjustment:Extension method) Hooks up an adjustment to focus handling in
box.The adjustment is also used for autoscrolling during rubberband selection. See [method
Gtk.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.
Declaration
Swift
@inlinable func setHadjustment<AdjustmentT>(adjustment: AdjustmentT) where AdjustmentT : AdjustmentProtocol -
set(homogeneous:Extension method) Sets whether or not all children of
boxare given equal space in the box.Declaration
Swift
@inlinable func set(homogeneous: Bool) -
setMaxChildrenPerLine(nChildren:Extension method) 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_childrenchildren long in the given orientation.Declaration
Swift
@inlinable func setMaxChildrenPerLine(nChildren: Int) -
setMinChildrenPerLine(nChildren:Extension method) Sets the minimum number of children to line up in
box’s orientation before flowing.Declaration
Swift
@inlinable func setMinChildrenPerLine(nChildren: Int) -
setRow(spacing:Extension method) Sets the vertical space to add between children.
Declaration
Swift
@inlinable func setRow(spacing: Int) -
setSelection(mode:Extension method) Sets how selection works in
box.Declaration
Swift
@inlinable func setSelection(mode: GtkSelectionMode) -
set(sortFunc:Extension methoduserData: destroy: ) 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_funcwill 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 [method
Gtk.FlowBox.bind_model]).Declaration
Swift
@inlinable func set(sortFunc: GtkFlowBoxSortFunc? = nil, userData: gpointer! = nil, destroy: GDestroyNotify?) -
setVadjustment(adjustment:Extension method) Hooks up an adjustment to focus handling in
box.The adjustment is also used for autoscrolling during rubberband selection. See [method
Gtk.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.
Declaration
Swift
@inlinable func setVadjustment<AdjustmentT>(adjustment: AdjustmentT) where AdjustmentT : AdjustmentProtocol -
unselectAll()Extension methodUnselect all children of
box, if the selection mode allows it.Declaration
Swift
@inlinable func unselectAll() -
unselect(child:Extension method) Unselects a single child of
box, if the selection mode allows it.Declaration
Swift
@inlinable func unselect<FlowBoxChildT>(child: FlowBoxChildT) where FlowBoxChildT : FlowBoxChildProtocol -
activateOnSingleClickExtension methodReturns whether children activate on single clicks.
Declaration
Swift
@inlinable var activateOnSingleClick: Bool { get nonmutating set } -
columnSpacingExtension methodGets the horizontal spacing.
Declaration
Swift
@inlinable var columnSpacing: Int { get nonmutating set } -
homogeneousExtension methodDetermines whether all children should be allocated the same size.
Declaration
Swift
@inlinable var homogeneous: Bool { get nonmutating set } -
maxChildrenPerLineExtension methodGets the maximum number of children per line.
Declaration
Swift
@inlinable var maxChildrenPerLine: Int { get nonmutating set } -
minChildrenPerLineExtension methodGets the minimum number of children per line.
Declaration
Swift
@inlinable var minChildrenPerLine: Int { get nonmutating set } -
rowSpacingExtension methodGets the vertical spacing.
Declaration
Swift
@inlinable var rowSpacing: Int { get nonmutating set } -
selectedChildrenExtension methodCreates a list of all selected children.
Declaration
Swift
@inlinable var selectedChildren: GLib.ListRef! { get } -
selectionModeExtension methodGets the selection mode of
box.Declaration
Swift
@inlinable var selectionMode: GtkSelectionMode { get nonmutating set }
View on GitHub
Install in Dash
FlowBoxProtocol Protocol Reference