wFontDialog

This class represents the font chooser dialog. Only modal dialog is supported.

Superclass:wDialog
Events:wDialogEvent
wDialogEventDescription
wEvent_DialogCreatedWhen the dialog is created but not yet shown.
wEvent_DialogClosedWhen the dialog is being closed.
wEvent_DialogApplyWhen the Apply button is pressed.
wEvent_DialogHelpWhen the Help button is pressed.

Procs

proc getChosenFont(self: wFontDialog): wFont {...}{.inline, raises: [], tags: [].}
Gets the font chosen by the user if the user pressed OK.
proc setInitialFont(self: wFontDialog; font: wFont) {...}{.inline, raises: [], tags: [].}
Sets the font that will be initially used by the font dialog.
proc getColor(self: wFontDialog): wColor {...}{.inline, raises: [], tags: [].}
Gets the color associated with the font dialog.
proc setColor(self: wFontDialog; color: wColor) {...}{.inline, raises: [], tags: [].}
Sets the color that will be used for the font foreground color.
proc getRange(self: wFontDialog): Slice[int] {...}{.inline, raises: [], tags: [].}
Returns the valid range for the font point size.
proc setRange(self: wFontDialog; min: int; max: int) {...}{.inline, raises: [], tags: [].}
Sets the valid range for the font point size, 0..0 means no limit.
proc setRange(self: wFontDialog; range: Slice[int]) {...}{.inline, raises: [], tags: [].}
Sets the valid range for the font point size, 0..0 means no limit.
proc enableSymbols(self: wFontDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables whether symbol fonts can be selected (by default yes).
proc enableEffects(self: wFontDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables effects (by default yes).
proc enableApply(self: wFontDialog; flag = true) {...}{.raises: [], tags: [].}
Display a Apply button, the dialog got wEvent_DialogApply event when the button pressed.
proc enableHelp(self: wFontDialog; flag = true) {...}{.raises: [], tags: [].}
Display a Help button, the dialog got wEvent_DialogHelp event when the button pressed.
proc final(self: wFontDialog) {...}{.raises: [], tags: [].}
Default finalizer for wFontDialog.
proc init(self: wFontDialog; owner: wWindow = nil; font: wFont = nil) {...}{.
    raises: [Exception, wCursorError, IndexError, wFontError], tags: [RootEffect].}
Initializer.
proc FontDialog(owner: wWindow = nil; font: wFont = nil): wFontDialog {...}{.inline,
    discardable, raises: [Exception, wCursorError, IndexError, wFontError],
    tags: [RootEffect].}
Constructor.
proc showModal(self: wFontDialog): wId {...}{.discardable,
                                     raises: [Exception, wFontError],
                                     tags: [RootEffect].}
Shows the dialog, returning wIdOk if the user pressed OK, and wIdCancel otherwise.
proc display(self: wFontDialog): wFont {...}{.inline, discardable,
                                     raises: [Exception, wFontError],
                                     tags: [RootEffect].}
Shows the dialog in modal mode, returning the user-selected font or nil.