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.Selectors.FontButton

Contents

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

Description

A button to launch a font selection dialog

- Module available since Gtk+ version 2.4

Synopsis

- data FontButton
- class ButtonClass o => FontButtonClass o
- castToFontButton :: GObjectClass obj => obj -> FontButton
- gTypeFontButton :: GType
- toFontButton :: FontButtonClass o => o -> FontButton
- fontButtonNew :: IO FontButton
- fontButtonNewWithFont :: GlibString string => string -> IO FontButton
- fontButtonSetFontName :: (FontButtonClass self, GlibString string) => self -> string -> IO Bool
- fontButtonGetFontName :: (FontButtonClass self, GlibString string) => self -> IO string
- fontButtonSetShowStyle :: FontButtonClass self => self -> Bool -> IO ()
- fontButtonGetShowStyle :: FontButtonClass self => self -> IO Bool
- fontButtonSetShowSize :: FontButtonClass self => self -> Bool -> IO ()
- fontButtonGetShowSize :: FontButtonClass self => self -> IO Bool
- fontButtonSetUseFont :: FontButtonClass self => self -> Bool -> IO ()
- fontButtonGetUseFont :: FontButtonClass self => self -> IO Bool
- fontButtonSetUseSize :: FontButtonClass self => self -> Bool -> IO ()
- fontButtonGetUseSize :: FontButtonClass self => self -> IO Bool
- fontButtonSetTitle :: (FontButtonClass self, GlibString string) => self -> string -> IO ()
- fontButtonGetTitle :: (FontButtonClass self, GlibString string) => self -> IO string
- fontButtonTitle :: (FontButtonClass self, GlibString string) => Attr self string
- fontButtonFontName :: (FontButtonClass self, GlibString string) => Attr self string
- fontButtonUseFont :: FontButtonClass self => Attr self Bool
- fontButtonUseSize :: FontButtonClass self => Attr self Bool
- fontButtonShowStyle :: FontButtonClass self => Attr self Bool
- fontButtonShowSize :: FontButtonClass self => Attr self Bool
- onFontSet :: FontButtonClass self => self -> IO () -> IO (ConnectId self)
- afterFontSet :: FontButtonClass self => self -> IO () -> IO (ConnectId self)

# Detail

The `FontButton` is a button which displays the currently selected font an allows to open a font selection dialog to change the font. It is suitable widget for selecting a font in a preference dialog.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Button
    | +----FontButton

# Types

data FontButton Source #

#### Instances

Instances details

Eq FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: FontButton -> FontButton -> Bool Source # (/=) :: FontButton -> FontButton -> Bool Source #
Ord FontButton Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: FontButton -> FontButton -> Ordering Source #

(<) :: FontButton -> FontButton -> Bool Source #

(<=) :: FontButton -> FontButton -> Bool Source #

(>) :: FontButton -> FontButton -> Bool Source #

(>=) :: FontButton -> FontButton -> Bool Source #

max :: FontButton -> FontButton -> FontButton Source #

min :: FontButton -> FontButton -> FontButton Source #

GObjectClass FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: FontButton -> GObject Source # unsafeCastGObject :: GObject -> FontButton Source #
BinClass FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ButtonClass FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
FontButtonClass FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class ButtonClass o => FontButtonClass o Source #

#### Instances

Instances details

FontButtonClass FontButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToFontButton :: GObjectClass obj => obj -> FontButton Source #

gTypeFontButton :: GType Source #

toFontButton :: FontButtonClass o => o -> FontButton Source #

# Constructors

fontButtonNew :: IO FontButton Source #

Creates a new font picker widget.

fontButtonNewWithFont Source #

Arguments

:: GlibString string |
=> string | `fontname` - Name of font to display in font selection dialog
-> IO FontButton |

Creates a new font picker widget.

# Methods

fontButtonSetFontName Source #

Arguments

:: (FontButtonClass self, GlibString string) |
=> self |
-> string | `fontname` - Name of font to display in font selection dialog
-> IO Bool | returns Return value of `fontSelectionDialogSetFontName` if the font selection dialog exists, otherwise `False`.

