|
Graphics.UI.Gtk.Layout.AspectFrame | Portability | portable (depends on GHC) | Stability | provisional | Maintainer | gtk2hs-users@lists.sourceforge.net |
|
|
|
|
|
Description |
A frame that constrains its child to a particular aspect ratio
|
|
Synopsis |
|
|
|
|
Detail
|
|
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.
|
|
Class Hierarchy
|
|
| GObject
| +----Object
| +----Widget
| +----Container
| +----Bin
| +----Frame
| +----AspectFrame
|
|
Types
|
|
|
Instances | |
|
|
|
| Instances | |
|
|
|
|
|
|
|
|
Constructors
|
|
|
:: 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
(left aligned) to 1.0 (right aligned)
| -> Maybe Float | ratio - The desired aspect ratio. If Nothing the
aspect ratio is taken from the requistion of the child.
| -> IO AspectFrame | | Create a new AspectFrame.
The frame may be augmented with a label which can be set by frameSetLabel.
|
|
|
Methods
|
|
|
:: AspectFrameClass self | | => self | | -> 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 (left
aligned) to 1.0 (right aligned)
| -> Maybe Float | ratio - The desired aspect ratio. If Nothing the
aspect ratio is taken from the requistion of the child.
| -> IO () | | Set parameters for an existing AspectFrame.
|
|
|
Attributes
|
|
|
X alignment of the child.
Allowed values: [0,1]
Default value: 0.5
|
|
|
Y alignment of the child.
Allowed values: [0,1]
Default value: 0.5
|
|
|
Aspect ratio if obey_child is False.
Allowed values: [1e-04,10000]
Default value: 0.5
|
|
|
Force aspect ratio to match that of the frame's child.
Default value: True
|
|
Produced by Haddock version 2.6.1 |