xtd 0.2.0
Loading...
Searching...
No Matches
font_dialog.h
Go to the documentation of this file.
1
4#pragma once
5#include "common_dialog.h"
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 {
35 struct data;
36
37 public:
39
61
63
68 bool allow_script_change() const noexcept;
73 font_dialog& allow_script_change(bool allow_script_change);
74
77 bool allow_simulation() const noexcept;
81 font_dialog& allow_simulation(bool allow_simulation);
82
85 bool allow_vector_fonts() const noexcept;
89 font_dialog& allow_vector_fonts(bool allow_vector_fonts);
90
93 bool allow_vertical_fonts() const noexcept;
97 font_dialog& allow_vertical_fonts(bool allow_vertical_fonts);
98
101 drawing::color color() const noexcept;
105 font_dialog& color(const drawing::color& color);
106
109 bool fixed_pitch_only() const noexcept;
113 font_dialog& fixed_pitch_only(bool fixed_pitch_only);
114
117 drawing::font font() const noexcept;
121 font_dialog& font(const drawing::font& font);
122
125 bool font_must_exist() const noexcept;
129 font_dialog& font_must_exist(bool font_must_exist);
130
133 size_t max_size() const noexcept;
137 font_dialog& max_size(size_t max_size);
138
141 size_t min_size() const noexcept;
145 font_dialog& min_size(size_t min_size);
146
150 size_t options() const noexcept;
151
154 bool script_only() const noexcept;
158 font_dialog& script_only(bool script_only);
159
162 bool show_apply() const noexcept;
166 font_dialog& show_apply(bool show_apply);
167
170 bool show_color() const noexcept;
174 font_dialog& show_color(bool show_color);
175
178 bool show_effect() const noexcept;
182 font_dialog& show_effect(bool show_effect);
183
186 bool show_help() const noexcept;
190 font_dialog& show_help(bool show_help);
192
194
198 void reset() noexcept override;
200
202
209
210 protected:
212
219 virtual void on_apply(const event_args& e);
220
225 bool run_dialog(intptr owner) override;
226
229 void run_sheet(intptr owner) override;
231
232 private:
233 bool get_option(size_t flag) const noexcept;
234 void set_option(size_t flag, bool value);
235
236 std::shared_ptr<data> data_;
237 };
238 }
239}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Represents an event.
Definition event.h:21
Specifies the base class used for displaying dialog boxes on the screen.
Definition common_dialog.h:32
Prompts the user to choose a font from among those installed on the local computer.
Definition font_dialog.h:34
bool allow_script_change() const noexcept
Gets a value indicating whether the user can change the character set specified in the Script combo b...
font_dialog()
Initializes a new instance of the font_dialog class.
Contains xtd::forms::common_dialog class.
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.h:32
#define forms_export_
Define shared library export.
Definition forms_export.h:13
intmax_t intptr
Represent a pointer or a handle.
Definition types.h:153
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10