xtd 1.0.0
Loading...
Searching...
No Matches
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 [[nodiscard]] auto allow_script_change() const noexcept -> bool;
75 auto allow_script_change(bool value) -> font_dialog&;
76
79 [[nodiscard]] auto allow_simulation() const noexcept -> bool;
83 auto allow_simulation(bool value) -> font_dialog&;
84
87 [[nodiscard]] auto allow_vector_fonts() const noexcept -> bool;
91 auto allow_vector_fonts(bool value) -> font_dialog&;
92
95 [[nodiscard]] auto allow_vertical_fonts() const noexcept -> bool;
99 auto allow_vertical_fonts(bool value) -> font_dialog&;
100
103 [[nodiscard]] auto color() const noexcept -> xtd::drawing::color;
107 auto color(const xtd::drawing::color& value) -> font_dialog&;
108
111 [[nodiscard]] auto fixed_pitch_only() const noexcept -> bool;
115 auto fixed_pitch_only(bool value) -> font_dialog&;
116
119 [[nodiscard]] auto font() const noexcept -> xtd::drawing::font;
123 auto font(const xtd::drawing::font& value) -> font_dialog&;
124
127 [[nodiscard]] auto font_must_exist() const noexcept -> bool;
131 auto font_must_exist(bool value) -> font_dialog&;
132
135 [[nodiscard]] auto max_size() const noexcept -> xtd::usize;
139 auto max_size(xtd::usize value) -> font_dialog&;
140
143 [[nodiscard]] auto min_size() const noexcept -> xtd::usize;
147 auto min_size(xtd::usize value) -> font_dialog&;
148
152 [[nodiscard]] auto options() const noexcept -> xtd::usize;
153
156 [[nodiscard]] auto script_only() const noexcept -> bool;
160 auto script_only(bool value) -> font_dialog&;
161
164 [[nodiscard]] auto show_apply() const noexcept -> bool;
168 auto show_apply(bool value) -> font_dialog&;
169
172 [[nodiscard]] auto show_color() const noexcept -> bool;
176 auto show_color(bool value) -> font_dialog&;
177
180 [[nodiscard]] auto show_effect() const noexcept -> bool;
184 auto show_effect(bool value) -> font_dialog&;
185
188 [[nodiscard]] auto show_help() const noexcept -> bool;
192 auto show_help(bool value) -> font_dialog&;
194
196
200 auto reset() noexcept -> void override;
202
204
211
212 protected:
214
221 virtual auto on_apply(const xtd::event_args& e) -> void;
222
227 auto run_dialog(xtd::intptr owner) -> bool override;
228
231 auto run_sheet(xtd::intptr owner) -> void override;
233
234 private:
235 [[nodiscard]] auto get_option(xtd::usize flag) const noexcept -> bool;
236 auto set_option(xtd::usize flag, bool value) -> void;
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:23
Specifies the base class used for displaying dialog boxes on the screen.
Definition common_dialog.hpp:34
auto show_color() const noexcept -> bool
Gets a value indicating whether the dialog box displays the color choice.
auto allow_vector_fonts() const noexcept -> bool
Gets a value indicating whether the dialog box allows vector font selections.
auto run_sheet(xtd::intptr owner) -> void override
When overridden in a derived class, specifies a common dialog box.
auto font_must_exist() const noexcept -> bool
Gets a value indicating whether the dialog box specifies an error condition if the user attempts to s...
auto color() const noexcept -> xtd::drawing::color
Gets the selected font color.
virtual auto on_apply(const xtd::event_args &e) -> void
Raises the font_dialog::apply event.
xtd::event< font_dialog, xtd::event_handler > apply
Occurs when the user clicks the Apply button in the font dialog box.
Definition font_dialog.hpp:209
auto max_size() const noexcept -> xtd::usize
Gets the maximum point size a user can select.
auto reset() noexcept -> void override
Resets all dialog box options to their default values.
auto allow_simulation() const noexcept -> bool
Gets a value indicating whether the dialog box allows graphics device interface (GDI) font simulation...
auto show_help() const noexcept -> bool
Gets a value indicating whether the dialog box displays a Help button.
auto min_size() const noexcept -> xtd::usize
Gets the minimum point size a user can select.
auto font() const noexcept -> xtd::drawing::font
Gets the selected font.
auto show_apply() const noexcept -> bool
Gets a value indicating whether the dialog box contains an Apply button.
auto allow_script_change() const noexcept -> bool
Gets a value indicating whether the user can change the character set specified in the Script combo b...
auto show_effect() const noexcept -> bool
Gets a value indicating whether the dialog box contains controls that allow the user to specify strik...
font_dialog()
Initializes a new instance of the font_dialog class.
auto options() const noexcept -> xtd::usize
Gets values to initialize the font_dialog.
auto script_only() const noexcept -> bool
Gets a value indicating whether the dialog box allows selection of fonts for all non-OEM and Symbol c...
auto allow_vertical_fonts() const noexcept -> bool
Gets a value indicating whether the dialog box displays both vertical and horizontal fonts or only ho...
auto run_dialog(xtd::intptr owner) -> bool override
auto fixed_pitch_only() const noexcept -> bool
Gets a value indicating whether the dialog box allows only the selection of fixed-pitch fonts.
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
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
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 auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197