Graphics.UI.Gtk.Selectors.FontSelection

gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

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

Graphics.UI.Gtk.Selectors.FontSelection

Contents

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

Description

A widget for selecting fonts

Synopsis

- data FontSelection
- class VBoxClass o => FontSelectionClass o
- castToFontSelection :: GObjectClass obj => obj -> FontSelection
- gTypeFontSelection :: GType
- toFontSelection :: FontSelectionClass o => o -> FontSelection
- fontSelectionNew :: IO FontSelection
- fontSelectionGetFontName :: FontSelectionClass self => self -> IO (Maybe String)
- fontSelectionSetFontName :: FontSelectionClass self => self -> String -> IO Bool
- fontSelectionGetPreviewText :: FontSelectionClass self => self -> IO String
- fontSelectionSetPreviewText :: FontSelectionClass self => self -> String -> IO ()
- fontSelectionFontName :: FontSelectionClass self => Attr self String
- fontSelectionPreviewText :: FontSelectionClass self => Attr self String

# Detail

The `FontSelection` widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the `FontSelectionDialog` widget to provide a dialog box for selecting fonts.

To set the font which is initially selected, use `fontSelectionSetFontName`.

To get the selected font use `fontSelectionGetFontName`.

To change the text which is shown in the preview area, use `fontSelectionSetPreviewText`.

# Class Hierarchy

     | GObject
     | +----Object
     | +----Widget
     | +----Container
     | +----Box
     | +----VBox
     | +----FontSelection

# Types

data FontSelection

Instances

Eq FontSelection |
Ord FontSelection |
GObjectClass FontSelection |
FontSelectionClass FontSelection |
VBoxClass FontSelection |
BoxClass FontSelection |
ContainerClass FontSelection |
WidgetClass FontSelection |
ObjectClass FontSelection |

class VBoxClass o => FontSelectionClass o

Instances

FontSelectionClass FontSelection |

castToFontSelection :: GObjectClass obj => obj -> FontSelection

gTypeFontSelection :: GType

toFontSelection :: FontSelectionClass o => o -> FontSelection

# Constructors

fontSelectionNew :: IO FontSelection

Creates a new `FontSelection`.

# Methods

fontSelectionGetFontName

Arguments

:: FontSelectionClass self |
=> self |
-> IO (Maybe String) | returns the name of the currently selected font, or `Nothing` if no font is selected.

Gets the currently-selected font name.

fontSelectionSetFontName

Arguments

:: FontSelectionClass self |
=> self |
-> String | `fontname` - a fontname.
-> IO Bool | returns `True` if the font was found.

Sets the currently-selected font.

fontSelectionGetPreviewText :: FontSelectionClass self => self -> IO String

Gets the text displayed in the preview area.

fontSelectionSetPreviewText :: FontSelectionClass self => self -> String -> IO ()

Sets the text displayed in the preview area.

# Attributes

fontSelectionFontName :: FontSelectionClass self => Attr self String

The X string that represents this font.

Default value: ""

fontSelectionPreviewText :: FontSelectionClass self => Attr self String

The text to display in order to demonstrate the selected font.

Default value: "abcdefghijk ABCDEFGHIJK"