gi-handy-1.0.4: libhandy bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Handy.Objects.Squeezer

Description

A best fit container.

The HdySqueezer 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 [methodsqueezer.set_transition_type].

CSS nodes

HdySqueezer 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.Handy.Objects.Squeezer

GObject Squeezer Source # 
Instance details

Defined in GI.Handy.Objects.Squeezer

ManagedPtrNewtype Squeezer Source # 
Instance details

Defined in GI.Handy.Objects.Squeezer

Methods

toManagedPtr :: Squeezer -> ManagedPtr Squeezer

TypedObject Squeezer Source # 
Instance details

Defined in GI.Handy.Objects.Squeezer

Methods

glibType :: IO GType

HasParentTypes Squeezer Source # 
Instance details

Defined in GI.Handy.Objects.Squeezer

IsGValue (Maybe Squeezer) Source #

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

Instance details

Defined in GI.Handy.Objects.Squeezer

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Squeezer -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Squeezer)

type ParentTypes Squeezer Source # 
Instance details

Defined in GI.Handy.Objects.Squeezer

type ParentTypes Squeezer = '[Container, Widget, Object, ImplementorIface, Buildable, Orientable]

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

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, 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, insertActionGroup, intersect, 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, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChildEnabled, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHomogeneous, getInternalChild, getInterpolateSize, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, 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, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getTransitionDuration, getTransitionRunning, getTransitionType, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisibleChild, getVisual, getWindow, getXalign, getYalign.

Setters

setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildEnabled, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setHomogeneous, setInterpolateSize, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setTransitionDuration, setTransitionType, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow, setXalign, setYalign.

getChildEnabled

squeezerGetChildEnabled Source #

Arguments

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

self: a squeezer

-> b

child: a child of self

-> m Bool

Returns: whether child is enabled

Gets whether child is enabled.

See [methodsqueezer.set_child_enabled].

Since: 1.0

getHomogeneous

squeezerGetHomogeneous Source #

Arguments

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

self: a squeezer

-> m Bool

Returns: whether self is homogeneous

Gets whether self is homogeneous.

Since: 1.0

getInterpolateSize

squeezerGetInterpolateSize Source #

Arguments

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

self: a squeezer

-> m Bool

Returns: whether self interpolates its size on visible child change

Gets whether self should interpolate its size on visible child change.

Since: 1.0

getTransitionDuration

squeezerGetTransitionDuration Source #

Arguments

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

self: a squeezer

-> m Word32

Returns: the transition duration, in milliseconds

Gets the amount of time that transitions between children will take.

Since: 1.0

getTransitionRunning

squeezerGetTransitionRunning Source #

Arguments

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

self: a squeezer

-> 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 squeezer

-> m SqueezerTransitionType

Returns: the current transition type of self

Gets the animation type that will be used for transitions between children.

Since: 1.0

getVisibleChild

squeezerGetVisibleChild Source #

Arguments

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

self: a squeezer

-> 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 squeezer

-> m Float

Returns: the xalign property

Gets the horizontal alignment.

Since: 1.0

getYalign

squeezerGetYalign Source #

Arguments

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

self: a squeezer

-> m Float

Returns: the yalign property

Gets the vertical alignment.

Since: 1.0

new

squeezerNew Source #

Arguments

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

Returns: the newly created HdySqueezer

Creates a new HdySqueezer.

Since: 1.0

setChildEnabled

squeezerSetChildEnabled Source #

Arguments

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

self: a squeezer

-> b

child: a child of self

-> Bool

enabled: whether to enable the child

-> m () 

Sets whether child is enabled.

If a child is disabled, it will be ignored when looking for the child fitting the available size best. This allows to programmatically and prematurely hide a child of self even if it fits in the available space.

This can be used e.g. to ensure a certain child is hidden below a certain window width, or any other constraint you find suitable.

Since: 1.0

setHomogeneous

squeezerSetHomogeneous Source #

Arguments

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

self: a squeezer

-> Bool

homogeneous: TRUE to make self 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 squeezer

-> Bool

interpolateSize: TRUE to interpolate the size

-> m () 

Sets whether self should interpolate its size on visible child change.

Since: 1.0

setTransitionDuration

squeezerSetTransitionDuration Source #

Arguments

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

self: a squeezer

-> Word32

duration: the new duration, in milliseconds

-> m () 

Sets the duration that transitions between children in self will take.

Since: 1.0

setTransitionType

squeezerSetTransitionType Source #

Arguments

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

self: a squeezer

-> SqueezerTransitionType

transition: the new transition type

-> m () 

Sets the animation type that will be used for transitions between children.

Since: 1.0

setXalign

squeezerSetXalign Source #

Arguments

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

self: a squeezer

-> Float

xalign: the new xalign value, between 0 and 1

-> m () 

Sets the horizontal alignment.

Since: 1.0

setYalign

squeezerSetYalign Source #

Arguments

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

self: a squeezer

-> Float

yalign: the new yalign value, between 0 and 1

-> m () 

Sets the vertical alignment.

Since: 1.0

Properties

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 ]

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.

Available types include various kinds of fades and slides.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.

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

The xalign property determines the horizontal alignment of the children inside the squeezer's size allocation. Compare this to Widget:halign, which determines how the squeezer's size allocation is positioned in the space available for the squeezer.

This will affect the position of children too wide to fit in the squeezer as they are fading out.

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 (start) to 1 (end).

The yalign property determines the vertical alignment of the children inside the squeezer's size allocation. Compare this to Widget:valign, which determines how the squeezer's size allocation is positioned in the space available for the squeezer.

This will affect the position of children too tall to fit in the squeezer as they are fading out.

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 ]