gi-gtk-3.0.38: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.AspectFrame

Description

The AspectFrame is useful when you want pack a widget so that it can resize but always retains the same aspect ratio. For instance, one might be drawing a small preview of a larger image. AspectFrame derives from Frame, so it can draw a label and a frame around the child. The frame will be “shrink-wrapped” to the size of the child.

CSS nodes

GtkAspectFrame uses a CSS node with name frame.

Synopsis

Exported types

class (GObject o, IsDescendantOf AspectFrame o) => IsAspectFrame o Source #

Type class for types which can be safely cast to AspectFrame, for instance with toAspectFrame.

Instances

Instances details
(GObject o, IsDescendantOf AspectFrame o) => IsAspectFrame o Source # 
Instance details

Defined in GI.Gtk.Objects.AspectFrame

toAspectFrame :: (MonadIO m, IsAspectFrame o) => o -> m AspectFrame Source #

Cast to AspectFrame, 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, set, 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, getChild, 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, getInternalChild, getLabel, getLabelAlign, getLabelWidget, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getShadowType, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.

Setters

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

new

aspectFrameNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

label: Label text.

-> Float

xalign: Horizontal alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)

-> Float

yalign: Vertical alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned)

-> Float

ratio: The desired aspect ratio.

-> Bool

obeyChild: If True, ratio is ignored, and the aspect ratio is taken from the requistion of the child.

-> m AspectFrame

Returns: the new AspectFrame.

Create a new AspectFrame.

set

aspectFrameSet Source #

Arguments

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

aspectFrame: a AspectFrame

-> Float

xalign: Horizontal alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)

-> Float

yalign: Vertical alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned)

-> Float

ratio: The desired aspect ratio.

-> Bool

obeyChild: If True, ratio is ignored, and the aspect ratio is taken from the requistion of the child.

-> m () 

Set parameters for an existing AspectFrame.

Properties

obeyChild

No description available in the introspection data.

constructAspectFrameObeyChild :: (IsAspectFrame o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getAspectFrameObeyChild :: (MonadIO m, IsAspectFrame o) => o -> m Bool Source #

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

get aspectFrame #obeyChild

setAspectFrameObeyChild :: (MonadIO m, IsAspectFrame o) => o -> Bool -> m () Source #

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

set aspectFrame [ #obeyChild := value ]

ratio

No description available in the introspection data.

constructAspectFrameRatio :: (IsAspectFrame o, MonadIO m) => Float -> m (GValueConstruct o) Source #

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

getAspectFrameRatio :: (MonadIO m, IsAspectFrame o) => o -> m Float Source #

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

get aspectFrame #ratio

setAspectFrameRatio :: (MonadIO m, IsAspectFrame o) => o -> Float -> m () Source #

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

set aspectFrame [ #ratio := value ]

xalign

No description available in the introspection data.

constructAspectFrameXalign :: (IsAspectFrame 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.

getAspectFrameXalign :: (MonadIO m, IsAspectFrame o) => o -> m Float Source #

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

get aspectFrame #xalign

setAspectFrameXalign :: (MonadIO m, IsAspectFrame o) => o -> Float -> m () Source #

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

set aspectFrame [ #xalign := value ]

yalign

No description available in the introspection data.

constructAspectFrameYalign :: (IsAspectFrame 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.

getAspectFrameYalign :: (MonadIO m, IsAspectFrame o) => o -> m Float Source #

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

get aspectFrame #yalign

setAspectFrameYalign :: (MonadIO m, IsAspectFrame o) => o -> Float -> m () Source #

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

set aspectFrame [ #yalign := value ]