gi-adwaita-1.0.1: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Objects.Squeezer

Description

A best fit container.

The AdwSqueezer widget is a container which only shows the first of its children that fits in the available size. It is convenient to offer different widgets to represent the same data with different levels of detail, making the widget seem to squeeze itself to fit in the available space.

Transitions between children can be animated as fades. This can be controlled with Squeezer:transitionType.

CSS nodes

AdwSqueezer has a single CSS node with name squeezer.

Since: 1.0

Synopsis

Exported types

newtype Squeezer Source #

Memory-managed wrapper type.

Constructors

Squeezer (ManagedPtr Squeezer) 

Instances

Instances details
Eq Squeezer Source # 
Instance details

Defined in GI.Adw.Objects.Squeezer

GObject Squeezer Source # 
Instance details

Defined in GI.Adw.Objects.Squeezer

ManagedPtrNewtype Squeezer Source # 
Instance details

Defined in GI.Adw.Objects.Squeezer

TypedObject Squeezer Source # 
Instance details

Defined in GI.Adw.Objects.Squeezer

Methods

glibType :: IO GType #

HasParentTypes Squeezer Source # 
Instance details

Defined in GI.Adw.Objects.Squeezer

IsGValue (Maybe Squeezer) Source #

Convert Squeezer to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Adw.Objects.Squeezer

type ParentTypes Squeezer Source # 
Instance details

Defined in GI.Adw.Objects.Squeezer

class (GObject o, IsDescendantOf Squeezer o) => IsSqueezer o Source #

Type class for types which can be safely cast to Squeezer, for instance with toSqueezer.

Instances

Instances details
(GObject o, IsDescendantOf Squeezer o) => IsSqueezer o Source # 
Instance details

Defined in GI.Adw.Objects.Squeezer

toSqueezer :: (MonadIO m, IsSqueezer o) => o -> m Squeezer Source #

Cast to Squeezer, 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, add, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, 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, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAllowNone, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHomogeneous, getInterpolateSize, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOrientation, getOverflow, getPage, getPages, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSwitchThresholdPolicy, getTemplateChild, getTooltipMarkup, getTooltipText, getTransitionDuration, getTransitionRunning, getTransitionType, getValign, getVexpand, getVexpandSet, getVisible, getVisibleChild, getWidth, getXalign, getYalign.

Setters

setAllowNone, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHomogeneous, setInterpolateSize, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setSwitchThresholdPolicy, setTooltipMarkup, setTooltipText, setTransitionDuration, setTransitionType, setValign, setVexpand, setVexpandSet, setVisible, setXalign, setYalign.

add

squeezerAdd Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a, IsWidget b) 
=> a

self: a AdwSqueezer

-> b

child: the widget to add

-> m SqueezerPage

Returns: the SqueezerPage for child

Adds a child to self.

Since: 1.0

getAllowNone

squeezerGetAllowNone Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m Bool

Returns: whether self allows squeezing beyond the last child

Gets whether to allow squeezing beyond the last child's minimum size.

Since: 1.0

getHomogeneous

squeezerGetHomogeneous Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m Bool

Returns: whether self is homogeneous

Gets whether all children have the same size for the opposite orientation.

Since: 1.0

getInterpolateSize

squeezerGetInterpolateSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: A AdwSqueezer

-> m Bool

Returns: whether the size is interpolated

Gets whether self interpolates its size when changing the visible child.

Since: 1.0

getPage

squeezerGetPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a, IsWidget b) 
=> a

self: a AdwSqueezer

-> b

child: a child of self

-> m SqueezerPage

Returns: the page object for child

Returns the SqueezerPage object for child.

Since: 1.0

getPages

squeezerGetPages Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m SelectionModel

Returns: a GtkSelectionModel for the squeezer's children

Returns a ListModel that contains the pages of self.

This can be used to keep an up-to-date view. The model also implements SelectionModel and can be used to track the visible page.

Since: 1.0

getSwitchThresholdPolicy

squeezerGetSwitchThresholdPolicy Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwLeaflet

-> m FoldThresholdPolicy 

Gets the fold threshold policy for self.

Since: 1.0

getTransitionDuration

squeezerGetTransitionDuration Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m Word32

Returns: the transition duration, in milliseconds

Gets the transition animation duration for self.

Since: 1.0

getTransitionRunning

squeezerGetTransitionRunning Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m Bool

Returns: whether a transition is currently running

Gets whether a transition is currently running for self.

Since: 1.0

getTransitionType

