xtd 1.0.0
Loading...
Searching...
No Matches
font_picker.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
7
9namespace xtd {
11 namespace forms {
31 struct data;
32
33 public:
35
40
42
47 virtual auto color() const noexcept -> const xtd::drawing::color&;
52 virtual auto color(const xtd::drawing::color& color) -> font_picker&;
53
56 [[nodiscard]] auto font() const noexcept -> xtd::drawing::font override;
60 auto font(const xtd::drawing::font& font) -> xtd::forms::control& override;
62
64
68 static auto create() -> font_picker;
72 static auto create(const xtd::drawing::point& location) -> font_picker;
77 static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> font_picker;
83 static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> font_picker;
87 static auto create(const xtd::drawing::font& font) -> font_picker;
92 static auto create(const xtd::drawing::font& font, const xtd::drawing::point& location) -> font_picker;
98 static auto create(const xtd::drawing::font& font, const xtd::drawing::point& location, const xtd::drawing::size& size) -> font_picker;
105 static auto create(const xtd::drawing::font& font, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> font_picker;
110 static auto create(const xtd::drawing::font& font, const xtd::drawing::color& color) -> font_picker;
116 static auto create(const xtd::drawing::font& font, const xtd::drawing::color& color, const xtd::drawing::point& location) -> font_picker;
123 static auto create(const xtd::drawing::font& font, const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size) -> font_picker;
131 static auto create(const xtd::drawing::font& font, const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> font_picker;
135 static auto create(const xtd::forms::control& parent) -> font_picker;
140 static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> font_picker;
146 static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> font_picker;
153 static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> font_picker;
158 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font) -> font_picker;
164 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font, const xtd::drawing::point& location) -> font_picker;
171 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font, const xtd::drawing::point& location, const xtd::drawing::size& size) -> font_picker;
179 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> font_picker;
185 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font, const xtd::drawing::color& color) -> font_picker;
192 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font, const xtd::drawing::color& color, const xtd::drawing::point& location) -> font_picker;
200 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font, const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size) -> font_picker;
209 static auto create(const xtd::forms::control& parent, const xtd::drawing::font& font, const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> font_picker;
211
213
219
220 protected:
222
224 auto create_params() const noexcept -> xtd::forms::create_params override;
226
228
233
234 auto on_handle_created(const xtd::event_args& e) -> void override;
235
239 auto wnd_proc(xtd::forms::message& message) -> void override;
241
242 private:
243 auto wm_command_control(xtd::forms::message& message) -> void;
244 auto wm_command_control_selchange(xtd::forms::message& message) -> void;
245
246 xtd::sptr<data> data_;
247 };
248 }
249}
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
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
virtual auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto parent() const noexcept -> std::optional< xtd::forms::control_ref >
Gets the parent container of the control.
virtual auto name() const noexcept -> const xtd::string &
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual auto location() const noexcept -> xtd::drawing::point
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
Provides data for the xtd::forms::font_picker::font_picker_changed events.
Definition font_picker_event_args.hpp:28
xtd::event< font_picker, xtd::forms::font_picker_event_handler > font_picker_changed
Occurs when the value of the font property changes.
Definition font_picker.hpp:217
static auto create() -> font_picker
A factory to create an xtd::forms::font_picker.
auto on_handle_created(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::handle_created event.
font_picker()
Initializes a new instance of the font_picker class.
virtual auto color() const noexcept -> const xtd::drawing::color &
Gets the color selected by the user.
auto on_font_picker_changed(const xtd::forms::font_picker_event_args &e) -> void
Raises the xtd::forms::control::font_changed event.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
auto font() const noexcept -> xtd::drawing::font override
Gets the selected font.
auto wnd_proc(xtd::forms::message &message) -> void override
Processes Windows messages.
Contains xtd::forms::control control.
Contains xtd::forms::font_picker_event_handler event handler.
xtd::delegate< void(xtd::object &sender, const xtd::forms::font_picker_event_args &e)> font_picker_event_handler
Represents the method that will handle the xtd::forms::font_picker::color_changed of the xtd::forms::...
Definition font_picker_event_handler.hpp:28
#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
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
Implements a Windows message.
Definition message.hpp:33