gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.AspectFrame

Contents

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

Methods

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

data AspectFrameSetMethodInfo Source #

Instances

((~) * signature (Float -> Float -> Float -> Bool -> m ()), MonadIO m, IsAspectFrame a) => MethodInfo * AspectFrameSetMethodInfo a signature Source # 

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

data AspectFrameObeyChildPropertyInfo Source #

Instances

AttrInfo AspectFrameObeyChildPropertyInfo Source # 
type AttrOrigin AspectFrameObeyChildPropertyInfo Source # 
type AttrLabel AspectFrameObeyChildPropertyInfo Source # 
type AttrGetType AspectFrameObeyChildPropertyInfo Source # 
type AttrBaseTypeConstraint AspectFrameObeyChildPropertyInfo Source # 
type AttrSetTypeConstraint AspectFrameObeyChildPropertyInfo Source # 
type AttrAllowedOps AspectFrameObeyChildPropertyInfo Source # 

ratio

data AspectFrameRatioPropertyInfo Source #

Instances

AttrInfo AspectFrameRatioPropertyInfo Source # 
type AttrOrigin AspectFrameRatioPropertyInfo Source # 
type AttrLabel AspectFrameRatioPropertyInfo Source # 
type AttrGetType AspectFrameRatioPropertyInfo Source # 
type AttrBaseTypeConstraint AspectFrameRatioPropertyInfo Source # 
type AttrSetTypeConstraint AspectFrameRatioPropertyInfo Source # 
type AttrAllowedOps AspectFrameRatioPropertyInfo Source # 

xalign

data AspectFrameXalignPropertyInfo Source #

Instances

AttrInfo AspectFrameXalignPropertyInfo Source # 
type AttrOrigin AspectFrameXalignPropertyInfo Source # 
type AttrLabel AspectFrameXalignPropertyInfo Source # 
type AttrGetType AspectFrameXalignPropertyInfo Source # 
type AttrBaseTypeConstraint AspectFrameXalignPropertyInfo Source # 
type AttrSetTypeConstraint AspectFrameXalignPropertyInfo Source # 
type AttrAllowedOps AspectFrameXalignPropertyInfo Source # 

yalign

data AspectFrameYalignPropertyInfo Source #

Instances

AttrInfo AspectFrameYalignPropertyInfo Source # 
type AttrOrigin AspectFrameYalignPropertyInfo Source # 
type AttrLabel AspectFrameYalignPropertyInfo Source # 
type AttrGetType AspectFrameYalignPropertyInfo Source # 
type AttrBaseTypeConstraint AspectFrameYalignPropertyInfo Source # 
type AttrSetTypeConstraint AspectFrameYalignPropertyInfo Source # 
type AttrAllowedOps AspectFrameYalignPropertyInfo Source #