squeezerGetTransitionType Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m SqueezerTransitionType

Returns: the current transition type of self

Gets the type of animation used for transitions between children in self.

Since: 1.0

getVisibleChild

squeezerGetVisibleChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m (Maybe Widget)

Returns: the visible child

Gets the currently visible child of self.

Since: 1.0

getXalign

squeezerGetXalign Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m Float

Returns: the alignment value

Gets the horizontal alignment, from 0 (start) to 1 (end).

Since: 1.0

getYalign

squeezerGetYalign Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> m Float

Returns: the alignment value

Gets the vertical alignment, from 0 (top) to 1 (bottom).

Since: 1.0

new

squeezerNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Squeezer

Returns: the newly created AdwSqueezer

Creates a new AdwSqueezer.

Since: 1.0

remove

squeezerRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a, IsWidget b) 
=> a

self: a AdwSqueezer

-> b

child: the child to remove

-> m () 

Removes a child widget from self.

Since: 1.0

setAllowNone

squeezerSetAllowNone Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> Bool

allowNone: whether self allows squeezing beyond the last child

-> m () 

Sets whether to allow squeezing beyond the last child's minimum size.

Since: 1.0

setHomogeneous

squeezerSetHomogeneous Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> Bool

homogeneous: whether self is homogeneous

-> m () 

Sets whether all children have the same size for the opposite orientation.

Since: 1.0

setInterpolateSize

squeezerSetInterpolateSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: A AdwSqueezer

-> Bool

interpolateSize: whether to interpolate the size

-> m () 

Sets whether self interpolates its size when changing the visible child.

Since: 1.0

setSwitchThresholdPolicy

squeezerSetSwitchThresholdPolicy Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> FoldThresholdPolicy

policy: the policy to use

-> m () 

Sets the fold threshold policy for self.

Since: 1.0

setTransitionDuration

squeezerSetTransitionDuration Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> Word32

duration: the new duration, in milliseconds

-> m () 

Sets the transition animation duration for self.

Since: 1.0

setTransitionType

squeezerSetTransitionType Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> SqueezerTransitionType

transition: the new transition type

-> m () 

Sets the type of animation used for transitions between children in self.

Since: 1.0

setXalign

squeezerSetXalign Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> Float

xalign: the new alignment value

-> m () 

Sets the horizontal alignment, from 0 (start) to 1 (end).

Since: 1.0

setYalign

squeezerSetYalign Source #

Arguments

:: (HasCallStack, MonadIO m, IsSqueezer a) 
=> a

self: a AdwSqueezer

-> Float

yalign: the new alignment value

-> m () 

Sets the vertical alignment, from 0 (top) to 1 (bottom).

Since: 1.0

Properties

allowNone

Whether to allow squeezing beyond the last child's minimum size.

If set to TRUE, the squeezer can shrink to the point where no child can be shown. This is functionally equivalent to appending a widget with 0x0 minimum size.

Since: 1.0

