Gtk2HsContentsIndex
Graphics.UI.Gtk.Layout.AspectFrame
Description

A frame that constrains its child to a particular aspect ratio.

  • 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.
Synopsis
data AspectFrame
class FrameClass o => AspectFrameClass o
castToAspectFrame :: GObjectClass obj => obj -> AspectFrame
aspectFrameNew :: Float -> Float -> Maybe Float -> IO AspectFrame
aspectFrameSet :: AspectFrameClass af => af -> Float -> Float -> Maybe Float -> IO ()
Documentation
data AspectFrame
Instances
AspectFrameClass AspectFrame
FrameClass AspectFrame
BinClass AspectFrame
ContainerClass AspectFrame
WidgetClass AspectFrame
ObjectClass AspectFrame
GObjectClass AspectFrame
class FrameClass o => AspectFrameClass o
Instances
AspectFrameClass AspectFrame
castToAspectFrame :: GObjectClass obj => obj -> AspectFrame
aspectFrameNew :: Float -> Float -> Maybe Float -> IO AspectFrame

Create an AspectFrame widget.

  • If ratio is not given, the aspect ratio is taken from the child widget.
  • The frame may be augmented with a label which can be set by frameSetLabel.
aspectFrameSet :: AspectFrameClass af => af -> Float -> Float -> Maybe Float -> IO ()
Change the space use behaviour of an AspectFrame.
Produced by Haddock version 0.6