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.Abstract.Misc

Contents

- Detail
- Class Hierarchy
- Types
- Methods
- Attributes

Description

Base class for widgets with alignments and padding

Synopsis

- data Misc
- class WidgetClass o => MiscClass o
- castToMisc :: GObjectClass obj => obj -> Misc
- gTypeMisc :: GType
- toMisc :: MiscClass o => o -> Misc
- miscSetAlignment :: MiscClass self => self -> Float -> Float -> IO ()
- miscGetAlignment :: MiscClass self => self -> IO (Double, Double)
- miscSetPadding :: MiscClass self => self -> Int -> Int -> IO ()
- miscGetPadding :: MiscClass self => self -> IO (Int, Int)
- miscXalign :: MiscClass self => Attr self Float
- miscYalign :: MiscClass self => Attr self Float
- miscXpad :: MiscClass self => Attr self Int
- miscYpad :: MiscClass self => Attr self Int

# Detail

The `Misc` widget is an abstract widget which is not useful itself, but is used to derive subclasses which have alignment and padding attributes.

The horizontal and vertical padding attributes allows extra space to be added around the widget.

The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the widgets position.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Misc
    | +----Label
    | +----Arrow
    | +----Image
    | +----Pixmap

# Types

data Misc Source #

#### Instances

Instances details

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

class WidgetClass o => MiscClass o Source #

#### Instances

Instances details

MiscClass AccelLabel Source # |
Instance details Defined in Graphics.UI.Gtk.Types
MiscClass Arrow Source # |
Instance details Defined in Graphics.UI.Gtk.Types
MiscClass Image Source # |
Instance details Defined in Graphics.UI.Gtk.Types
MiscClass Label Source # |
Instance details Defined in Graphics.UI.Gtk.Types
MiscClass Misc Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToMisc :: GObjectClass obj => obj -> Misc Source #

gTypeMisc :: GType Source #

toMisc :: MiscClass o => o -> Misc Source #

# Methods

miscSetAlignment Source #

Arguments

:: MiscClass self |
=> self |
-> Float | `xalign` - the horizontal alignment, from 0 (left) to 1 (right).
-> Float | `yalign` - the vertical alignment, from 0 (top) to 1 (bottom).
-> IO () |

Sets the alignment of the widget.

miscGetAlignment :: MiscClass self => self -> IO (Double, Double) Source #

Gets the X and Y alignment of the widget within its allocation. See `miscSetAlignment`.

miscSetPadding Source #

Arguments

:: MiscClass self |
=> self |
-> Int | `xpad` - the amount of space to add on the left and right of the widget, in pixels.
-> Int | `ypad` - the amount of space to add on the top and bottom of the widget, in pixels.
-> IO () |

Sets the amount of space to add around the widget.

miscGetPadding :: MiscClass self => self -> IO (Int, Int) Source #

Gets the padding in the X and Y directions of the widget. See `miscSetPadding`.

# Attributes

miscXalign :: MiscClass self => Attr self Float Source #

The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.

Allowed values: [0,1]

Default value: 0.5

miscYalign :: MiscClass self => Attr self Float Source #

The vertical alignment, from 0 (top) to 1 (bottom).

Allowed values: [0,1]

Default value: 0.5

miscXpad :: MiscClass self => Attr self Int Source #

The amount of space to add on the left and right of the widget, in pixels.

Allowed values: >= 0

Default value: 0

miscYpad :: MiscClass self => Attr self Int Source #

The amount of space to add on the top and bottom of the widget, in pixels.

Allowed values: >= 0

Default value: 0