Sets or updates the currently-displayed font in font picker dialog.

fontButtonGetFontName Source #

Arguments

:: (FontButtonClass self, GlibString string) |
=> self |
-> IO string | returns an internal copy of the font name which must not be freed.

Retrieves the name of the currently selected font.

fontButtonSetShowStyle Source #

Arguments

:: FontButtonClass self |
=> self |
-> Bool | `showStyle` - `True` if font style should be displayed in label.
-> IO () |

If `showStyle` is `True`, the font style will be displayed along with name of the selected font.

fontButtonGetShowStyle Source #

Arguments

:: FontButtonClass self |
=> self |
-> IO Bool | returns whether the font style will be shown in the label.

Returns whether the name of the font style will be shown in the label.

fontButtonSetShowSize Source #

Arguments

:: FontButtonClass self |
=> self |
-> Bool | `showSize` - `True` if font size should be displayed in dialog.
-> IO () |

If `showSize` is `True`, the font size will be displayed along with the name of the selected font.

fontButtonGetShowSize Source #

Arguments

:: FontButtonClass self |
=> self |
-> IO Bool | returns whether the font size will be shown in the label.

Returns whether the font size will be shown in the label.

fontButtonSetUseFont Source #

Arguments

:: FontButtonClass self |
=> self |
-> Bool | `useFont` - If `True`, font name will be written using font chosen.
-> IO () |

If `useFont` is `True`, the font name will be written using the selected font.

fontButtonGetUseFont Source #

Arguments

:: FontButtonClass self |
=> self |
-> IO Bool | returns whether the selected font is used in the label.

Returns whether the selected font is used in the label.

fontButtonSetUseSize Source #

Arguments

:: FontButtonClass self |
=> self |
-> Bool | `useSize` - If `True`, font name will be written using the selected size.
-> IO () |

If `useSize` is `True`, the font name will be written using the selected size.

fontButtonGetUseSize Source #

Arguments

:: FontButtonClass self |
=> self |
-> IO Bool | returns whether the selected size is used in the label.

Returns whether the selected size is used in the label.

fontButtonSetTitle Source #

Arguments

:: (FontButtonClass self, GlibString string) |
=> self |
-> string | `title` - a string containing the font selection dialog title
-> IO () |

Sets the title for the font selection dialog.

fontButtonGetTitle Source #

Arguments

:: (FontButtonClass self, GlibString string) |
=> self |
-> IO string | returns an internal copy of the title string which must not be freed.

Retrieves the title of the font selection dialog.

# Attributes

fontButtonTitle :: (FontButtonClass self, GlibString string) => Attr self string Source #

The title of the font selection dialog.

Default value: "Pick a Font"

fontButtonFontName :: (FontButtonClass self, GlibString string) => Attr self string Source #

The name of the currently selected font.

Default value: "Sans 12"

fontButtonUseFont :: FontButtonClass self => Attr self Bool Source #

If this property is set to `True`, the label will be drawn in the selected font.

Default value: `False`

fontButtonUseSize :: FontButtonClass self => Attr self Bool Source #

If this property is set to `True`, the label will be drawn with the selected font size.

Default value: `False`

fontButtonShowStyle :: FontButtonClass self => Attr self Bool Source #

If this property is set to `True`, the name of the selected font style will be shown in the label. For a more WYSIWIG way to show the selected style, see the ::use-font property.

Default value: `True`

fontButtonShowSize :: FontButtonClass self => Attr self Bool Source #

If this property is set to `True`, the selected font size will be shown in the label. For a more WYSIWIG way to show the selected size, see the ::use-size property.

Default value: `True`

# Signals

onFontSet :: FontButtonClass self => self -> IO () -> IO (ConnectId self) Source #

The `fontSet` signal is emitted when the user selects a font. When handling this signal, use `fontButtonGetFontName` to find out which font was just selected.

afterFontSet :: FontButtonClass self => self -> IO () -> IO (ConnectId self) Source #

The `fontSet` signal is emitted when the user selects a font. When handling this signal, use `fontButtonGetFontName` to find out which font was just selected.