xtd 0.2.0
font_dialog.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "common_dialog.hpp"
6#include <xtd/drawing/color>
7#include <xtd/drawing/font>
8#include <xtd/drawing/system_colors>
9#include <xtd/drawing/system_fonts>
10#include <xtd/forms/choose_font_flags>
11
13namespace xtd {
15 namespace forms {
37 struct data;
38
39 public:
41
63
65
70 bool allow_script_change() const noexcept;
76
79 bool allow_simulation() const noexcept;
84
87 bool allow_vector_fonts() const noexcept;
92
95 bool allow_vertical_fonts() const noexcept;
100
103 drawing::color color() const noexcept;
108
111 bool fixed_pitch_only() const noexcept;
116
119 drawing::font font() const noexcept;
124
127 bool font_must_exist() const noexcept;
132
135 size_t max_size() const noexcept;
140
143 size_t min_size() const noexcept;
148
152 size_t options() const noexcept;
153
156 bool script_only() const noexcept;
161
164 bool show_apply() const noexcept;
169
172 bool show_color() const noexcept;
177
180 bool show_effect() const noexcept;
185
188 bool show_help() const noexcept;
194
196
200 void reset() noexcept override;
202
204
211
212 protected:
214
221 virtual void on_apply(const event_args& e);
222
227 bool run_dialog(intptr owner) override;
228
231 void run_sheet(intptr owner) override;
233
234 private:
235 bool get_option(size_t flag) const noexcept;
236 void set_option(size_t flag, bool value);
237
238 xtd::sptr<data> data_;
239 };
240 }
241}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Represents an event.
Definition event.hpp:21
common_dialog()
Initializes a new instance of the common_dialog class.
event< font_dialog, event_handler > apply
Occurs when the user clicks the Apply button in the font dialog box.
Definition font_dialog.hpp:209
void run_sheet(intptr owner) override
When overridden in a derived class, specifies a common dialog box.
bool show_effect() const noexcept
Gets a value indicating whether the dialog box contains controls that allow the user to specify strik...
virtual void on_apply(const event_args &e)
Raises the font_dialog::apply event.
size_t options() const noexcept
Gets values to initialize the font_dialog.
drawing::color color() const noexcept
Gets the selected font color.
size_t max_size() const noexcept
Gets the maximum point size a user can select.
size_t min_size() const noexcept
Gets the minimum point size a user can select.
bool show_apply() const noexcept
Gets a value indicating whether the dialog box contains an Apply button.
bool fixed_pitch_only() const noexcept
Gets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts.
bool script_only() const noexcept
Gets a value indicating whether the dialog box allows selection of fonts for all non-OEM and Symbol c...
bool show_help() const noexcept
Gets a value indicating whether the dialog box displays a Help button.
bool allow_simulation() const noexcept
Gets a value indicating whether the dialog box allows graphics device interface (GDI) font simulation...
bool allow_script_change() const noexcept
Gets a value indicating whether the user can change the character set specified in the Script combo b...
bool allow_vector_fonts() const noexcept
Gets a value indicating whether the dialog box allows vector font selections.
bool show_color() const noexcept
Gets a value indicating whether the dialog box displays the color choice.
drawing::font font() const noexcept
Gets the selected font.
font_dialog()
Initializes a new instance of the font_dialog class.
bool run_dialog(intptr owner) override
void reset() noexcept override
Resets all dialog box options to their default values.
bool font_must_exist() const noexcept
Gets a value indicating whether the dialog box specifies an error condition if the user attempts to s...
bool allow_vertical_fonts() const noexcept
Gets a value indicating whether the dialog box displays both vertical and horizontal fonts or only ho...
Contains xtd::forms::common_dialog class.
generic_event_handler< const xtd::event_args & > event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:24
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
@ e
The E key.
Definition keys.hpp:207
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201