gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Ornaments.Frame

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes

Description

A bin with a decorative frame and optional label

Synopsis

- 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, GlibString string) => self -> string -> IO ()
- frameGetLabel :: (FrameClass self, GlibString string) => 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, GlibString string) => 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

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Frame
    | +----AspectFrame

# Types

data Frame Source #

#### Instances

Instances details

Eq Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: Frame -> Frame -> Bool Source # (/=) :: Frame -> Frame -> Bool Source #
Ord Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods compare :: Frame -> Frame -> Ordering Source # (<) :: Frame -> Frame -> Bool Source # (<=) :: Frame -> Frame -> Bool Source # (>) :: Frame -> Frame -> Bool Source # (>=) :: Frame -> Frame -> Bool Source # max :: Frame -> Frame -> Frame Source # min :: Frame -> Frame -> Frame Source #
GObjectClass Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: Frame -> GObject Source # unsafeCastGObject :: GObject -> Frame Source #
BinClass Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types
FrameClass Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class BinClass o => FrameClass o Source #

#### Instances

Instances details

FrameClass AspectFrame Source # |
Instance details Defined in Graphics.UI.Gtk.Types
FrameClass Frame Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToFrame :: GObjectClass obj => obj -> Frame Source #

gTypeFrame :: GType Source #

toFrame :: FrameClass o => o -> Frame Source #

# Constructors

frameNew :: IO Frame Source #

Creates a new `Frame` without a label.

- A label can later be set by calling `frameSetLabel`.

# Methods

frameSetLabel Source #

Arguments

:: (FrameClass self, GlibString string) |
=> self |
-> string | `label` - the text to use as the label of the frame
-> IO () |

Sets the text of the label.

frameGetLabel Source #

Arguments

:: (FrameClass self, GlibString string) |
=> self |
-> IO string | returns the text in the label, or if there was no label widget or the label widget was not a `Label` then an exception is thrown

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.

frameGetLabelWidget Source #

Arguments

:: FrameClass self |
=> self |
-> IO (Maybe Widget) | returns the label widget, or `Nothing` if there is none.

Retrieves the label widget for the frame. See `frameSetLabelWidget`.

frameSetLabelAlign Source #

Arguments

:: FrameClass self |
=> self |
-> Float | `xalign` - The position of the label along the top edge of the widget. A value of 0.0 represents left alignment; 1.0 represents right alignment.
-> Float | `yalign` - The y alignment of the label. A value of 0.0 aligns under the frame; 1.0 aligns above the frame.
-> IO () |

Sets the alignment of the frame widget's label. The default values for a newly created frame are 0.0 and 0.5.

frameGetLabelAlign Source #

Arguments

:: 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

Constructors

ShadowNone |
ShadowIn |
ShadowOut |
ShadowEtchedIn |
ShadowEtchedOut |

#### Instances

Instances details

Enum ShadowType Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: ShadowType -> ShadowType Source #

pred :: ShadowType -> ShadowType Source #

toEnum :: Int -> ShadowType Source #

fromEnum :: ShadowType -> Int Source #

enumFrom :: ShadowType -> [ShadowType] Source #

enumFromThen :: ShadowType -> ShadowType -> [ShadowType] Source #

enumFromTo :: ShadowType -> ShadowType -> [ShadowType] Source #

enumFromThenTo :: ShadowType -> ShadowType -> ShadowType -> [ShadowType] Source #

Show ShadowType Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods showsPrec :: Int -> ShadowType -> ShowS Source # show :: ShadowType -> String Source # showList :: [ShadowType] -> ShowS Source #
Eq ShadowType Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods (==) :: ShadowType -> ShadowType -> Bool Source # (/=) :: ShadowType -> ShadowType -> Bool Source #

frameSetShadowType :: FrameClass self => self -> ShadowType -> IO () Source #

Sets the shadow type of the frame.

frameGetShadowType :: FrameClass self => self -> IO ShadowType Source #

Retrieves the shadow type of the frame. See `frameSetShadowType`.

# Attributes

frameLabel :: (FrameClass self, GlibString string) => Attr self string Source #

Text of the frame's label.

frameLabelXAlign :: FrameClass self => Attr self Float Source #

The horizontal alignment of the label.

Allowed values: [0,1]

Default value: 0.5

frameLabelYAlign :: FrameClass self => Attr self Float Source #

The vertical alignment of the label.

Allowed values: [0,1]

Default value: 0.5

frameShadowType :: FrameClass self => Attr self ShadowType Source #

Appearance of the frame border.

Default value: `ShadowEtchedIn`

frameLabelWidget :: (FrameClass self, WidgetClass labelWidget) => ReadWriteAttr self (Maybe Widget) labelWidget Source #

A widget to display in place of the usual frame label.