xtd - Reference Guide
0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <font_dialog.h>
Prompts the user to choose a font from among those installed on the local computer.
Inherits xtd::forms::common_dialog.
Public Attributes | |
event< font_dialog, event_handler > | apply |
Occurs when the user clicks the Apply button in the font dialog box. More... | |
Public Attributes inherited from xtd::forms::common_dialog | |
event< common_dialog, dialog_closed_event_handler > | dialog_closed |
Occurs when the user close a common dialog box with dialog close button or other dialog buttons. More... | |
event< common_dialog, help_event_handler > | help_request |
Occurs when the user clicks the Help button on a common dialog box. More... | |
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_dialog & | allow_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_dialog & | allow_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_dialog & | allow_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_dialog & | allow_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_dialog & | color (const drawing::color &color) |
Sets the selected font color. More... | |
bool | fixed_pitch_only () const |
Gets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts. More... | |
font_dialog & | fixed_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_dialog & | font (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_dialog & | font_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_dialog & | max_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_dialog & | min_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_dialog & | script_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_dialog & | show_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_dialog & | show_color (bool show_color) |
Sets a value indicating whether the dialog box displays the color choice. 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_dialog & | show_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_dialog & | show_help (bool show_help) |
Sets a value indicating whether the dialog box displays a Help button. More... | |
Public Member Functions inherited from xtd::forms::common_dialog | |
common_dialog ()=default | |
Initializes a new instance of the common_dialog class. More... | |
xtd::forms::dialog_result | dialog_result () const |
Get async dialog_result result after dialog box is closing. 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... | |
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_dialog & | tag (const std::any &tag) |
Sets an object that contains data about the control. More... | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. More... | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. More... | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. More... | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. More... | |
virtual xtd::ustring | to_string () const noexcept |
Returns a std::string that represents the current object. More... | |
Protected Member Functions | |
virtual void | on_apply (const event_args &e) |
Raises the font_dialog::apply 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... | |
Protected Member Functions inherited from xtd::forms::common_dialog | |
virtual void | on_dialog_closed (const dialog_closed_event_args &e) |
Raises the common_dialog::dialog_close event. More... | |
virtual void | on_help_request (help_event_args &e) |
Raises the common_dialog::help_request event. More... | |
Protected Member Functions inherited from xtd::forms::component | |
component ()=default | |
Initialises a new instance of the component class. More... | |
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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. More... | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. More... | |
|
default |
Initializes a new instance of the font_dialog class.
Property | Initial value |
---|---|
allow_simulations | true |
allow_vector_fonts | true |
allow_vertical_fonts | true |
allow_script_change | true |
color | color::black |
fixed_pitch_only | false |
max_size | 0 |
min_size | 0 |
scripts_only | false |
show_apply | false |
show_color | false |
show_effects | true |
show_help | false |
|
inline |
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.
|
inline |
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.
allow_script_change | true if the user can change the character set specified in the Script combo box; otherwise, false. The default value is true. |
|
inline |
Gets a value indicating whether the dialog box allows graphics device interface (GDI) font simulations.
|
inline |
Sets a value indicating whether the dialog box allows graphics device interface (GDI) font simulations.
allow_simulation | true if font simulations are allowed; otherwise, false. The default value is true. |
|
inline |
Gets a value indicating whether the dialog box allows vector font selections.
|
inline |
Sets a value indicating whether the dialog box allows vector font selections.
allow_vector_fonts | true if vector fonts are allowed; otherwise, false. The default value is true. |
|
inline |
Gets a value indicating whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts.
|
inline |
Sets a value indicating whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts.
allow_vertical_fonts | true if both vertical and horizontal fonts are allowed; otherwise, false. The default value is true. |
|
inline |
Gets the selected font color.
|
inline |
Sets the selected font color.
color | The color of the selected font. The default value is Black. |
|
inline |
Gets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts.
|
inline |
Sets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts.
fixed_pitch_only | true if only fixed-pitch fonts can be selected; otherwise, false. The default value is false. |
|
inline |
Gets the selected font.
|
inline |
|
inline |
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.
|
inline |
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.
font_must_exist | true if the dialog box specifies an error condition when the user tries to select a font or style that does not exist; otherwise, false. The default is false. |
|
inline |
Gets the maximum point size a user can select.
|
inline |
Sets the maximum point size a user can select.
max_size | The maximum point size a user can select. The default is 0. |
|
inline |
Gets the minimum point size a user can select.
|
inline |
Sets the minimum point size a user can select.
min_size | The minimum point size a user can select. The default is 0. |
|
protectedvirtual |
Raises the font_dialog::apply event.
e | An event_args that contains the data. |
|
inline |
Gets values to initialize the font_dialog.
|
overridevirtual |
Resets all dialog box options to their default values.
Implements xtd::forms::common_dialog.
|
overrideprotectedvirtual |
owner | The window handle of the owner window for the common dialog box. |
Implements xtd::forms::common_dialog.
|
overrideprotectedvirtual |
When overridden in a derived class, specifies a common dialog box.
owner | A value that represents the window handle of the owner window for the common dialog box. |
Implements xtd::forms::common_dialog.
|
inline |
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.
|
inline |
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.
script_script | = true if selection of fonts for all non-OEM and Symbol character sets, as well as the ANSI character set, is allowed; otherwise, false. The default value is false. |
|
inline |
Gets a value indicating whether the dialog box contains an Apply button.
|
inline |
Sets a value indicating whether the dialog box contains an Apply button.
show_apply | true if the dialog box contains an Apply button; otherwise, false. The default value is false. |
|
inline |
Gets a value indicating whether the dialog box displays the color choice.
|
inline |
Sets a value indicating whether the dialog box displays the color choice.
show_color | true if the dialog box displays the color choice; otherwise, false. The default value is false. |
|
inline |
Gets a value indicating whether the dialog box contains controls that allow the user to specify strikethrough, underline, and text color options.
|
inline |
Sets a value indicating whether the dialog box contains controls that allow the user to specify strikethrough, underline, and text color options.
show_effect | true if the dialog box contains controls to set strikethrough, underline, and text color options; otherwise, false. The default value is true. |
|
inline |
Gets a value indicating whether the dialog box displays a Help button.
|
inline |
Sets a value indicating whether the dialog box displays a Help button.
show_help | true if the dialog box displays a Help button; otherwise, false. The default value is false. |