gi-gtk-4.0.4: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.FontButton

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

plain code

fontbutton
╰── button.font
    ╰── [content]

GtkFontButton has a single CSS node with name fontbutton which contains a button node with the .font style class.

Synopsis

Exported types

newtype FontButton Source #

Memory-managed wrapper type.

Constructors

FontButton (ManagedPtr FontButton) 

Instances

Instances details
Eq FontButton Source # 
Instance details

Defined in GI.Gtk.Objects.FontButton

GObject FontButton Source # 
Instance details

Defined in GI.Gtk.Objects.FontButton

ManagedPtrNewtype FontButton Source # 
Instance details

Defined in GI.Gtk.Objects.FontButton

Methods

toManagedPtr :: FontButton -> ManagedPtr FontButton

TypedObject FontButton Source # 
Instance details

Defined in GI.Gtk.Objects.FontButton

Methods

glibType :: IO GType

HasParentTypes FontButton Source # 
Instance details

Defined in GI.Gtk.Objects.FontButton

IsGValue (Maybe FontButton) Source #

Convert FontButton to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.FontButton

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe FontButton -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe FontButton)

type ParentTypes FontButton Source # 
Instance details

Defined in GI.Gtk.Objects.FontButton

class (GObject o, IsDescendantOf FontButton o) => IsFontButton o Source #

Type class for types which can be safely cast to FontButton, for instance with toFontButton.

Instances

Instances details
(GObject o, IsDescendantOf FontButton o) => IsFontButton o Source # 
Instance details

Defined in GI.Gtk.Objects.FontButton

toFontButton :: (MonadIO m, IsFontButton o) => o -> m FontButton Source #

Cast to FontButton, 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

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, 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, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFont, getFontDesc, getFontFace, getFontFamily, getFontFeatures, getFontMap, getFontOptions, getFontSize, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLanguage, getLastChild, getLayoutManager, getLevel, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getModal, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPreviewText, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getShowPreviewEntry, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTitle, getTooltipMarkup, getTooltipText, getUseFont, getUseSize, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFilterFunc, setFocusChild, setFocusOnClick, setFocusable, setFont, setFontDesc, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLanguage, setLayoutManager, setLevel, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setModal, setName, setOpacity, setOverflow, setParent, setPreviewText, setProperty, setReceivesDefault, setSensitive, setShowPreviewEntry, setSizeRequest, setStateFlags, setTitle, setTooltipMarkup, setTooltipText, setUseFont, setUseSize, setValign, setVexpand, setVexpandSet, setVisible.

getModal

fontButtonGetModal Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> m Bool

Returns: True if the dialog is modal

Gets whether the dialog is modal.

getTitle

fontButtonGetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> m Text

Returns: an internal copy of the title string which must not be freed.

Retrieves the title of the font chooser dialog.

getUseFont

fontButtonGetUseFont Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> m Bool

Returns: whether the selected font is used in the label.

Returns whether the selected font is used in the label.

getUseSize

fontButtonGetUseSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> m Bool

Returns: whether the selected size is used in the label.

Returns whether the selected size is used in the label.

new

fontButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m FontButton

Returns: a new font picker widget.

Creates a new font picker widget.

newWithFont

fontButtonNewWithFont Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

fontname: Name of font to display in font chooser dialog

-> m FontButton

Returns: a new font picker widget.

Creates a new font picker widget.

setModal

fontButtonSetModal Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> Bool

modal: True to make the dialog modal

-> m () 

Sets whether the dialog should be modal.

setTitle

fontButtonSetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> Text

title: a string containing the font chooser dialog title

-> m () 

Sets the title for the font chooser dialog.

setUseFont

fontButtonSetUseFont Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> Bool

useFont: If True, font name will be written using font chosen.

-> m () 

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

setUseSize

fontButtonSetUseSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontButton a) 
=> a

fontButton: a FontButton

-> Bool

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

-> m () 

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

Properties

modal

No description available in the introspection data.

constructFontButtonModal :: (IsFontButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “modal” property. This is rarely needed directly, but it is used by new.

getFontButtonModal :: (MonadIO m, IsFontButton o) => o -> m Bool Source #

Get the value of the “modal” property. When overloading is enabled, this is equivalent to

get fontButton #modal

setFontButtonModal :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #

Set the value of the “modal” property. When overloading is enabled, this is equivalent to

set fontButton [ #modal := value ]

title

The title of the font chooser dialog.

constructFontButtonTitle :: (IsFontButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “title” property. This is rarely needed directly, but it is used by new.

getFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> m Text Source #

Get the value of the “title” property. When overloading is enabled, this is equivalent to

get fontButton #title

setFontButtonTitle :: (MonadIO m, IsFontButton o) => o -> Text -> m () Source #

Set the value of the “title” property. When overloading is enabled, this is equivalent to

set fontButton [ #title := value ]

useFont

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

constructFontButtonUseFont :: (IsFontButton 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.

getFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> m Bool Source #

Get the value of the “use-font” property. When overloading is enabled, this is equivalent to

get fontButton #useFont

setFontButtonUseFont :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #

Set the value of the “use-font” property. When overloading is enabled, this is equivalent to

set fontButton [ #useFont := value ]

useSize

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

constructFontButtonUseSize :: (IsFontButton 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.

getFontButtonUseSize :: (MonadIO m, IsFontButton o) => o -> m Bool Source #

Get the value of the “use-size” property. When overloading is enabled, this is equivalent to

get fontButton #useSize

setFontButtonUseSize :: (MonadIO m, IsFontButton o) => o -> Bool -> m () Source #

Set the value of the “use-size” property. When overloading is enabled, this is equivalent to

set fontButton [ #useSize := value ]

Signals

fontSet

type C_FontButtonFontSetCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type FontButtonFontSetCallback = IO () Source #

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

Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the notify[font](#g:signal:font) signal.

afterFontButtonFontSet :: (IsFontButton a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId Source #

Connect a signal handler for the fontSet signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after fontButton #fontSet callback

genClosure_FontButtonFontSet :: MonadIO m => FontButtonFontSetCallback -> m (GClosure C_FontButtonFontSetCallback) Source #

Wrap the callback into a GClosure.

onFontButtonFontSet :: (IsFontButton a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId Source #

Connect a signal handler for the fontSet signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on fontButton #fontSet callback