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.Revealer

Contents

- Exported types
- Methods
  - getChild
  - getChildRevealed
  - getRevealChild
  - getTransitionDuration
  - getTransitionType
  - new
  - setChild
  - setRevealChild
  - setTransitionDuration
  - setTransitionType
- Properties
  - child
  - childRevealed
  - revealChild
  - transitionDuration
  - transitionType

Description

Animates the transition of its child from invisible to visible.

The style of transition can be controlled with `revealerSetTransitionType`.

These animations respect the Settings:gtkEnableAnimations and `GTk.Settings:gtk-interface-reduced-motion` settings.

# CSS nodes

`GtkRevealer` has a single CSS node with name revealer. When styling `GtkRevealer` using CSS, remember that it only hides its contents, not itself. That means applied margin, padding and borders will be visible even when the Revealer:revealChild property is set to `False`.

# Accessibility

`GtkRevealer` uses the `AccessibleRoleGroup` role.

The child of `GtkRevealer`, if set, is always available in the accessibility tree, regardless of the state of the revealer widget.

Synopsis

- newtype Revealer = Revealer (ManagedPtr Revealer)
- class (GObject o, IsDescendantOf Revealer o) => IsRevealer o
- toRevealer :: (MonadIO m, IsRevealer o) => o -> m Revealer
- revealerGetChild :: (HasCallStack, MonadIO m, IsRevealer a) => a -> m (Maybe Widget)
- revealerGetChildRevealed :: (HasCallStack, MonadIO m, IsRevealer a) => a -> m Bool
- revealerGetRevealChild :: (HasCallStack, MonadIO m, IsRevealer a) => a -> m Bool
- revealerGetTransitionDuration :: (HasCallStack, MonadIO m, IsRevealer a) => a -> m Word32
- revealerGetTransitionType :: (HasCallStack, MonadIO m, IsRevealer a) => a -> m RevealerTransitionType
- revealerNew :: (HasCallStack, MonadIO m) => m Revealer
- revealerSetChild :: (HasCallStack, MonadIO m, IsRevealer a, IsWidget b) => a -> Maybe b -> m ()
- revealerSetRevealChild :: (HasCallStack, MonadIO m, IsRevealer a) => a -> Bool -> m ()
- revealerSetTransitionDuration :: (HasCallStack, MonadIO m, IsRevealer a) => a -> Word32 -> m ()
- revealerSetTransitionType :: (HasCallStack, MonadIO m, IsRevealer a) => a -> RevealerTransitionType -> m ()
- clearRevealerChild :: (MonadIO m, IsRevealer o) => o -> m ()
- constructRevealerChild :: (IsRevealer o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getRevealerChild :: (MonadIO m, IsRevealer o) => o -> m (Maybe Widget)
- setRevealerChild :: (MonadIO m, IsRevealer o, IsWidget a) => o -> a -> m ()
- getRevealerChildRevealed :: (MonadIO m, IsRevealer o) => o -> m Bool
- constructRevealerRevealChild :: (IsRevealer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getRevealerRevealChild :: (MonadIO m, IsRevealer o) => o -> m Bool
- setRevealerRevealChild :: (MonadIO m, IsRevealer o) => o -> Bool -> m ()
- constructRevealerTransitionDuration :: (IsRevealer o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getRevealerTransitionDuration :: (MonadIO m, IsRevealer o) => o -> m Word32
- setRevealerTransitionDuration :: (MonadIO m, IsRevealer o) => o -> Word32 -> m ()
- constructRevealerTransitionType :: (IsRevealer o, MonadIO m) => RevealerTransitionType -> m (GValueConstruct o)
- getRevealerTransitionType :: (MonadIO m, IsRevealer o) => o -> m RevealerTransitionType
- setRevealerTransitionType :: (MonadIO m, IsRevealer o) => o -> RevealerTransitionType -> m ()

# Exported types

newtype Revealer Source #

Memory-managed wrapper type.

Constructors

Revealer (ManagedPtr Revealer) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf Revealer o) => IsRevealer o Source #

Type class for types which can be safely cast to `Revealer`, for instance with `toRevealer`.

#### Instances

Instances details

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

toRevealer :: (MonadIO m, IsRevealer o) => o -> m Revealer Source #

Cast to `Revealer`, 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, 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, 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, getChildRevealed, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, 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, getRevealChild, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getTransitionDuration, getTransitionType, 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, setRevealChild, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setTransitionDuration, setTransitionType, setValign, setVexpand, setVexpandSet, setVisible.

## getChild

revealerGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> m (Maybe Widget) | Returns: the child widget of `revealer`

Gets the child widget of `revealer`.

## getChildRevealed

revealerGetChildRevealed Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> m Bool | Returns: `True` if the child is fully revealed

Returns whether the child is fully revealed.

In other words, this returns whether the transition to the revealed state is completed.

## getRevealChild

revealerGetRevealChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> m Bool | Returns: `True` if the child is revealed.

Returns whether the child is currently revealed.

This function returns `True` as soon as the transition is to the revealed state is started. To learn whether the child is fully revealed (ie the transition is completed), use `revealerGetChildRevealed`.

## getTransitionDuration

revealerGetTransitionDuration Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> m Word32 | Returns: the transition duration

Returns the amount of time (in milliseconds) that transitions will take.

## getTransitionType

revealerGetTransitionType Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> m RevealerTransitionType | Returns: the current transition type of `revealer`

Gets the type of animation that will be used for transitions in `revealer`.

## new

revealerNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Revealer | Returns: a newly created `GtkRevealer`

Creates a new `GtkRevealer`.

## setChild

revealerSetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a, IsWidget b) |
=> a | `revealer`: a `GtkRevealer`
-> Maybe b | `child`: the child widget
-> m () |

Sets the child widget of `revealer`.

## setRevealChild

revealerSetRevealChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> Bool | `revealChild`: `True` to reveal the child
-> m () |

Tells the `GtkRevealer` to reveal or conceal its child.

The transition will be animated with the current transition type of `revealer`.

## setTransitionDuration

revealerSetTransitionDuration Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> Word32 | `duration`: the new duration, in milliseconds
-> m () |

Sets the duration that transitions will take.

## setTransitionType

revealerSetTransitionType Source #

Arguments

:: (HasCallStack, MonadIO m, IsRevealer a) |
=> a | `revealer`: a `GtkRevealer`
-> RevealerTransitionType | `transition`: the new transition type
-> m () |

Sets the type of animation that will be used for transitions in `revealer`.

Available types include various kinds of fades and slides.

# Properties

## child

The child widget.

clearRevealerChild :: (MonadIO m, IsRevealer o) => o -> m () Source #

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

    clear #child

constructRevealerChild :: (IsRevealer 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`.

getRevealerChild :: (MonadIO m, IsRevealer o) => o -> m (Maybe Widget) Source #

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

    get revealer #child

setRevealerChild :: (MonadIO m, IsRevealer o, IsWidget a) => o -> a -> m () Source #

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

    set revealer [ #child := value ]

## childRevealed

Whether the child is revealed and the animation target reached.

getRevealerChildRevealed :: (MonadIO m, IsRevealer o) => o -> m Bool Source #

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

    get revealer #childRevealed

## revealChild

Whether the revealer should reveal the child.

constructRevealerRevealChild :: (IsRevealer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getRevealerRevealChild :: (MonadIO m, IsRevealer o) => o -> m Bool Source #

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

    get revealer #revealChild

setRevealerRevealChild :: (MonadIO m, IsRevealer o) => o -> Bool -> m () Source #

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

    set revealer [ #revealChild := value ]

## transitionDuration

The animation duration, in milliseconds.

constructRevealerTransitionDuration :: (IsRevealer o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getRevealerTransitionDuration :: (MonadIO m, IsRevealer o) => o -> m Word32 Source #

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

    get revealer #transitionDuration

setRevealerTransitionDuration :: (MonadIO m, IsRevealer o) => o -> Word32 -> m () Source #

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

    set revealer [ #transitionDuration := value ]

## transitionType

The type of animation used to transition.

constructRevealerTransitionType :: (IsRevealer o, MonadIO m) => RevealerTransitionType -> m (GValueConstruct o) Source #

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

getRevealerTransitionType :: (MonadIO m, IsRevealer o) => o -> m RevealerTransitionType Source #

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

    get revealer #transitionType

setRevealerTransitionType :: (MonadIO m, IsRevealer o) => o -> RevealerTransitionType -> m () Source #

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

    set revealer [ #transitionType := value ]