Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- bindModel
- getActivateOnSingleClick
- getChildAtIndex
- getChildAtPos
- getColumnSpacing
- getHomogeneous
- getMaxChildrenPerLine
- getMinChildrenPerLine
- getRowSpacing
- getSelectedChildren
- getSelectionMode
- insert
- invalidateFilter
- invalidateSort
- new
- selectAll
- selectChild
- selectedForeach
- setActivateOnSingleClick
- setColumnSpacing
- setFilterFunc
- setHadjustment
- setHomogeneous
- setMaxChildrenPerLine
- setMinChildrenPerLine
- setRowSpacing
- setSelectionMode
- setSortFunc
- setVadjustment
- unselectAll
- unselectChild
- Properties
- Signals
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 ScrolledWindow
to enable that.
The children of a GtkFlowBox can be dynamically sorted and filtered.
Although a GtkFlowBox must have only FlowBoxChild
children,
you can add any kind of widget to it via containerAdd
, and
a GtkFlowBoxChild widget will automatically be inserted between
the box and the widget.
Also see ListBox
.
GtkFlowBox was added in GTK+ 3.12.
CSS nodes
plain code
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.
Synopsis
- newtype FlowBox = FlowBox (ManagedPtr FlowBox)
- class (GObject o, IsDescendantOf FlowBox o) => IsFlowBox o
- toFlowBox :: (MonadIO m, IsFlowBox o) => o -> m FlowBox
- 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
- 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 ()
- 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 -> 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 gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe FlowBox -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe 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
activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindModel, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insert, insertActionGroup, intersect, invalidateFilter, invalidateSort, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, selectAll, selectChild, selectedForeach, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unselectAll, unselectChild, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getActivateOnSingleClick, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChildAtIndex, getChildAtPos, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getColumnSpacing, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHomogeneous, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMaxChildrenPerLine, getMinChildrenPerLine, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getRowSpacing, getScaleFactor, getScreen, getSelectedChildren, getSelectionMode, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setActivateOnSingleClick, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setColumnSpacing, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFilterFunc, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHadjustment, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setHomogeneous, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setMaxChildrenPerLine, setMinChildrenPerLine, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setRowSpacing, setSelectionMode, setSensitive, setSizeRequest, setSortFunc, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setVadjustment, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
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
or containerAdd
) while box
is bound to a
model.
Note that using a model is incompatible with the filtering and sorting functionality in GtkFlowBox. When using a model, filtering and sorting should be implemented by the model.
Since: 3.18
getActivateOnSingleClick
flowBoxGetActivateOnSingleClick Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether children activate on single clicks.
Since: 3.12
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
.
Since: 3.12
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.
Since: 3.22.6
getColumnSpacing
flowBoxGetColumnSpacing Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Word32 | Returns: the horizontal spacing |
Gets the horizontal spacing.
Since: 3.12
getHomogeneous
flowBoxGetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the box is homogeneous (all children are the
same size). See boxSetHomogeneous
.
Since: 3.12
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.
Since: 3.12
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.
Since: 3.12
getRowSpacing
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m Word32 | Returns: the vertical spacing |
Gets the vertical spacing.
Since: 3.12
getSelectedChildren
flowBoxGetSelectedChildren Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m [FlowBoxChild] | Returns:
A |
Creates a list of all selected children.
Since: 3.12
getSelectionMode
flowBoxGetSelectionMode Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m SelectionMode | Returns: the |
Gets the selection mode of box
.
Since: 3.12
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 and this function has the same effect
as containerAdd
.
If position
is -1, or larger than the total number of children
in the box
, then the widget
will be appended to the end.
Since: 3.12
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 ot an external
factor. For instance, this would be used if the
filter function just looked for a specific search
term, and the entry with the string has changed.
Since: 3.12
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.
Since: 3.12
new
:: (HasCallStack, MonadIO m) | |
=> m FlowBox | Returns: a new |
Creates a GtkFlowBox.
Since: 3.12
selectAll
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m () |
Select all children of box
, if the selection
mode allows it.
Since: 3.12
selectChild
:: (HasCallStack, MonadIO m, IsFlowBox a, IsFlowBoxChild b) | |
=> a |
|
-> b |
|
-> m () |
Selects a single child of box
, if the selection
mode allows it.
Since: 3.12
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.
Since: 3.12
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.
Since: 3.12
setColumnSpacing
flowBoxSetColumnSpacing Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the horizontal space to add between children. See the FlowBox:columnSpacing property.
Since: 3.12
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
).
Since: 3.12
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.
Since: 3.12
setHomogeneous
flowBoxSetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the FlowBox:homogeneous property of box
, controlling
whether or not all children of box
are given equal space
in the box.
Since: 3.12
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.
Since: 3.12
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.
Since: 3.12
setRowSpacing
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the vertical space to add between children. See the FlowBox:rowSpacing property.
Since: 3.12
setSelectionMode
flowBoxSetSelectionMode Source #
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> SelectionMode |
|
-> m () |
Sets how selection works in box
.
See SelectionMode
for details.
Since: 3.12
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
).
Since: 3.12
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.
Since: 3.12
unselectAll
:: (HasCallStack, MonadIO m, IsFlowBox a) | |
=> a |
|
-> m () |
Unselect all children of box
, if the selection
mode allows it.
Since: 3.12
unselectChild
:: (HasCallStack, MonadIO m, IsFlowBox a, IsFlowBoxChild b) | |
=> a |
|
-> b |
|
-> m () |
Unselects a single child of box
, if the selection
mode allows it.
Since: 3.12
Properties
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 #
The activateCursorChild signal is a
[keybinding signal][GtkBindingSignal]
which gets emitted when the user activates the box
.
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 () |
The childActivated signal is 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 |
|
-> IO Bool | Returns: |
The moveCursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a cursor movement.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name()
if they need to control the cursor
programmatically.
The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here.
- Arrow keys move by individual children
- Home/End keys move to the ends of the box
- PageUp/PageDown keys move vertically by pages
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 #
The selectAll signal is a [keybinding signal][GtkBindingSignal] which gets emitted to select all children of the box, if the selection mode permits it.
The default bindings for this signal is Ctrl-a.
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 #
The selectedChildrenChanged signal is 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 #
The toggleCursorChild signal is a [keybinding signal][GtkBindingSignal] which toggles the selection of the child that has the focus.
The default binding for this signal is Ctrl-Space.
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 #
The unselectAll signal is a [keybinding signal][GtkBindingSignal] which gets emitted to unselect all children of the box, if the selection mode permits it.
The default bindings for this signal is Ctrl-Shift-a.
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