Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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 squeezerSetTransitionType
.
Synopsis
- newtype Squeezer = Squeezer (ManagedPtr Squeezer)
- class (GObject o, IsDescendantOf Squeezer o) => IsSqueezer o
- toSqueezer :: (MonadIO m, IsSqueezer o) => o -> m Squeezer
- squeezerGetChildEnabled :: (HasCallStack, MonadIO m, IsSqueezer a, IsWidget b) => a -> b -> m Bool
- squeezerGetHomogeneous :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> m Bool
- squeezerGetInterpolateSize :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> m Bool
- squeezerGetTransitionDuration :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> m Word32
- squeezerGetTransitionRunning :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> m Bool
- squeezerGetTransitionType :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> m SqueezerTransitionType
- squeezerGetVisibleChild :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> m (Maybe Widget)
- squeezerNew :: (HasCallStack, MonadIO m) => m Squeezer
- squeezerSetChildEnabled :: (HasCallStack, MonadIO m, IsSqueezer a, IsWidget b) => a -> b -> Bool -> m ()
- squeezerSetHomogeneous :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> Bool -> m ()
- squeezerSetInterpolateSize :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> Bool -> m ()
- squeezerSetTransitionDuration :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> Word32 -> m ()
- squeezerSetTransitionType :: (HasCallStack, MonadIO m, IsSqueezer a) => a -> SqueezerTransitionType -> m ()
- constructSqueezerHomogeneous :: (IsSqueezer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSqueezerHomogeneous :: (MonadIO m, IsSqueezer o) => o -> m Bool
- setSqueezerHomogeneous :: (MonadIO m, IsSqueezer o) => o -> Bool -> m ()
- constructSqueezerInterpolateSize :: (IsSqueezer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSqueezerInterpolateSize :: (MonadIO m, IsSqueezer o) => o -> m Bool
- setSqueezerInterpolateSize :: (MonadIO m, IsSqueezer o) => o -> Bool -> m ()
- constructSqueezerTransitionDuration :: (IsSqueezer o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getSqueezerTransitionDuration :: (MonadIO m, IsSqueezer o) => o -> m Word32
- setSqueezerTransitionDuration :: (MonadIO m, IsSqueezer o) => o -> Word32 -> m ()
- getSqueezerTransitionRunning :: (MonadIO m, IsSqueezer o) => o -> m Bool
- constructSqueezerTransitionType :: (IsSqueezer o, MonadIO m) => SqueezerTransitionType -> m (GValueConstruct o)
- getSqueezerTransitionType :: (MonadIO m, IsSqueezer o) => o -> m SqueezerTransitionType
- setSqueezerTransitionType :: (MonadIO m, IsSqueezer o) => o -> SqueezerTransitionType -> m ()
- getSqueezerVisibleChild :: (MonadIO m, IsSqueezer o) => o -> m (Maybe Widget)
Exported types
Memory-managed wrapper type.
Instances
Eq Squeezer Source # | |
GObject Squeezer Source # | |
Defined in GI.Handy.Objects.Squeezer | |
ManagedPtrNewtype Squeezer Source # | |
Defined in GI.Handy.Objects.Squeezer toManagedPtr :: Squeezer -> ManagedPtr Squeezer | |
TypedObject Squeezer Source # | |
Defined in GI.Handy.Objects.Squeezer | |
HasParentTypes Squeezer Source # | |
Defined in GI.Handy.Objects.Squeezer | |
IsGValue (Maybe Squeezer) Source # | Convert |
Defined in GI.Handy.Objects.Squeezer gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Squeezer -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Squeezer) | |
type ParentTypes Squeezer Source # | |
Defined in GI.Handy.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
(GObject o, IsDescendantOf Squeezer o) => IsSqueezer o Source # | |
Defined in GI.Handy.Objects.Squeezer |
toSqueezer :: (MonadIO m, IsSqueezer o) => o -> m Squeezer Source #
Methods
Click to display all available methods, including inherited ones
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.
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.
getChildEnabled
squeezerGetChildEnabled Source #
:: (HasCallStack, MonadIO m, IsSqueezer a, IsWidget b) | |
=> a |
|
-> b |
|
-> m Bool |
Gets whether child
is enabled.
getHomogeneous
squeezerGetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> m Bool |
getInterpolateSize
squeezerGetInterpolateSize Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> m Bool | Returns: |
Gets wether self
should interpolate its size on visible child change.
See squeezerSetInterpolateSize
.
Since: 0.0.10
getTransitionDuration
squeezerGetTransitionDuration Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> m Word32 | Returns: the transition duration |
Gets the amount of time (in milliseconds) that transitions between children
in self
will take.
getTransitionRunning
squeezerGetTransitionRunning Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether self
is currently in a transition from one child to another.
getTransitionType
squeezerGetTransitionType Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> m SqueezerTransitionType | Returns: the current transition type of |
Gets the type of animation that will be used for transitions between children
in self
.
getVisibleChild
squeezerGetVisibleChild Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the visible child of the |
Gets the currently visible child of self
, or Nothing
if there are no visible
children.
new
:: (HasCallStack, MonadIO m) | |
=> m Squeezer | Returns: a new |
Creates a new Squeezer
container.
setChildEnabled
squeezerSetChildEnabled Source #
:: (HasCallStack, MonadIO m, IsSqueezer a, IsWidget b) | |
=> a |
|
-> b |
|
-> Bool | |
-> m () |
Make self
enable or disable child
. 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.
setHomogeneous
squeezerSetHomogeneous Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets self
to be homogeneous or not. If it is homogeneous, self
will request
the same size for all its children for its opposite orientation, e.g. if
self
is oriented horizontally and is homogeneous, it will request the same
height for all its children. If it isn't, self
may change size when a
different child becomes visible.
Since: 0.0.10
setInterpolateSize
squeezerSetInterpolateSize Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether or not self
will interpolate the size of its opposing
orientation when changing the visible child. If True
, self
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 self
is horizontal, it will interpolate the its height.
Since: 0.0.10
setTransitionDuration
squeezerSetTransitionDuration Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the duration that transitions between children in self
will take.
setTransitionType
squeezerSetTransitionType Source #
:: (HasCallStack, MonadIO m, IsSqueezer a) | |
=> a |
|
-> SqueezerTransitionType |
|
-> m () |
Sets the type of animation that will be used for transitions between children
in self
. 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.
Properties
homogeneous
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
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