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 {
37 struct data;
38
39 public:
41
63
65
70 bool allow_script_change() const noexcept;
75 font_dialog& allow_script_change(bool allow_script_change);
76
79 bool allow_simulation() const noexcept;
83 font_dialog& allow_simulation(bool allow_simulation);
84
87 bool allow_vector_fonts() const noexcept;
91 font_dialog& allow_vector_fonts(bool allow_vector_fonts);
92
95 bool allow_vertical_fonts() const noexcept;
99 font_dialog& allow_vertical_fonts(bool allow_vertical_fonts);
100
103 drawing::color color() const noexcept;
107 font_dialog& color(const drawing::color& color);
108
111 bool fixed_pitch_only() const noexcept;
115 font_dialog& fixed_pitch_only(bool fixed_pitch_only);
116
119 drawing::font font() const noexcept;
123 font_dialog& font(const drawing::font& font);
124
127 bool font_must_exist() const noexcept;
131 font_dialog& font_must_exist(bool font_must_exist);
132
135 size_t max_size() const noexcept;
139 font_dialog& max_size(size_t max_size);
140
143 size_t min_size() const noexcept;
147 font_dialog& min_size(size_t min_size);
148
152 size_t options() const noexcept;
153
156 bool script_only() const noexcept;
160 font_dialog& script_only(bool script_only);
161
164 bool show_apply() const noexcept;
168 font_dialog& show_apply(bool show_apply);
169
172 bool show_color() const noexcept;
176 font_dialog& show_color(bool show_color);
177
180 bool show_effect() const noexcept;
184 font_dialog& show_effect(bool show_effect);
185
188 bool show_help() const noexcept;
192 font_dialog& show_help(bool show_help);
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.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:34
Prompts the user to choose a font from among those installed on the local computer.
Definition font_dialog.h:36
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 intptr.h:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
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