Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- append
- bindModel
- getActivateOnSingleClick
- getChildAtIndex
- getChildAtPos
- getColumnSpacing
- getHomogeneous
- getMaxChildrenPerLine
- getMinChildrenPerLine
- getRowSpacing
- getSelectedChildren
- getSelectionMode
- insert
- invalidateFilter
- invalidateSort
- new
- prepend
- remove
- removeAll
- selectAll
- selectChild
- selectedForeach
- setActivateOnSingleClick
- setColumnSpacing
- setFilterFunc
- setHadjustment
- setHomogeneous
- setMaxChildrenPerLine
- setMinChildrenPerLine
- setRowSpacing
- setSelectionMode
- setSortFunc
- setVadjustment
- unselectAll
- unselectChild
- Properties
- Signals
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 flowBoxInsert
, and a
GtkFlowBoxChild
widget will automatically be inserted between the box
and the widget.
Also see ListBox
.
Shortcuts and Gestures
The following signals have default keybindings:
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 AccessibleRoleGrid
role, and GtkFlowBoxChild
uses the AccessibleRoleGridCell
role.
Synopsis
- newtype FlowBox = FlowBox (ManagedPtr FlowBox)
- class (GObject o, IsDescendantOf FlowBox o) => IsFlowBox o
- toFlowBox :: (MonadIO m, IsFlowBox o) => o -> m FlowBox
- flowBoxAppend :: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) => a -> b -> m ()
- flowBoxBindModel :: (HasCallStack, MonadIO m, IsFlowBox a, IsListModel b) => a -> Maybe b -> FlowBoxCreateWidgetFunc -> m ()
- flowBoxGetActivateOnSingleClick :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m Bool
- flowBoxGetChildAtIndex :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Int32 -> m (Maybe FlowBoxChild)
- flowBoxGetChildAtPos :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Int32 -> Int32 -> m (Maybe FlowBoxChild)
- flowBoxGetColumnSpacing :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m Word32
- flowBoxGetHomogeneous :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m Bool
- flowBoxGetMaxChildrenPerLine :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m Word32
- flowBoxGetMinChildrenPerLine :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m Word32
- flowBoxGetRowSpacing :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m Word32
- flowBoxGetSelectedChildren :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m [FlowBoxChild]
- flowBoxGetSelectionMode :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m SelectionMode
- flowBoxInsert :: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) => a -> b -> Int32 -> m ()
- flowBoxInvalidateFilter :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m ()
- flowBoxInvalidateSort :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m ()
- flowBoxNew :: (HasCallStack, MonadIO m) => m FlowBox
- flowBoxPrepend :: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) => a -> b -> m ()
- flowBoxRemove :: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) => a -> b -> m ()
- flowBoxRemoveAll :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m ()
- flowBoxSelectAll :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m ()
- flowBoxSelectChild :: (HasCallStack, MonadIO m, IsFlowBox a, IsFlowBoxChild b) => a -> b -> m ()
- flowBoxSelectedForeach :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> FlowBoxForeachFunc -> m ()
- flowBoxSetActivateOnSingleClick :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Bool -> m ()
- flowBoxSetColumnSpacing :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Word32 -> m ()
- flowBoxSetFilterFunc :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Maybe FlowBoxFilterFunc -> m ()
- flowBoxSetHadjustment :: (HasCallStack, MonadIO m, IsFlowBox a, IsAdjustment b) => a -> b -> m ()
- flowBoxSetHomogeneous :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Bool -> m ()
- flowBoxSetMaxChildrenPerLine :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Word32 -> m ()
- flowBoxSetMinChildrenPerLine :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Word32 -> m ()
- flowBoxSetRowSpacing :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Word32 -> m ()
- flowBoxSetSelectionMode :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> SelectionMode -> m ()
- flowBoxSetSortFunc :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> Maybe FlowBoxSortFunc -> m ()
- flowBoxSetVadjustment :: (HasCallStack, MonadIO m, IsFlowBox a, IsAdjustment b) => a -> b -> m ()
- flowBoxUnselectAll :: (HasCallStack, MonadIO m, IsFlowBox a) => a -> m ()
- flowBoxUnselectChild :: (HasCallStack, MonadIO m, IsFlowBox a, IsFlowBoxChild b) => a -> b -> m ()
- constructFlowBoxAcceptUnpairedRelease :: (IsFlowBox o, MonadIO m) => Bool -> m (GValueConstruct o)
- getFlowBoxAcceptUnpairedRelease :: (MonadIO m, IsFlowBox o) => o -> m Bool
- setFlowBoxAcceptUnpairedRelease :: (MonadIO m, IsFlowBox o) => o -> Bool -> m ()
- constructFlowBoxActivateOnSingleClick :: (IsFlowBox o, MonadIO m) => Bool -> m (GValueConstruct o)
- getFlowBoxActivateOnSingleClick :: (MonadIO m, IsFlowBox o) => o -> m Bool
- setFlowBoxActivateOnSingleClick :: (MonadIO m, IsFlowBox o) => o -> Bool -> m ()
- constructFlowBoxColumnSpacing :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getFlowBoxColumnSpacing :: (MonadIO m, IsFlowBox o) => o -> m Word32
- setFlowBoxColumnSpacing :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m ()
- constructFlowBoxHomogeneous :: (IsFlowBox o, MonadIO m) => Bool -> m (GValueConstruct o)
- getFlowBoxHomogeneous :: (MonadIO m, IsFlowBox o) => o -> m Bool
- setFlowBoxHomogeneous :: (MonadIO m, IsFlowBox o) => o -> Bool -> m ()
- constructFlowBoxMaxChildrenPerLine :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getFlowBoxMaxChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> m Word32
- setFlowBoxMaxChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m ()
- constructFlowBoxMinChildrenPerLine :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getFlowBoxMinChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> m Word32
- setFlowBoxMinChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m ()
- constructFlowBoxRowSpacing :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getFlowBoxRowSpacing :: (MonadIO m, IsFlowBox o) => o -> m Word32
- setFlowBoxRowSpacing :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m ()
- constructFlowBoxSelectionMode :: (IsFlowBox o, MonadIO m) => SelectionMode -> m (GValueConstruct o)
- getFlowBoxSelectionMode :: (MonadIO m, IsFlowBox o) => o -> m SelectionMode
- setFlowBoxSelectionMode :: (MonadIO m, IsFlowBox o) => o -> SelectionMode -> m ()
- type FlowBoxActivateCursorChildCallback = IO ()
- afterFlowBoxActivateCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxActivateCursorChildCallback) -> m SignalHandlerId
- onFlowBoxActivateCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxActivateCursorChildCallback) -> m SignalHandlerId
- type FlowBoxChildActivatedCallback = FlowBoxChild -> IO ()
- afterFlowBoxChildActivated :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivatedCallback) -> m SignalHandlerId
- onFlowBoxChildActivated :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivatedCallback) -> m SignalHandlerId
- type FlowBoxMoveCursorCallback = MovementStep -> Int32 -> Bool -> Bool -> IO Bool
- afterFlowBoxMoveCursor :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxMoveCursorCallback) -> m SignalHandlerId
- onFlowBoxMoveCursor :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxMoveCursorCallback) -> m SignalHandlerId
- type FlowBoxSelectAllCallback = IO ()
- afterFlowBoxSelectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectAllCallback) -> m SignalHandlerId
- onFlowBoxSelectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectAllCallback) -> m SignalHandlerId
- type FlowBoxSelectedChildrenChangedCallback = IO ()
- afterFlowBoxSelectedChildrenChanged :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectedChildrenChangedCallback) -> m SignalHandlerId
- onFlowBoxSelectedChildrenChanged :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectedChildrenChangedCallback) -> m SignalHandlerId
- type FlowBoxToggleCursorChildCallback = IO ()
- afterFlowBoxToggleCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxToggleCursorChildCallback) -> m SignalHandlerId
- onFlowBoxToggleCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxToggleCursorChildCallback) -> m SignalHandlerId
- type FlowBoxUnselectAllCallback = IO ()
- afterFlowBoxUnselectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxUnselectAllCallback) -> m SignalHandlerId
- onFlowBoxUnselectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxUnselectAllCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq FlowBox Source # | |
GObject FlowBox Source # | |
Defined in GI.Gtk.Objects.FlowBox | |
ManagedPtrNewtype FlowBox Source # | |
Defined in GI.Gtk.Objects.FlowBox toManagedPtr :: FlowBox -> ManagedPtr FlowBox # | |
TypedObject FlowBox Source # | |
Defined in GI.Gtk.Objects.FlowBox | |
HasParentTypes FlowBox Source # | |
Defined in GI.Gtk.Objects.FlowBox | |
IsGValue (Maybe FlowBox) Source # | Convert |
Defined in GI.Gtk.Objects.FlowBox | |
type ParentTypes FlowBox Source # | |
Defined in GI.Gtk.Objects.FlowBox |
class (GObject o, IsDescendantOf FlowBox o) => IsFlowBox o Source #
Instances
(GObject o, IsDescendantOf FlowBox o) => IsFlowBox o Source # | |
Defined in GI.Gtk.Objects.FlowBox |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, append, bindModel, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insert, insertActionGroup, insertAfter, insertBefore, invalidateFilter, invalidateSort, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, prepend, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeAll, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, selectAll, selectChild, selectedForeach, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unselectAll, unselectChild, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getActivateOnSingleClick, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildAtIndex, getChildAtPos, getChildVisible, getClipboard, getColor, getColumnSpacing, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHomogeneous, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMaxChildrenPerLine, getMinChildrenPerLine, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOrientation, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getRowSpacing, getScaleFactor, getSelectedChildren, getSelectionMode, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setActivateOnSingleClick, setCanFocus, setCanTarget, setChildVisible, setColumnSpacing, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFilterFunc, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHadjustment, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHomogeneous, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMaxChildrenPerLine, setMinChildrenPerLine, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setReceivesDefault, setRowSpacing, setSelectionMode, setSensitive, setSizeRequest, setSortFunc, setStateFlags, setTooltipMarkup, setTooltipText, setVadjustment, setValign, setVexpand, setVexpandSet, setVisible.
append
:: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
to the end of self
.
If a sort function is set, the widget will actually be inserted at the calculated position.
See also: flowBoxInsert
.
Since: 4.6
bindModel
:: (HasCallStack, MonadIO m, IsFlowBox a, IsListModel b) | |
=> a |
|
-> Maybe b |
|
-> FlowBoxCreateWidgetFunc |
|
-> m () |
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 Nothing
, box
is left empty.
It is undefined to add or remove widgets directly (for example, with
flowBoxInsert
) 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.
getActivateOnSingleClick
flowBoxGetActivateOnSingleClick Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether children activate on single clicks.
getChildAtIndex
flowBoxGetChildAtIndex Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe FlowBoxChild) | Returns: the child widget, which will
always be a |
Gets the nth child in the box
.
getChildAtPos
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m (Maybe FlowBoxChild) | Returns: the child widget, which will
always be a |
Gets the child in the (x
, y
) position.
Both x
and y
are assumed to be relative to the origin of box
.
getColumnSpacing
flowBoxGetColumnSpacing Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Word32 | Returns: the horizontal spacing |
Gets the horizontal spacing.
getHomogeneous
flowBoxGetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the box is homogeneous.
getMaxChildrenPerLine
flowBoxGetMaxChildrenPerLine Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Word32 | Returns: the maximum number of children per line |
Gets the maximum number of children per line.
getMinChildrenPerLine
flowBoxGetMinChildrenPerLine Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Word32 | Returns: the minimum number of children per line |
Gets the minimum number of children per line.
getRowSpacing
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Word32 | Returns: the vertical spacing |
Gets the vertical spacing.
getSelectedChildren
flowBoxGetSelectedChildren Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m [FlowBoxChild] | Returns:
A |
Creates a list of all selected children.
getSelectionMode
flowBoxGetSelectionMode Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m SelectionMode | Returns: the |
Gets the selection mode of box
.
insert
:: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () |
Inserts the widget
into box
at position
.
If a sort function is set, the widget will actually be inserted at the calculated position.
If position
is -1, or larger than the total number of children
in the box
, then the widget
will be appended to the end.
invalidateFilter
flowBoxInvalidateFilter Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m () |
Updates the filtering for all children.
Call this function when the result of the filter
function on the box
is changed due to an external
factor. For instance, this would be used if the
filter function just looked for a specific search
term, and the entry with the string has changed.
invalidateSort
flowBoxInvalidateSort Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m () |
Updates the sorting for all children.
Call this when the result of the sort function on
box
is changed due to an external factor.
new
:: (HasCallStack, MonadIO m) | |
=> m FlowBox | Returns: a new |
Creates a GtkFlowBox
.
prepend
:: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
to the start of self
.
If a sort function is set, the widget will actually be inserted at the calculated position.
See also: flowBoxInsert
.
Since: 4.6
remove
:: (HasCallStack, MonadIO m, IsFlowBox a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Removes a child from box
.
removeAll
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m () |
Removes all children from box
.
This function does nothing if box
is backed by a model.
Since: 4.12
selectAll
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m () |
Select all children of box
, if the selection
mode allows it.
selectChild
:: (HasCallStack, MonadIO m, IsFlowBox a, IsFlowBoxChild b) | |
=> a |
|
-> b |
|
-> m () |
Selects a single child of box
, if the selection
mode allows it.
selectedForeach
flowBoxSelectedForeach Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> FlowBoxForeachFunc |
|
-> m () |
Calls a function for each selected child.
Note that the selection cannot be modified from within this function.
setActivateOnSingleClick
flowBoxSetActivateOnSingleClick Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Bool |
|
-> m () |
If single
is True
, children will be activated when you click
on them, otherwise you need to double-click.
setColumnSpacing
flowBoxSetColumnSpacing Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the horizontal space to add between children.
setFilterFunc
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Maybe FlowBoxFilterFunc |
|
-> m () |
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 filterFunc
will be called for each child after the call, and
it will continue to be called each time a child changes (via
flowBoxChildChanged
) or when
flowBoxInvalidateFilter
is called.
Note that using a filter function is incompatible with using a model
(see flowBoxBindModel
).
setHadjustment
flowBoxSetHadjustment Source #
:: (HasCallStack, MonadIO m, IsFlowBox a, IsAdjustment b) | |
=> a |
|
-> b |
|
-> m () |
Hooks up an adjustment to focus handling in box
.
The adjustment is also used for autoscrolling during
rubberband selection. See scrolledWindowGetHadjustment
for a typical way of obtaining the adjustment, and
flowBoxSetVadjustment
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.
setHomogeneous
flowBoxSetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether or not all children of box
are given
equal space in the box.
setMaxChildrenPerLine
flowBoxSetMaxChildrenPerLine Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Word32 |
|
-> m () |
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 nChildren
children long in the given orientation.
setMinChildrenPerLine
flowBoxSetMinChildrenPerLine Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the minimum number of children to line up
in box
’s orientation before flowing.
setRowSpacing
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the vertical space to add between children.
setSelectionMode
flowBoxSetSelectionMode Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> SelectionMode |
|
-> m () |
Sets how selection works in box
.
setSortFunc
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Maybe FlowBoxSortFunc |
|
-> m () |
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 sortFunc
will be called for each child after the call,
and will continue to be called each time a child changes (via
flowBoxChildChanged
) and when
flowBoxInvalidateSort
is called.
Note that using a sort function is incompatible with using a model
(see flowBoxBindModel
).
setVadjustment
flowBoxSetVadjustment Source #
:: (HasCallStack, MonadIO m, IsFlowBox a, IsAdjustment b) | |
=> a |
|
-> b |
|
-> m () |
Hooks up an adjustment to focus handling in box
.
The adjustment is also used for autoscrolling during
rubberband selection. See scrolledWindowGetVadjustment
for a typical way of obtaining the adjustment, and
flowBoxSetHadjustment
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.
unselectAll
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m () |
Unselect all children of box
, if the selection
mode allows it.
unselectChild
:: (HasCallStack, MonadIO m, IsFlowBox a, IsFlowBoxChild b) | |
=> a |
|
-> b |
|
-> m () |
Unselects a single child of box
, if the selection
mode allows it.
Properties
acceptUnpairedRelease
Whether to accept unpaired release events.
constructFlowBoxAcceptUnpairedRelease :: (IsFlowBox o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “accept-unpaired-release
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxAcceptUnpairedRelease :: (MonadIO m, IsFlowBox o) => o -> m Bool Source #
Get the value of the “accept-unpaired-release
” property.
When overloading is enabled, this is equivalent to
get
flowBox #acceptUnpairedRelease
setFlowBoxAcceptUnpairedRelease :: (MonadIO m, IsFlowBox o) => o -> Bool -> m () Source #
Set the value of the “accept-unpaired-release
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #acceptUnpairedRelease:=
value ]
activateOnSingleClick
Determines whether children can be activated with a single click, or require a double-click.
constructFlowBoxActivateOnSingleClick :: (IsFlowBox o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “activate-on-single-click
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxActivateOnSingleClick :: (MonadIO m, IsFlowBox o) => o -> m Bool Source #
Get the value of the “activate-on-single-click
” property.
When overloading is enabled, this is equivalent to
get
flowBox #activateOnSingleClick
setFlowBoxActivateOnSingleClick :: (MonadIO m, IsFlowBox o) => o -> Bool -> m () Source #
Set the value of the “activate-on-single-click
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #activateOnSingleClick:=
value ]
columnSpacing
The amount of horizontal space between two children.
constructFlowBoxColumnSpacing :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “column-spacing
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxColumnSpacing :: (MonadIO m, IsFlowBox o) => o -> m Word32 Source #
Get the value of the “column-spacing
” property.
When overloading is enabled, this is equivalent to
get
flowBox #columnSpacing
setFlowBoxColumnSpacing :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m () Source #
Set the value of the “column-spacing
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #columnSpacing:=
value ]
homogeneous
Determines whether all children should be allocated the same size.
constructFlowBoxHomogeneous :: (IsFlowBox o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “homogeneous
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxHomogeneous :: (MonadIO m, IsFlowBox o) => o -> m Bool Source #
Get the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
get
flowBox #homogeneous
setFlowBoxHomogeneous :: (MonadIO m, IsFlowBox o) => o -> Bool -> m () Source #
Set the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #homogeneous:=
value ]
maxChildrenPerLine
The maximum amount of children to request space for consecutively in the given orientation.
constructFlowBoxMaxChildrenPerLine :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “max-children-per-line
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxMaxChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> m Word32 Source #
Get the value of the “max-children-per-line
” property.
When overloading is enabled, this is equivalent to
get
flowBox #maxChildrenPerLine
setFlowBoxMaxChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m () Source #
Set the value of the “max-children-per-line
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #maxChildrenPerLine:=
value ]
minChildrenPerLine
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.
constructFlowBoxMinChildrenPerLine :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “min-children-per-line
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxMinChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> m Word32 Source #
Get the value of the “min-children-per-line
” property.
When overloading is enabled, this is equivalent to
get
flowBox #minChildrenPerLine
setFlowBoxMinChildrenPerLine :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m () Source #
Set the value of the “min-children-per-line
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #minChildrenPerLine:=
value ]
rowSpacing
The amount of vertical space between two children.
constructFlowBoxRowSpacing :: (IsFlowBox o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “row-spacing
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxRowSpacing :: (MonadIO m, IsFlowBox o) => o -> m Word32 Source #
Get the value of the “row-spacing
” property.
When overloading is enabled, this is equivalent to
get
flowBox #rowSpacing
setFlowBoxRowSpacing :: (MonadIO m, IsFlowBox o) => o -> Word32 -> m () Source #
Set the value of the “row-spacing
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #rowSpacing:=
value ]
selectionMode
The selection mode used by the flow box.
constructFlowBoxSelectionMode :: (IsFlowBox o, MonadIO m) => SelectionMode -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “selection-mode
” property. This is rarely needed directly, but it is used by new
.
getFlowBoxSelectionMode :: (MonadIO m, IsFlowBox o) => o -> m SelectionMode Source #
Get the value of the “selection-mode
” property.
When overloading is enabled, this is equivalent to
get
flowBox #selectionMode
setFlowBoxSelectionMode :: (MonadIO m, IsFlowBox o) => o -> SelectionMode -> m () Source #
Set the value of the “selection-mode
” property.
When overloading is enabled, this is equivalent to
set
flowBox [ #selectionMode:=
value ]
Signals
activateCursorChild
type FlowBoxActivateCursorChildCallback = IO () Source #
Emitted when the user activates the box
.
This is a keybinding signal.
afterFlowBoxActivateCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxActivateCursorChildCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activateCursorChild signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
flowBox #activateCursorChild callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onFlowBoxActivateCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxActivateCursorChildCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activateCursorChild signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
flowBox #activateCursorChild callback
childActivated
type FlowBoxChildActivatedCallback Source #
= FlowBoxChild |
|
-> IO () |
Emitted when a child has been activated by the user.
afterFlowBoxChildActivated :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childActivated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
flowBox #childActivated callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onFlowBoxChildActivated :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childActivated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
flowBox #childActivated callback
moveCursor
type FlowBoxMoveCursorCallback Source #
= MovementStep |
|
-> Int32 |
|
-> Bool |
|
-> Bool |
|
-> IO Bool | Returns: |
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
afterFlowBoxMoveCursor :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxMoveCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
flowBox #moveCursor callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onFlowBoxMoveCursor :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxMoveCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
flowBox #moveCursor callback
selectAll
type FlowBoxSelectAllCallback = IO () Source #
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>.
afterFlowBoxSelectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectAllCallback) -> m SignalHandlerId Source #
Connect a signal handler for the selectAll signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
flowBox #selectAll callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onFlowBoxSelectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectAllCallback) -> m SignalHandlerId Source #
Connect a signal handler for the selectAll signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
flowBox #selectAll callback
selectedChildrenChanged
type FlowBoxSelectedChildrenChangedCallback = IO () Source #
Emitted when the set of selected children changes.
Use flowBoxSelectedForeach
or
flowBoxGetSelectedChildren
to obtain the
selected children.
afterFlowBoxSelectedChildrenChanged :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectedChildrenChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the selectedChildrenChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
flowBox #selectedChildrenChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onFlowBoxSelectedChildrenChanged :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxSelectedChildrenChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the selectedChildrenChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
flowBox #selectedChildrenChanged callback
toggleCursorChild
type FlowBoxToggleCursorChildCallback = IO () Source #
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>.
afterFlowBoxToggleCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxToggleCursorChildCallback) -> m SignalHandlerId Source #
Connect a signal handler for the toggleCursorChild signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
flowBox #toggleCursorChild callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onFlowBoxToggleCursorChild :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxToggleCursorChildCallback) -> m SignalHandlerId Source #
Connect a signal handler for the toggleCursorChild signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
flowBox #toggleCursorChild callback
unselectAll
type FlowBoxUnselectAllCallback = IO () Source #
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>.
afterFlowBoxUnselectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxUnselectAllCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unselectAll signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
flowBox #unselectAll callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onFlowBoxUnselectAll :: (IsFlowBox a, MonadIO m) => a -> ((?self :: a) => FlowBoxUnselectAllCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unselectAll signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
flowBox #unselectAll callback