Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
A bin with a decorative frame and optional label
- data Frame
- class BinClass o => FrameClass o
- castToFrame :: GObjectClass obj => obj -> Frame
- gTypeFrame :: GType
- toFrame :: FrameClass o => o -> Frame
- frameNew :: IO Frame
- frameSetLabel :: FrameClass self => self -> String -> IO ()
- frameGetLabel :: FrameClass self => self -> IO String
- frameSetLabelWidget :: (FrameClass self, WidgetClass labelWidget) => self -> labelWidget -> IO ()
- frameGetLabelWidget :: FrameClass self => self -> IO (Maybe Widget)
- frameSetLabelAlign :: FrameClass self => self -> Float -> Float -> IO ()
- frameGetLabelAlign :: FrameClass self => self -> IO (Float, Float)
- data ShadowType
- = ShadowNone
- | ShadowIn
- | ShadowOut
- | ShadowEtchedIn
- | ShadowEtchedOut
- frameSetShadowType :: FrameClass self => self -> ShadowType -> IO ()
- frameGetShadowType :: FrameClass self => self -> IO ShadowType
- frameLabel :: FrameClass self => Attr self String
- frameLabelXAlign :: FrameClass self => Attr self Float
- frameLabelYAlign :: FrameClass self => Attr self Float
- frameShadowType :: FrameClass self => Attr self ShadowType
- frameLabelWidget :: (FrameClass self, WidgetClass labelWidget) => ReadWriteAttr self (Maybe Widget) labelWidget
Detail
The frame widget is a Bin that surrounds its child with a decorative
frame and an optional label. If present, the label is drawn in a gap in the
top side of the frame. The position of the label can be controlled with
frameSetLabelAlign
.
Class Hierarchy
Types
class BinClass o => FrameClass o Source
castToFrame :: GObjectClass obj => obj -> FrameSource
toFrame :: FrameClass o => o -> FrameSource
Constructors
Creates a new Frame
without a label.
- A label can later be set by calling
frameSetLabel
.
Methods
:: FrameClass self | |
=> self | |
-> String |
|
-> IO () |
Sets the text of the label.
:: FrameClass self | |
=> self | |
-> IO String | returns the text in the label, or if there was no label
widget or the lable widget was not a |
If the frame's label widget is a Label
, returns the text in the label
widget.
frameSetLabelWidget :: (FrameClass self, WidgetClass labelWidget) => self -> labelWidget -> IO ()Source
Sets the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.
:: FrameClass self | |
=> self | |
-> IO (Maybe Widget) | returns the label widget, or |
Retrieves the label widget for the frame. See frameSetLabelWidget
.
:: FrameClass self | |
=> self | |
-> Float |
|
-> Float |
|
-> IO () |
Sets the alignment of the frame widget's label. The default values for a newly created frame are 0.0 and 0.5.
:: FrameClass self | |
=> self | |
-> IO (Float, Float) | (xalign, yalign) |
Retrieves the X and Y alignment of the frame's label. See
frameSetLabelAlign
.
data ShadowType Source
Shadow types
frameSetShadowType :: FrameClass self => self -> ShadowType -> IO ()Source
Sets the shadow type of the frame.
frameGetShadowType :: FrameClass self => self -> IO ShadowTypeSource
Retrieves the shadow type of the frame. See frameSetShadowType
.
Attributes
frameLabel :: FrameClass self => Attr self StringSource
Text of the frame's label.
frameLabelXAlign :: FrameClass self => Attr self FloatSource
The horizontal alignment of the label.
Allowed values: [0,1]
Default value: 0.5
frameLabelYAlign :: FrameClass self => Attr self FloatSource
The vertical alignment of the label.
Allowed values: [0,1]
Default value: 0.5
frameShadowType :: FrameClass self => Attr self ShadowTypeSource
Appearance of the frame border.
Default value: ShadowEtchedIn
frameLabelWidget :: (FrameClass self, WidgetClass labelWidget) => ReadWriteAttr self (Maybe Widget) labelWidgetSource
A widget to display in place of the usual frame label.