constructSqueezerAllowNone :: (IsSqueezer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getSqueezerAllowNone :: (MonadIO m, IsSqueezer o) => o -> m Bool Source #

Get the value of the “allow-none” property. When overloading is enabled, this is equivalent to

get squeezer #allowNone

setSqueezerAllowNone :: (MonadIO m, IsSqueezer o) => o -> Bool -> m () Source #

Set the value of the “allow-none” property. When overloading is enabled, this is equivalent to

set squeezer [ #allowNone := value ]

homogeneous

Whether all children have the same size for the opposite orientation.

For example, if a squeezer is horizontal and is homogeneous, it will request the same height for all its children. If it isn't, the squeezer may change size when a different child becomes visible.

Since: 1.0

constructSqueezerHomogeneous :: (IsSqueezer 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.

getSqueezerHomogeneous :: (MonadIO m, IsSqueezer o) => o -> m Bool Source #

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

get squeezer #homogeneous

setSqueezerHomogeneous :: (MonadIO m, IsSqueezer o) => o -> Bool -> m () Source #

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

set squeezer [ #homogeneous := value ]

interpolateSize

Whether the squeezer interpolates its size when changing the visible child.

If TRUE, the squeezer will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the squeezer is horizontal, it will interpolate the its height.

Since: 1.0

constructSqueezerInterpolateSize :: (IsSqueezer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getSqueezerInterpolateSize :: (MonadIO m, IsSqueezer o) => o -> m Bool Source #

Get the value of the “interpolate-size” property. When overloading is enabled, this is equivalent to

get squeezer #interpolateSize

setSqueezerInterpolateSize :: (MonadIO m, IsSqueezer o) => o -> Bool -> m () Source #

Set the value of the “interpolate-size” property. When overloading is enabled, this is equivalent to

set squeezer [ #interpolateSize := value ]

pages

A selection model with the squeezer's pages.

This can be used to keep an up-to-date view. The model also implements SelectionModel and can be used to track the visible page.

Since: 1.0

getSqueezerPages :: (MonadIO m, IsSqueezer o) => o -> m (Maybe SelectionModel) Source #

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

get squeezer #pages

switchThresholdPolicy

Determines when the squeezer will switch children.

If set to ADW_FOLD_THRESHOLD_POLICY_MINIMUM, it will only switch when the visible child cannot fit anymore. With ADW_FOLD_THRESHOLD_POLICY_NATURAL, it will switch as soon as the visible child doesn't get their natural size.

This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately switching.

Since: 1.0

constructSqueezerSwitchThresholdPolicy :: (IsSqueezer o, MonadIO m) => FoldThresholdPolicy -> m (GValueConstruct o) Source #

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

getSqueezerSwitchThresholdPolicy :: (MonadIO m, IsSqueezer o) => o -> m FoldThresholdPolicy Source #

Get the value of the “switch-threshold-policy” property. When overloading is enabled, this is equivalent to

get squeezer #switchThresholdPolicy

setSqueezerSwitchThresholdPolicy :: (MonadIO m, IsSqueezer o) => o -> FoldThresholdPolicy -> m () Source #

Set the value of the “switch-threshold-policy” property. When overloading is enabled, this is equivalent to

set squeezer [ #switchThresholdPolicy := value ]

transitionDuration

The animation duration, in milliseconds.

Since: 1.0

constructSqueezerTransitionDuration :: (IsSqueezer 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.

getSqueezerTransitionDuration :: (MonadIO m, IsSqueezer o) => o -> m Word32 Source #

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

get squeezer #transitionDuration

setSqueezerTransitionDuration :: (MonadIO m, IsSqueezer o) => o -> Word32 -> m () Source #

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

set squeezer [ #transitionDuration := value ]

transitionRunning

Whether a transition is currently running.

Since: 1.0

getSqueezerTransitionRunning :: (MonadIO m, IsSqueezer o) => o -> m Bool Source #

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

get squeezer #transitionRunning

transitionType

The type of animation used for transitions between children.

Since: 1.0

constructSqueezerTransitionType :: (IsSqueezer o, MonadIO m) => SqueezerTransitionType -> 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.

getSqueezerTransitionType :: (MonadIO m, IsSqueezer o) => o -> m SqueezerTransitionType Source #

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

get squeezer #transitionType

setSqueezerTransitionType :: (MonadIO m, IsSqueezer o) => o -> SqueezerTransitionType -> m () Source #

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

set squeezer [ #transitionType := value ]

visibleChild

The currently visible child.

Since: 1.0

getSqueezerVisibleChild :: (MonadIO m, IsSqueezer o) => o -> m (Maybe Widget) Source #

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

get squeezer #visibleChild

xalign

The horizontal alignment, from 0 (start) to 1 (end).

This affects the children allocation during transitions, when they exceed the size of the squeezer.

For example, 0.5 means the child will be centered, 0 means it will keep the start side aligned and overflow the end side, and 1 means the opposite.

Since: 1.0

constructSqueezerXalign :: (IsSqueezer o, MonadIO m) => Float -> m (GValueConstruct o) Source #

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

getSqueezerXalign :: (MonadIO m, IsSqueezer o) => o -> m Float Source #

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

get squeezer #xalign

setSqueezerXalign :: (MonadIO m, IsSqueezer o) => o -> Float -> m () Source #

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

set squeezer [ #xalign := value ]

yalign

The vertical alignment, from 0 (top) to 1 (bottom).

This affects the children allocation during transitions, when they exceed the size of the squeezer.

For example, 0.5 means the child will be centered, 0 means it will keep the top side aligned and overflow the bottom side, and 1 means the opposite.

Since: 1.0

constructSqueezerYalign :: (IsSqueezer o, MonadIO m) => Float -> m (GValueConstruct o) Source #

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

getSqueezerYalign :: (MonadIO m, IsSqueezer o) => o -> m Float Source #

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

get squeezer #yalign

setSqueezerYalign :: (MonadIO m, IsSqueezer o) => o -> Float -> m () Source #

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

set squeezer [ #yalign := value ]