Name

AspectFrame —

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

Synopsis

aspectFrameNew:: Float -> Float -> Maybe Float -> IO AspectFrame
aspectFrameSet:: AspectFrameClass af => af -> Float -> Float -> Maybe Float -> IO ()

Introduction

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.

Constructors

aspectFrameNew

Create an AspectFrame widget.

aspectFrameNew:: Float:: Float:: Maybe Float:: IO AspectFrame
xalignyalignratio

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.

Methods

aspectFrameSet

Change the space use behaviour of an AspectFrame.

aspectFrameSet:: af:: Float:: Float:: Maybe Float:: IO ()
afxalignyalignratio