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.Layout.Expander

Contents

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

Description

A container which can hide its child

- Module available since Gtk+ version 2.4

Synopsis

- data Expander
- class BinClass o => ExpanderClass o
- castToExpander :: GObjectClass obj => obj -> Expander
- gTypeExpander :: GType
- toExpander :: ExpanderClass o => o -> Expander
- expanderNew :: GlibString string => string -> IO Expander
- expanderNewWithMnemonic :: GlibString string => string -> IO Expander
- expanderSetExpanded :: Expander -> Bool -> IO ()
- expanderGetExpanded :: Expander -> IO Bool
- expanderSetSpacing :: Expander -> Int -> IO ()
- expanderGetSpacing :: Expander -> IO Int
- expanderSetLabel :: GlibString string => Expander -> string -> IO ()
- expanderGetLabel :: GlibString string => Expander -> IO string
- expanderSetUseUnderline :: Expander -> Bool -> IO ()
- expanderGetUseUnderline :: Expander -> IO Bool
- expanderSetUseMarkup :: Expander -> Bool -> IO ()
- expanderGetUseMarkup :: Expander -> IO Bool
- expanderSetLabelWidget :: WidgetClass labelWidget => Expander -> labelWidget -> IO ()
- expanderGetLabelWidget :: Expander -> IO Widget
- expanderExpanded :: Attr Expander Bool
- expanderLabel :: GlibString string => Attr Expander string
- expanderUseUnderline :: Attr Expander Bool
- expanderUseMarkup :: Attr Expander Bool
- expanderSpacing :: Attr Expander Int
- expanderLabelWidget :: WidgetClass labelWidget => ReadWriteAttr Expander Widget labelWidget
- expanderLabelFill :: Attr Expander Bool
- onActivate :: Expander -> IO () -> IO (ConnectId Expander)
- afterActivate :: Expander -> IO () -> IO (ConnectId Expander)

# Detail

A `Expander` allows the user to hide or show its child by clicking on an expander triangle similar to the triangles used in a `TreeView`.

Normally you use an expander as you would use any other descendant of `Bin`; you create the child widget and use `containerAdd` to add it to the expander. When the expander is toggled, it will take care of showing and hiding the child automatically.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Expander

# Types

data Expander Source #

#### Instances

Instances details

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

class BinClass o => ExpanderClass o Source #

#### Instances

Instances details

ExpanderClass Expander Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToExpander :: GObjectClass obj => obj -> Expander Source #

gTypeExpander :: GType Source #

toExpander :: ExpanderClass o => o -> Expander Source #

# Constructors

expanderNew :: GlibString string => string -> IO Expander Source #

Creates a new expander using the given string as the text of the label.

expanderNewWithMnemonic Source #

Arguments

:: GlibString string |
=> string | `label` - the text of the label with an underscore in front of the mnemonic character
-> IO Expander |

Creates a new expander using `label` as the text of the label. If characters in `label` are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key activates the button.

# Methods

expanderSetExpanded :: Expander -> Bool -> IO () Source #

Sets the state of the expander. Set to `True`, if you want the child widget to be revealed, and `False` if you want the child widget to be hidden.

expanderGetExpanded :: Expander -> IO Bool Source #

Queries a `Expander` and returns its current state. Returns `True` if the child widget is revealed.

See `expanderSetExpanded`.

expanderSetSpacing :: Expander -> Int -> IO () Source #

Sets the spacing field of `expander`, which is the number of pixels to place between expander and the child.

expanderGetSpacing Source #

Arguments

:: Expander |
-> IO Int | returns spacing between the expander and child.

Gets the value set by `expanderSetSpacing`.

expanderSetLabel :: GlibString string => Expander -> string -> IO () Source #

Sets the text of the label of the expander to `label`.

This will also clear any previously set labels.

expanderGetLabel :: GlibString string => Expander -> IO string Source #

Fetches the text from the label of the expander, as set by `expanderSetLabel`.

expanderSetUseUnderline Source #

Arguments

:: Expander |
-> Bool | `useUnderline` - `True` if underlines in the text indicate mnemonics
-> IO () |

If true, an underline in the text of the expander label indicates the next character should be used for the mnemonic accelerator key.

expanderGetUseUnderline Source #

Arguments

:: Expander |
-> IO Bool | returns `True` if an embedded underline in the expander label indicates the mnemonic accelerator keys.

Returns whether an embedded underline in the expander label indicates a mnemonic. See `expanderSetUseUnderline`.

expanderSetUseMarkup Source #

Arguments

:: Expander |
-> Bool | `useMarkup` - `True` if the label's text should be parsed for markup
-> IO () |

Sets whether the text of the label contains markup in Pango's text markup language. See `labelSetMarkup`.

expanderGetUseMarkup :: Expander -> IO Bool Source #

Returns whether the label's text is interpreted as marked up with the Pango text markup language. See `expanderSetUseMarkup`.

expanderSetLabelWidget Source #

Arguments

:: WidgetClass labelWidget |
=> Expander |
-> labelWidget | `labelWidget` - the new label widget
-> IO () |

Set the label widget for the expander. This is the widget that will appear embedded alongside the expander arrow.

expanderGetLabelWidget Source #

Arguments

:: Expander |
-> IO Widget | returns the label widget

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

# Attributes

expanderExpanded :: Attr Expander Bool Source #

Whether the expander has been opened to reveal the child widget.

Default value: `False`

expanderLabel :: GlibString string => Attr Expander string Source #

Text of the expander's label.

expanderUseUnderline :: Attr Expander Bool Source #

If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.

Default value: `False`

expanderUseMarkup :: Attr Expander Bool Source #

The text of the label includes XML markup. See pango_parse_markup().

Default value: `False`

expanderSpacing :: Attr Expander Int Source #

Space to put between the label and the child.

Allowed values: >= 0

Default value: 0

expanderLabelWidget :: WidgetClass labelWidget => ReadWriteAttr Expander Widget labelWidget Source #

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

expanderLabelFill :: Attr Expander Bool Source #

Whether the label widget should fill all available horizontal space.

Default value: `False`

# Signals

onActivate :: Expander -> IO () -> IO (ConnectId Expander) Source #

afterActivate :: Expander -> IO () -> IO (ConnectId Expander) Source #