Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The GtkFontDialogButton
is wrapped around a FontDialog
and 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
fontbutton ╰── button.font ╰── [content]
GtkFontDialogButton
has a single CSS node with name fontbutton which
contains a button node with the .font style class.
Since: 4.10
Synopsis
- newtype FontDialogButton = FontDialogButton (ManagedPtr FontDialogButton)
- class (GObject o, IsDescendantOf FontDialogButton o) => IsFontDialogButton o
- toFontDialogButton :: (MonadIO m, IsFontDialogButton o) => o -> m FontDialogButton
- fontDialogButtonGetDialog :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> m (Maybe FontDialog)
- fontDialogButtonGetFontDesc :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> m (Maybe FontDescription)
- fontDialogButtonGetFontFeatures :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> m (Maybe Text)
- fontDialogButtonGetLanguage :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> m (Maybe Language)
- fontDialogButtonGetLevel :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> m FontLevel
- fontDialogButtonGetUseFont :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> m Bool
- fontDialogButtonGetUseSize :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> m Bool
- fontDialogButtonNew :: (HasCallStack, MonadIO m, IsFontDialog a) => Maybe a -> m FontDialogButton
- fontDialogButtonSetDialog :: (HasCallStack, MonadIO m, IsFontDialogButton a, IsFontDialog b) => a -> b -> m ()
- fontDialogButtonSetFontDesc :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> FontDescription -> m ()
- fontDialogButtonSetFontFeatures :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> Maybe Text -> m ()
- fontDialogButtonSetLanguage :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> Maybe Language -> m ()
- fontDialogButtonSetLevel :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> FontLevel -> m ()
- fontDialogButtonSetUseFont :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> Bool -> m ()
- fontDialogButtonSetUseSize :: (HasCallStack, MonadIO m, IsFontDialogButton a) => a -> Bool -> m ()
- constructFontDialogButtonDialog :: (IsFontDialogButton o, MonadIO m, IsFontDialog a) => a -> m (GValueConstruct o)
- getFontDialogButtonDialog :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe FontDialog)
- setFontDialogButtonDialog :: (MonadIO m, IsFontDialogButton o, IsFontDialog a) => o -> a -> m ()
- constructFontDialogButtonFontDesc :: (IsFontDialogButton o, MonadIO m) => FontDescription -> m (GValueConstruct o)
- getFontDialogButtonFontDesc :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe FontDescription)
- setFontDialogButtonFontDesc :: (MonadIO m, IsFontDialogButton o) => o -> FontDescription -> m ()
- clearFontDialogButtonFontFeatures :: (MonadIO m, IsFontDialogButton o) => o -> m ()
- constructFontDialogButtonFontFeatures :: (IsFontDialogButton o, MonadIO m) => Text -> m (GValueConstruct o)
- getFontDialogButtonFontFeatures :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe Text)
- setFontDialogButtonFontFeatures :: (MonadIO m, IsFontDialogButton o) => o -> Text -> m ()
- clearFontDialogButtonLanguage :: (MonadIO m, IsFontDialogButton o) => o -> m ()
- constructFontDialogButtonLanguage :: (IsFontDialogButton o, MonadIO m) => Language -> m (GValueConstruct o)
- getFontDialogButtonLanguage :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe Language)
- setFontDialogButtonLanguage :: (MonadIO m, IsFontDialogButton o) => o -> Language -> m ()
- constructFontDialogButtonLevel :: (IsFontDialogButton o, MonadIO m) => FontLevel -> m (GValueConstruct o)
- getFontDialogButtonLevel :: (MonadIO m, IsFontDialogButton o) => o -> m FontLevel
- setFontDialogButtonLevel :: (MonadIO m, IsFontDialogButton o) => o -> FontLevel -> m ()
- constructFontDialogButtonUseFont :: (IsFontDialogButton o, MonadIO m) => Bool -> m (GValueConstruct o)
- getFontDialogButtonUseFont :: (MonadIO m, IsFontDialogButton o) => o -> m Bool
- setFontDialogButtonUseFont :: (MonadIO m, IsFontDialogButton o) => o -> Bool -> m ()
- constructFontDialogButtonUseSize :: (IsFontDialogButton o, MonadIO m) => Bool -> m (GValueConstruct o)
- getFontDialogButtonUseSize :: (MonadIO m, IsFontDialogButton o) => o -> m Bool
- setFontDialogButtonUseSize :: (MonadIO m, IsFontDialogButton o) => o -> Bool -> m ()
Exported types
newtype FontDialogButton Source #
Memory-managed wrapper type.
FontDialogButton (ManagedPtr FontDialogButton) |
Instances
Eq FontDialogButton Source # | |
Defined in GI.Gtk.Objects.FontDialogButton (==) :: FontDialogButton -> FontDialogButton -> Bool # (/=) :: FontDialogButton -> FontDialogButton -> Bool # | |
GObject FontDialogButton Source # | |
Defined in GI.Gtk.Objects.FontDialogButton | |
ManagedPtrNewtype FontDialogButton Source # | |
Defined in GI.Gtk.Objects.FontDialogButton toManagedPtr :: FontDialogButton -> ManagedPtr FontDialogButton | |
TypedObject FontDialogButton Source # | |
Defined in GI.Gtk.Objects.FontDialogButton | |
HasParentTypes FontDialogButton Source # | |
Defined in GI.Gtk.Objects.FontDialogButton | |
IsGValue (Maybe FontDialogButton) Source # | Convert |
Defined in GI.Gtk.Objects.FontDialogButton gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe FontDialogButton -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe FontDialogButton) | |
type ParentTypes FontDialogButton Source # | |
Defined in GI.Gtk.Objects.FontDialogButton |
class (GObject o, IsDescendantOf FontDialogButton o) => IsFontDialogButton o Source #
Type class for types which can be safely cast to FontDialogButton
, for instance with toFontDialogButton
.
Instances
(GObject o, IsDescendantOf FontDialogButton o) => IsFontDialogButton o Source # | |
Defined in GI.Gtk.Objects.FontDialogButton |
toFontDialogButton :: (MonadIO m, IsFontDialogButton o) => o -> m FontDialogButton Source #
Cast to FontDialogButton
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDialog, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontDesc, getFontFeatures, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLanguage, getLastChild, getLayoutManager, getLevel, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getUseFont, getUseSize, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDialog, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontDesc, setFontFeatures, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLanguage, setLayoutManager, setLevel, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setUseFont, setUseSize, setValign, setVexpand, setVexpandSet, setVisible.
getDialog
fontDialogButtonGetDialog Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> m (Maybe FontDialog) | Returns: the |
Returns the GtkFontDialog
of self
.
Since: 4.10
getFontDesc
fontDialogButtonGetFontDesc Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> m (Maybe FontDescription) | Returns: the font |
Returns the font of the button.
This function is what should be used to obtain the font that was chosen by the user. To get informed about changes, listen to "notifyfontDesc".
Since: 4.10
getFontFeatures
fontDialogButtonGetFontFeatures Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> m (Maybe Text) | Returns: the font features |
Returns the font features of the button.
This function is what should be used to obtain the font features that were chosen by the user. To get informed about changes, listen to "notifyfontFeatures".
Note that the button will only let users choose font features
if FontDialogButton:level is set to
GTK_FONT_LEVEL_FEATURES
.
Since: 4.10
getLanguage
fontDialogButtonGetLanguage Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> m (Maybe Language) | Returns: the language |
Returns the language that is used for font features.
Since: 4.10
getLevel
fontDialogButtonGetLevel Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> m FontLevel | Returns: the level of detail |
Returns the level of detail at which this dialog lets the user select fonts.
Since: 4.10
getUseFont
fontDialogButtonGetUseFont Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton 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: 4.10
getUseSize
fontDialogButtonGetUseSize Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> m Bool | Returns: whether the selected font size is used in the label |
Returns whether the selected font size is used in the label.
Since: 4.10
new
:: (HasCallStack, MonadIO m, IsFontDialog a) | |
=> Maybe a |
|
-> m FontDialogButton | Returns: the new |
Creates a new GtkFontDialogButton
with the
given GtkFontDialog
.
You can pass NULL
to this function and set a GtkFontDialog
later. The button will be insensitive until that happens.
Since: 4.10
setDialog
fontDialogButtonSetDialog Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a, IsFontDialog b) | |
=> a |
|
-> b |
|
-> m () |
Sets a GtkFontDialog
object to use for
creating the font chooser dialog that is
presented when the user clicks the button.
Since: 4.10
setFontDesc
fontDialogButtonSetFontDesc Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> FontDescription |
|
-> m () |
Sets the font of the button.
Since: 4.10
setFontFeatures
fontDialogButtonSetFontFeatures Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the font features of the button.
Since: 4.10
setLanguage
fontDialogButtonSetLanguage Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> Maybe Language |
|
-> m () |
Sets the language to use for font features.
Since: 4.10
setLevel
fontDialogButtonSetLevel Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> FontLevel |
|
-> m () |
Sets the level of detail at which this dialog lets the user select fonts.
Since: 4.10
setUseFont
fontDialogButtonSetUseFont Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If useFont
is TRUE
, the font name will be written
using the selected font.
Since: 4.10
setUseSize
fontDialogButtonSetUseSize Source #
:: (HasCallStack, MonadIO m, IsFontDialogButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If useSize
is TRUE
, the font name will be written
using the selected font size.
Since: 4.10
Properties
dialog
The GtkFontDialog
that contains parameters for
the font chooser dialog.
Since: 4.10
constructFontDialogButtonDialog :: (IsFontDialogButton o, MonadIO m, IsFontDialog a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “dialog
” property. This is rarely needed directly, but it is used by new
.
getFontDialogButtonDialog :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe FontDialog) Source #
Get the value of the “dialog
” property.
When overloading is enabled, this is equivalent to
get
fontDialogButton #dialog
setFontDialogButtonDialog :: (MonadIO m, IsFontDialogButton o, IsFontDialog a) => o -> a -> m () Source #
Set the value of the “dialog
” property.
When overloading is enabled, this is equivalent to
set
fontDialogButton [ #dialog:=
value ]
fontDesc
The selected font.
This property can be set to give the button its initial font, and it will be updated to reflect the users choice in the font chooser dialog.
Listen to notify::font-desc
to get informed about changes
to the buttons font.
Since: 4.10
constructFontDialogButtonFontDesc :: (IsFontDialogButton o, MonadIO m) => FontDescription -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “font-desc
” property. This is rarely needed directly, but it is used by new
.
getFontDialogButtonFontDesc :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe FontDescription) Source #
Get the value of the “font-desc
” property.
When overloading is enabled, this is equivalent to
get
fontDialogButton #fontDesc
setFontDialogButtonFontDesc :: (MonadIO m, IsFontDialogButton o) => o -> FontDescription -> m () Source #
Set the value of the “font-desc
” property.
When overloading is enabled, this is equivalent to
set
fontDialogButton [ #fontDesc:=
value ]
fontFeatures
The selected font features.
This property will be updated to reflect the users choice in the font chooser dialog.
Listen to notify::font-features
to get informed about changes
to the buttons font features.
Since: 4.10
clearFontDialogButtonFontFeatures :: (MonadIO m, IsFontDialogButton o) => o -> m () Source #
Set the value of the “font-features
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#fontFeatures
constructFontDialogButtonFontFeatures :: (IsFontDialogButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “font-features
” property. This is rarely needed directly, but it is used by new
.
getFontDialogButtonFontFeatures :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe Text) Source #
Get the value of the “font-features
” property.
When overloading is enabled, this is equivalent to
get
fontDialogButton #fontFeatures
setFontDialogButtonFontFeatures :: (MonadIO m, IsFontDialogButton o) => o -> Text -> m () Source #
Set the value of the “font-features
” property.
When overloading is enabled, this is equivalent to
set
fontDialogButton [ #fontFeatures:=
value ]
language
The selected language for font features.
This property will be updated to reflect the users choice in the font chooser dialog.
Listen to notify::language
to get informed about changes
to the buttons language.
Since: 4.10
clearFontDialogButtonLanguage :: (MonadIO m, IsFontDialogButton o) => o -> m () Source #
Set the value of the “language
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#language
constructFontDialogButtonLanguage :: (IsFontDialogButton o, MonadIO m) => Language -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “language
” property. This is rarely needed directly, but it is used by new
.
getFontDialogButtonLanguage :: (MonadIO m, IsFontDialogButton o) => o -> m (Maybe Language) Source #
Get the value of the “language
” property.
When overloading is enabled, this is equivalent to
get
fontDialogButton #language
setFontDialogButtonLanguage :: (MonadIO m, IsFontDialogButton o) => o -> Language -> m () Source #
Set the value of the “language
” property.
When overloading is enabled, this is equivalent to
set
fontDialogButton [ #language:=
value ]
level
The level of detail for the font chooser dialog.
constructFontDialogButtonLevel :: (IsFontDialogButton o, MonadIO m) => FontLevel -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “level
” property. This is rarely needed directly, but it is used by new
.
getFontDialogButtonLevel :: (MonadIO m, IsFontDialogButton o) => o -> m FontLevel Source #
Get the value of the “level
” property.
When overloading is enabled, this is equivalent to
get
fontDialogButton #level
setFontDialogButtonLevel :: (MonadIO m, IsFontDialogButton o) => o -> FontLevel -> m () Source #
Set the value of the “level
” property.
When overloading is enabled, this is equivalent to
set
fontDialogButton [ #level:=
value ]
useFont
Whether the buttons label will be drawn in the selected font.
constructFontDialogButtonUseFont :: (IsFontDialogButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “use-font
” property. This is rarely needed directly, but it is used by new
.
getFontDialogButtonUseFont :: (MonadIO m, IsFontDialogButton o) => o -> m Bool Source #
Get the value of the “use-font
” property.
When overloading is enabled, this is equivalent to
get
fontDialogButton #useFont
setFontDialogButtonUseFont :: (MonadIO m, IsFontDialogButton o) => o -> Bool -> m () Source #
Set the value of the “use-font
” property.
When overloading is enabled, this is equivalent to
set
fontDialogButton [ #useFont:=
value ]
useSize
Whether the buttons label will use the selected font size.
constructFontDialogButtonUseSize :: (IsFontDialogButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “use-size
” property. This is rarely needed directly, but it is used by new
.
getFontDialogButtonUseSize :: (MonadIO m, IsFontDialogButton o) => o -> m Bool Source #
Get the value of the “use-size
” property.
When overloading is enabled, this is equivalent to
get
fontDialogButton #useSize
setFontDialogButtonUseSize :: (MonadIO m, IsFontDialogButton o) => o -> Bool -> m () Source #
Set the value of the “use-size
” property.
When overloading is enabled, this is equivalent to
set
fontDialogButton [ #useSize:=
value ]