gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.FlowBoxChild

Contents

- Exported types
- Methods
  - changed
  - getChild
  - getIndex
  - isSelected
  - new
  - setChild
- Properties
  - child
- Signals
  - activate

Description

The kind of widget that can be added to a `GtkFlowBox`.

`FlowBox` will automatically wrap its children in a `GtkFlowBoxChild` when necessary.

Synopsis

- newtype FlowBoxChild = FlowBoxChild (ManagedPtr FlowBoxChild)
- class (GObject o, IsDescendantOf FlowBoxChild o) => IsFlowBoxChild o
- toFlowBoxChild :: (MonadIO m, IsFlowBoxChild o) => o -> m FlowBoxChild
- flowBoxChildChanged :: (HasCallStack, MonadIO m, IsFlowBoxChild a) => a -> m ()
- flowBoxChildGetChild :: (HasCallStack, MonadIO m, IsFlowBoxChild a) => a -> m (Maybe Widget)
- flowBoxChildGetIndex :: (HasCallStack, MonadIO m, IsFlowBoxChild a) => a -> m Int32
- flowBoxChildIsSelected :: (HasCallStack, MonadIO m, IsFlowBoxChild a) => a -> m Bool
- flowBoxChildNew :: (HasCallStack, MonadIO m) => m FlowBoxChild
- flowBoxChildSetChild :: (HasCallStack, MonadIO m, IsFlowBoxChild a, IsWidget b) => a -> Maybe b -> m ()
- clearFlowBoxChildChild :: (MonadIO m, IsFlowBoxChild o) => o -> m ()
- constructFlowBoxChildChild :: (IsFlowBoxChild o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getFlowBoxChildChild :: (MonadIO m, IsFlowBoxChild o) => o -> m (Maybe Widget)
- setFlowBoxChildChild :: (MonadIO m, IsFlowBoxChild o, IsWidget a) => o -> a -> m ()
- type FlowBoxChildActivateCallback = IO ()
- afterFlowBoxChildActivate :: (IsFlowBoxChild a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivateCallback) -> m SignalHandlerId
- onFlowBoxChildActivate :: (IsFlowBoxChild a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivateCallback) -> m SignalHandlerId

# Exported types

newtype FlowBoxChild Source #

Memory-managed wrapper type.

Constructors

FlowBoxChild (ManagedPtr FlowBoxChild) |

#### Instances

Instances details

Eq FlowBoxChild Source # |
Instance details Defined in GI.Gtk.Objects.FlowBoxChild Methods (==) :: FlowBoxChild -> FlowBoxChild -> Bool Source # (/=) :: FlowBoxChild -> FlowBoxChild -> Bool Source #
GObject FlowBoxChild Source # |
Instance details Defined in GI.Gtk.Objects.FlowBoxChild
ManagedPtrNewtype FlowBoxChild Source # |
Instance details Defined in GI.Gtk.Objects.FlowBoxChild Methods toManagedPtr :: FlowBoxChild -> ManagedPtr FlowBoxChild Source #
TypedObject FlowBoxChild Source # |
Instance details Defined in GI.Gtk.Objects.FlowBoxChild Methods glibType :: IO GType Source #
HasParentTypes FlowBoxChild Source # |
Instance details Defined in GI.Gtk.Objects.FlowBoxChild
IsGValue (Maybe FlowBoxChild) Source # | Convert `FlowBoxChild` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.FlowBoxChild Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe FlowBoxChild -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe FlowBoxChild) Source #
type ParentTypes FlowBoxChild Source # |
Instance details Defined in GI.Gtk.Objects.FlowBoxChild type ParentTypes FlowBoxChild = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf FlowBoxChild o) => IsFlowBoxChild o Source #

Type class for types which can be safely cast to `FlowBoxChild`, for instance with `toFlowBoxChild`.

#### Instances

Instances details

(GObject o, IsDescendantOf FlowBoxChild o) => IsFlowBoxChild o Source # |
Instance details Defined in GI.Gtk.Objects.FlowBoxChild

toFlowBoxChild :: (MonadIO m, IsFlowBoxChild o) => o -> m FlowBoxChild Source #

Cast to `FlowBoxChild`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, changed, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSelected, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getIndex, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccessibleParent, setCanFocus, setCanTarget, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

## changed

flowBoxChildChanged Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlowBoxChild a) |
=> a | `child`: a `GtkFlowBoxChild`
-> m () |

Marks `child` as changed, causing any state that depends on this to be updated.

This affects sorting and filtering.

Note that calls to this method must be in sync with the data used for the sorting and filtering functions. For instance, if the list is mirroring some external data set, and *two* children changed in the external data set when you call `flowBoxChildChanged` on the first child, the sort function must only read the new data for the first of the two changed children, otherwise the resorting of the children will be wrong.

This generally means that if you don’t fully control the data model, you have to duplicate the data that affects the sorting and filtering functions into the widgets themselves.

Another alternative is to call `flowBoxInvalidateSort` on any model change, but that is more expensive.

## getChild

flowBoxChildGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlowBoxChild a) |
=> a | `self`: a `GtkFlowBoxChild`
-> m (Maybe Widget) | Returns: the child widget of `self`

Gets the child widget of `self`.

## getIndex

flowBoxChildGetIndex Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlowBoxChild a) |
=> a | `child`: a `GtkFlowBoxChild`
-> m Int32 | Returns: the index of the `child`, or -1 if the `child` is not in a flow box

Gets the current index of the `child` in its `GtkFlowBox` container.

## isSelected

flowBoxChildIsSelected Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlowBoxChild a) |
=> a | `child`: a `GtkFlowBoxChild`
-> m Bool | Returns: `True` if `child` is selected

Returns whether the `child` is currently selected in its `GtkFlowBox` container.

## new

flowBoxChildNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m FlowBoxChild | Returns: a new `GtkFlowBoxChild`

Creates a new `GtkFlowBoxChild`.

This should only be used as a child of a `GtkFlowBox`.

## setChild

flowBoxChildSetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsFlowBoxChild a, IsWidget b) |
=> a | `self`: a `GtkFlowBoxChild`
-> Maybe b | `child`: the child widget
-> m () |

Sets the child widget of `self`.

# Properties

## child

The child widget.

clearFlowBoxChildChild :: (MonadIO m, IsFlowBoxChild o) => o -> m () Source #

Set the value of the “`child`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #child

constructFlowBoxChildChild :: (IsFlowBoxChild o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`child`” property. This is rarely needed directly, but it is used by `new`.

getFlowBoxChildChild :: (MonadIO m, IsFlowBoxChild o) => o -> m (Maybe Widget) Source #

Get the value of the “`child`” property. When overloading is enabled, this is equivalent to

    get flowBoxChild #child

setFlowBoxChildChild :: (MonadIO m, IsFlowBoxChild o, IsWidget a) => o -> a -> m () Source #

Set the value of the “`child`” property. When overloading is enabled, this is equivalent to

    set flowBoxChild [ #child := value ]

# Signals

## activate

type FlowBoxChildActivateCallback = IO () Source #

Emitted when the user activates a child widget in a `GtkFlowBox`.

This can happen either by clicking or double-clicking, or via a keybinding.

This is a keybinding signal, but it can be used by applications for their own purposes.

The default bindings are <kbd>Space</kbd> and <kbd>Enter</kbd>.

afterFlowBoxChildActivate :: (IsFlowBoxChild a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after flowBoxChild #activate 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.

onFlowBoxChildActivate :: (IsFlowBoxChild a, MonadIO m) => a -> ((?self :: a) => FlowBoxChildActivateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on flowBoxChild #activate callback