FlowBoxProtocol
public protocol FlowBoxProtocol : ContainerProtocol, OrientableProtocol
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 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 gtk_container_add(), and
a GtkFlowBoxChild widget will automatically be inserted between
the box and the widget.
Also see GtkListBox.
GtkFlowBox was added in GTK+ 3.12.
CSS nodes
(plain Language Example):
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.
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: ) The
activate-cursor-childsignal is a keybinding signal which gets emitted when the user activates thebox.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: ) The
child-activatedsignal is 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: ) The
move-cursorsignal is a keybinding signal 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
Note
This represents the underlyingmove-cursorsignalDeclaration
Swift
@discardableResult @inlinable func onMoveCursor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: FlowBoxRef, _ step: MovementStep, _ count: Int) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
stepthe granularity fo the move, as a
GtkMovementStepcountthe number of
stepunits to movehandlertrueto 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: ) The
select-allsignal is a keybinding signal 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.
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: ) The
selected-children-changedsignal is emitted when the set of selected children changes.Use
gtk_flow_box_selected_foreach()orgtk_flow_box_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: ) The
toggle-cursor-childsignal is a keybinding signal which toggles the selection of the child that has the focus.The default binding for this signal is Ctrl-Space.
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: ) The
unselect-allsignal is a keybinding signal 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.
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 } -
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
gtk_flow_box_insert()orgtk_container_add()) 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
gtk_flow_box_insert()orgtk_container_add()) 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.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 (all children are the same size). See
gtk_box_set_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 and this function has the same effect as
gtk_container_add().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() -
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. See the
GtkFlowBox:column-spacingproperty.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 (viagtk_flow_box_child_changed()) or whengtk_flow_box_invalidate_filter()is called.Note that using a filter function is incompatible with using a model (see
gtk_flow_box_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. Seegtk_scrolled_window_get_hadjustment()for a typical way of obtaining the adjustment, andgtk_flow_box_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 the
GtkFlowBox:homogeneousproperty ofbox, controlling whether or not all children ofboxare 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. See the
GtkFlowBox:row-spacingproperty.Declaration
Swift
@inlinable func setRow(spacing: Int) -
setSelection(mode:Extension method) Sets how selection works in
box. SeeGtkSelectionModefor details.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 (viagtk_flow_box_child_changed()) and whengtk_flow_box_invalidate_sort()is called.Note that using a sort function is incompatible with using a model (see
gtk_flow_box_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. Seegtk_scrolled_window_get_vadjustment()for a typical way of obtaining the adjustment, andgtk_flow_box_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 } -
containerExtension methodUndocumented
Declaration
Swift
@inlinable var container: GtkContainer { get }
View on GitHub
Install in Dash
FlowBoxProtocol Protocol Reference