xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::forms::font_dialog Class Reference

Prompts the user to choose a font from among those installed on the local computer. More...

#include <font_dialog.h>

Inheritance diagram for xtd::forms::font_dialog:
xtd::forms::common_dialog xtd::forms::component

Public Member Functions

 font_dialog ()=default
 Initializes a new instance of the font_dialog class. More...
 
bool allow_script_change () const
 Gets a value indicating whether the user can change the character set specified in the Script combo box to display a character set other than the one currently displayed. More...
 
font_dialogallow_script_change (bool allow_script_change)
 Sets a value indicating whether the user can change the character set specified in the Script combo box to display a character set other than the one currently displayed. More...
 
bool allow_simulation () const
 Gets a value indicating whether the dialog box allows graphics device interface (GDI) font simulations. More...
 
font_dialogallow_simulation (bool allow_simulation)
 Sets a value indicating whether the dialog box allows graphics device interface (GDI) font simulations. More...
 
bool allow_vector_fonts () const
 Gets a value indicating whether the dialog box allows vector font selections. More...
 
font_dialogallow_vector_fonts (bool allow_vector_fonts)
 Sets a value indicating whether the dialog box allows vector font selections. More...
 
bool allow_vertical_fonts () const
 Gets a value indicating whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts. More...
 
font_dialogallow_vertical_fonts (bool allow_vertical_fonts)
 Sets a value indicating whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts. More...
 
drawing::color color () const
 Gets the selected font color. More...
 
font_dialogcolor (const drawing::color &color)
 Sets the selected font color. More...
 
xtd::forms::dialog_result dialog_result () const
 
bool fixed_pitch_only () const
 Gets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts. More...
 
font_dialogfixed_pitch_only (bool fixed_pitch_only)
 Sets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts. More...
 
drawing::font font () const
 Gets the selected font. More...
 
font_dialogfont (const drawing::font &font)
 Sets the selected font. More...
 
bool font_must_exist () const
 Gets a value indicating whether the dialog box specifies an error condition if the user attempts to select a font or style that does not exist. More...
 
font_dialogfont_must_exist (bool font_must_exist)
 Sets a value indicating whether the dialog box specifies an error condition if the user attempts to select a font or style that does not exist. More...
 
size_t max_size () const
 Gets the maximum point size a user can select. More...
 
font_dialogmax_size (size_t max_size)
 Sets the maximum point size a user can select. More...
 
size_t min_size () const
 Gets the minimum point size a user can select. More...
 
font_dialogmin_size (size_t min_size)
 Sets the minimum point size a user can select. More...
 
size_t options () const
 Gets values to initialize the font_dialog. More...
 
void reset () override
 Resets all dialog box options to their default values. More...
 
bool script_only () const
 Gets a value indicating whether the dialog box allows selection of fonts for all non-OEM and Symbol character sets, as well as the ANSI character set. More...
 
font_dialogscript_only (bool script_only)
 Sets a value indicating whether the dialog box allows selection of fonts for all non-OEM and Symbol character sets, as well as the ANSI character set. More...
 
bool show_apply () const
 Gets a value indicating whether the dialog box contains an Apply button. More...
 
font_dialogshow_apply (bool show_apply)
 Sets a value indicating whether the dialog box contains an Apply button. More...
 
bool show_color () const
 Gets a value indicating whether the dialog box displays the color choice. More...
 
font_dialogshow_color (bool show_color)
 Sets a value indicating whether the dialog box displays the color choice. More...
 
xtd::forms::dialog_result show_dialog ()
 Runs a common dialog box with a default owner. More...
 
xtd::forms::dialog_result show_dialog (const iwin32_window &owner)
 Runs a common dialog box with the specified owner. More...
 
bool show_effect () const
 Gets a value indicating whether the dialog box contains controls that allow the user to specify strikethrough, underline, and text color options. More...
 
font_dialogshow_effect (bool show_effect)
 Sets a value indicating whether the dialog box contains controls that allow the user to specify strikethrough, underline, and text color options. More...
 
bool show_help () const
 Gets a value indicating whether the dialog box displays a Help button. More...
 
font_dialogshow_help (bool show_help)
 Sets a value indicating whether the dialog box displays a Help button. More...
 
void show_sheet (const iwin32_window &owner)
 Runs a common dialog box with the specified owner. More...
 
xtd::forms::dialog_result show_sheet_dialog (const iwin32_window &owner)
 Runs a common dialog box with the specified owner. More...
 
std::any tag () const
 Gets an object that contains data about the control. More...
 
common_dialogtag (const std::any &tag)
 Sets an object that contains data about the control. More...
 

Public Attributes

event< font_dialog, event_handler< component & > > apply
 Occurs when the user clicks the Apply button in the font dialog box. More...
 
event< common_dialog, common_dialog_closed_event_handler< component & > > common_dialog_closed
 
event< common_dialog, help_event_handler< component & > > help_request
 Occurs when the user clicks the Help button on a common dialog box. More...
 

Protected Member Functions

virtual bool can_raise_events () const
 Gets a value indicating whether the component can raise an event. More...
 
bool design_mode () const
 Gets a value that indicates whether the component is currently in design mode. More...
 
virtual void on_apply (const event_args &e)
 Raises the apply event. More...
 
virtual void on_common_dialog_closed (const common_dialog_closed_event_args &e)
 Raises the close event. More...
 
virtual void on_help_request (help_event_args &e)
 Raises the help_request event. More...
 
bool run_dialog (intptr_t owner) override
 
void run_sheet (intptr_t owner) override
 When overridden in a derived class, specifies a common dialog box. More...
 

Detailed Description

Prompts the user to choose a font from among those installed on the local computer.

Remarks
The inherited member show_dialog must be invoked to create this specific common dialog box. hook_proc can be overridden to implement specific dialog box hook functionality.
When you create an instance of font_dialog, some of the read/write properties are set to initial values. For a list of these values, see the font_dialog constructor.

The documentation for this class was generated from the following file: