Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Objects.FontButton
Contents
Description
The FontButton
is a button which displays the currently selected
font an allows to open a font chooser dialog to change the font.
It is suitable widget for selecting a font in a preference dialog.
CSS nodes
GtkFontButton has a single CSS node with name button and style class .font.
- newtype FontButton = FontButton (ManagedPtr FontButton)
- class GObject o => IsFontButton o
- toFontButton :: (MonadIO m, IsFontButton o) => o -> m FontButton
- noFontButton :: Maybe FontButton
- fontButtonGetFontName :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Text
- fontButtonGetShowSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- fontButtonGetShowStyle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- fontButtonGetTitle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Text
- fontButtonGetUseFont :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- fontButtonGetUseSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- fontButtonNew :: (HasCallStack, MonadIO m) => m FontButton
- fontButtonNewWithFont :: (HasCallStack, MonadIO m) => Text -> m FontButton
- fontButtonSetFontName :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Text -> m Bool
- fontButtonSetShowSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- fontButtonSetShowStyle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- fontButtonSetTitle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Text -> m ()
- fontButtonSetUseFont :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- fontButtonSetUseSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- clearFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m ()
- constructFontButtonFontName :: IsFontButton o => Text -> IO (GValueConstruct o)
- getFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m Text
- setFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> Text -> m ()
- constructFontButtonShowSize :: IsFontButton o => Bool -> IO (GValueConstruct o)
- getFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> m Bool
- setFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> Bool -> m ()
- constructFontButtonShowStyle :: IsFontButton o => Bool -> IO (GValueConstruct o)
- getFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> m Bool
- setFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> Bool -> m ()
- constructFontButtonTitle :: IsFontButton o => Text -> IO (GValueConstruct o)
- getFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> m Text
- setFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> Text -> m ()
- constructFontButtonUseFont :: IsFontButton o => Bool -> IO (GValueConstruct o)
- getFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> m Bool
- setFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> Bool -> m ()
- constructFontButtonUseSize :: IsFontButton o => Bool -> IO (GValueConstruct o)
- getFontButtonUseSize :: (MonadIO m, IsFontButton o) => o -> m Bool
- setFontButtonUseSize :: (MonadIO m, IsFontButton o) => o -> Bool -> m ()
- type C_FontButtonFontSetCallback = Ptr () -> Ptr () -> IO ()
- type FontButtonFontSetCallback = IO ()
- afterFontButtonFontSet :: (IsFontButton a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
- genClosure_FontButtonFontSet :: FontButtonFontSetCallback -> IO Closure
- mk_FontButtonFontSetCallback :: C_FontButtonFontSetCallback -> IO (FunPtr C_FontButtonFontSetCallback)
- noFontButtonFontSetCallback :: Maybe FontButtonFontSetCallback
- onFontButtonFontSet :: (IsFontButton a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
- wrap_FontButtonFontSetCallback :: FontButtonFontSetCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype FontButton Source #
Constructors
FontButton (ManagedPtr FontButton) |
Instances
class GObject o => IsFontButton o Source #
Instances
toFontButton :: (MonadIO m, IsFontButton o) => o -> m FontButton Source #
Methods
getFontName
fontButtonGetFontName Source #
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> m Text | Returns: an internal copy of the font name which must not be freed. |
Retrieves the name of the currently selected font. This name includes
style and size information as well. If you want to render something
with the font, use this string with fontDescriptionFromString
.
If you’re interested in peeking certain values (family name,
style, size, weight) just query these properties from the
FontDescription
object.
Since: 2.4
getShowSize
fontButtonGetShowSize Source #
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> m Bool | Returns: whether the font size will be shown in the label. |
Returns whether the font size will be shown in the label.
Since: 2.4
getShowStyle
fontButtonGetShowStyle Source #
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> m 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.
Since: 2.4
getTitle
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> m Text | Returns: an internal copy of the title string which must not be freed. |
Retrieves the title of the font chooser dialog.
Since: 2.4
getUseFont
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> m Bool | Returns: whether the selected font is used in the label. |
Returns whether the selected font is used in the label.
Since: 2.4
getUseSize
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> m Bool | Returns: whether the selected size is used in the label. |
Returns whether the selected size is used in the label.
Since: 2.4
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m FontButton | Returns: a new font picker widget. |
Creates a new font picker widget.
Since: 2.4
newWithFont
fontButtonNewWithFont Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m FontButton | Returns: a new font picker widget. |
Creates a new font picker widget.
Since: 2.4
setFontName
fontButtonSetFontName Source #
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Sets or updates the currently-displayed font in font picker dialog.
Since: 2.4
setShowSize
fontButtonSetShowSize Source #
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If showSize
is True
, the font size will be displayed along with the name of the selected font.
Since: 2.4
setShowStyle
fontButtonSetShowStyle Source #
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If showStyle
is True
, the font style will be displayed along with name of the selected font.
Since: 2.4
setTitle
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the title for the font chooser dialog.
Since: 2.4
setUseFont
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If useFont
is True
, the font name will be written using the selected font.
Since: 2.4
setUseSize
Arguments
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If useSize
is True
, the font name will be written using the selected size.
Since: 2.4
Properties
fontName
clearFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m () Source #
constructFontButtonFontName :: IsFontButton o => Text -> IO (GValueConstruct o) Source #
getFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m Text Source #
setFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> Text -> m () Source #
showSize
constructFontButtonShowSize :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
getFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> m Bool Source #
setFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #
showStyle
constructFontButtonShowStyle :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
getFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> m Bool Source #
setFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #
title
constructFontButtonTitle :: IsFontButton o => Text -> IO (GValueConstruct o) Source #
getFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> m Text Source #
setFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> Text -> m () Source #
useFont
constructFontButtonUseFont :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
getFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> m Bool Source #
setFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #
useSize
constructFontButtonUseSize :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
getFontButtonUseSize :: (MonadIO m, IsFontButton o) => o -> m Bool Source #
setFontButtonUseSize :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #
Signals
fontSet
type FontButtonFontSetCallback = IO () Source #
afterFontButtonFontSet :: (IsFontButton a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId Source #
mk_FontButtonFontSetCallback :: C_FontButtonFontSetCallback -> IO (FunPtr C_FontButtonFontSetCallback) Source #
onFontButtonFontSet :: (IsFontButton a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId Source #
wrap_FontButtonFontSetCallback :: FontButtonFontSetCallback -> Ptr () -> Ptr () -> IO () Source #