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 |
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 :: IsFontButton o => o -> IO FontButton
- noFontButton :: Maybe FontButton
- data FontButtonGetFontNameMethodInfo
- fontButtonGetFontName :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Text
- data FontButtonGetShowSizeMethodInfo
- fontButtonGetShowSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- data FontButtonGetShowStyleMethodInfo
- fontButtonGetShowStyle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- data FontButtonGetTitleMethodInfo
- fontButtonGetTitle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Text
- data FontButtonGetUseFontMethodInfo
- fontButtonGetUseFont :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- data FontButtonGetUseSizeMethodInfo
- fontButtonGetUseSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> m Bool
- fontButtonNew :: (HasCallStack, MonadIO m) => m FontButton
- fontButtonNewWithFont :: (HasCallStack, MonadIO m) => Text -> m FontButton
- data FontButtonSetFontNameMethodInfo
- fontButtonSetFontName :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Text -> m Bool
- data FontButtonSetShowSizeMethodInfo
- fontButtonSetShowSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- data FontButtonSetShowStyleMethodInfo
- fontButtonSetShowStyle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- data FontButtonSetTitleMethodInfo
- fontButtonSetTitle :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Text -> m ()
- data FontButtonSetUseFontMethodInfo
- fontButtonSetUseFont :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- data FontButtonSetUseSizeMethodInfo
- fontButtonSetUseSize :: (HasCallStack, MonadIO m, IsFontButton a) => a -> Bool -> m ()
- data FontButtonFontNamePropertyInfo
- clearFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m ()
- constructFontButtonFontName :: IsFontButton o => Text -> IO (GValueConstruct o)
- fontButtonFontName :: AttrLabelProxy "fontName"
- getFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m Text
- setFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> Text -> m ()
- data FontButtonShowSizePropertyInfo
- constructFontButtonShowSize :: IsFontButton o => Bool -> IO (GValueConstruct o)
- fontButtonShowSize :: AttrLabelProxy "showSize"
- getFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> m Bool
- setFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> Bool -> m ()
- data FontButtonShowStylePropertyInfo
- constructFontButtonShowStyle :: IsFontButton o => Bool -> IO (GValueConstruct o)
- fontButtonShowStyle :: AttrLabelProxy "showStyle"
- getFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> m Bool
- setFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> Bool -> m ()
- data FontButtonTitlePropertyInfo
- constructFontButtonTitle :: IsFontButton o => Text -> IO (GValueConstruct o)
- fontButtonTitle :: AttrLabelProxy "title"
- getFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> m Text
- setFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> Text -> m ()
- data FontButtonUseFontPropertyInfo
- constructFontButtonUseFont :: IsFontButton o => Bool -> IO (GValueConstruct o)
- fontButtonUseFont :: AttrLabelProxy "useFont"
- getFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> m Bool
- setFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> Bool -> m ()
- data FontButtonUseSizePropertyInfo
- constructFontButtonUseSize :: IsFontButton o => Bool -> IO (GValueConstruct o)
- fontButtonUseSize :: AttrLabelProxy "useSize"
- 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 ()
- data FontButtonFontSetSignalInfo
- afterFontButtonFontSet :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
- genClosure_FontButtonFontSet :: FontButtonFontSetCallback -> IO Closure
- mk_FontButtonFontSetCallback :: C_FontButtonFontSetCallback -> IO (FunPtr C_FontButtonFontSetCallback)
- noFontButtonFontSetCallback :: Maybe FontButtonFontSetCallback
- onFontButtonFontSet :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
- wrap_FontButtonFontSetCallback :: FontButtonFontSetCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype FontButton Source #
GObject FontButton Source # | |
IsImplementorIface FontButton Source # | |
IsObject FontButton Source # | |
IsWidget FontButton Source # | |
IsContainer FontButton Source # | |
IsButton FontButton Source # | |
IsBin FontButton Source # | |
IsFontChooser FontButton Source # | |
IsBuildable FontButton Source # | |
IsActivatable FontButton Source # | |
IsActionable FontButton Source # | |
IsFontButton FontButton Source # | |
((~) * info (ResolveFontButtonMethod t FontButton), MethodInfo * info FontButton p) => IsLabel t (FontButton -> p) Source # | |
((~) * info (ResolveFontButtonMethod t FontButton), MethodInfo * info FontButton p) => IsLabelProxy t (FontButton -> p) Source # | |
HasAttributeList * FontButton Source # | |
type AttributeList FontButton Source # | |
type SignalList FontButton Source # | |
class GObject o => IsFontButton o Source #
toFontButton :: IsFontButton o => o -> IO FontButton Source #
Methods
getFontName
data FontButtonGetFontNameMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsFontButton a) => MethodInfo * FontButtonGetFontNameMethodInfo a signature Source # | |
fontButtonGetFontName Source #
:: (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
data FontButtonGetShowSizeMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsFontButton a) => MethodInfo * FontButtonGetShowSizeMethodInfo a signature Source # | |
fontButtonGetShowSize Source #
:: (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
data FontButtonGetShowStyleMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsFontButton a) => MethodInfo * FontButtonGetShowStyleMethodInfo a signature Source # | |
fontButtonGetShowStyle Source #
:: (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
data FontButtonGetTitleMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsFontButton a) => MethodInfo * FontButtonGetTitleMethodInfo a signature Source # | |
:: (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
data FontButtonGetUseFontMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsFontButton a) => MethodInfo * FontButtonGetUseFontMethodInfo a signature Source # | |
:: (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
data FontButtonGetUseSizeMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsFontButton a) => MethodInfo * FontButtonGetUseSizeMethodInfo a signature Source # | |
:: (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
:: (HasCallStack, MonadIO m) | |
=> m FontButton | Returns: a new font picker widget. |
Creates a new font picker widget.
Since: 2.4
newWithFont
fontButtonNewWithFont Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m FontButton | Returns: a new font picker widget. |
Creates a new font picker widget.
Since: 2.4
setFontName
data FontButtonSetFontNameMethodInfo Source #
((~) * signature (Text -> m Bool), MonadIO m, IsFontButton a) => MethodInfo * FontButtonSetFontNameMethodInfo a signature Source # | |
fontButtonSetFontName Source #
:: (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
data FontButtonSetShowSizeMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsFontButton a) => MethodInfo * FontButtonSetShowSizeMethodInfo a signature Source # | |
fontButtonSetShowSize Source #
:: (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
data FontButtonSetShowStyleMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsFontButton a) => MethodInfo * FontButtonSetShowStyleMethodInfo a signature Source # | |
fontButtonSetShowStyle Source #
:: (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
data FontButtonSetTitleMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsFontButton a) => MethodInfo * FontButtonSetTitleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsFontButton a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the title for the font chooser dialog.
Since: 2.4
setUseFont
data FontButtonSetUseFontMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsFontButton a) => MethodInfo * FontButtonSetUseFontMethodInfo a signature Source # | |
:: (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
data FontButtonSetUseSizeMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsFontButton a) => MethodInfo * FontButtonSetUseSizeMethodInfo a signature Source # | |
:: (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
data FontButtonFontNamePropertyInfo Source #
clearFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m () Source #
constructFontButtonFontName :: IsFontButton o => Text -> IO (GValueConstruct o) Source #
fontButtonFontName :: AttrLabelProxy "fontName" Source #
getFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> m Text Source #
setFontButtonFontName :: (MonadIO m, IsFontButton o) => o -> Text -> m () Source #
showSize
data FontButtonShowSizePropertyInfo Source #
constructFontButtonShowSize :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
fontButtonShowSize :: AttrLabelProxy "showSize" Source #
getFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> m Bool Source #
setFontButtonShowSize :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #
showStyle
data FontButtonShowStylePropertyInfo Source #
constructFontButtonShowStyle :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
fontButtonShowStyle :: AttrLabelProxy "showStyle" Source #
getFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> m Bool Source #
setFontButtonShowStyle :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #
title
data FontButtonTitlePropertyInfo Source #
constructFontButtonTitle :: IsFontButton o => Text -> IO (GValueConstruct o) Source #
fontButtonTitle :: AttrLabelProxy "title" Source #
getFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> m Text Source #
setFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> Text -> m () Source #
useFont
data FontButtonUseFontPropertyInfo Source #
constructFontButtonUseFont :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
fontButtonUseFont :: AttrLabelProxy "useFont" Source #
getFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> m Bool Source #
setFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #
useSize
data FontButtonUseSizePropertyInfo Source #
constructFontButtonUseSize :: IsFontButton o => Bool -> IO (GValueConstruct o) Source #
fontButtonUseSize :: AttrLabelProxy "useSize" 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 :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId Source #
mk_FontButtonFontSetCallback :: C_FontButtonFontSetCallback -> IO (FunPtr C_FontButtonFontSetCallback) Source #
onFontButtonFontSet :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId Source #
wrap_FontButtonFontSetCallback :: FontButtonFontSetCallback -> Ptr () -> Ptr () -> IO () Source #