xtd 0.2.0
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 const drawing::color& color() const noexcept;
52 virtual font_picker& color(const drawing::color& color);
53
56 drawing::font font() const noexcept override;
60 control& font(const drawing::font& font) override;
62
64
72 static font_picker create(const drawing::point& location);
77 static font_picker create(const drawing::point& location, const drawing::size& size);
83 static font_picker create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
92 static font_picker create(const drawing::font& font, const drawing::point& location);
98 static font_picker create(const drawing::font& font, const drawing::point& location, const drawing::size& size);
105 static font_picker create(const drawing::font& font, const drawing::point& location, const drawing::size& size, const xtd::string& name);
116 static font_picker create(const drawing::font& font, const xtd::drawing::color& color, const drawing::point& location);
123 static font_picker create(const drawing::font& font, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size);
131 static font_picker create(const drawing::font& font, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size, const xtd::string& name);
140 static font_picker create(const control& parent, const drawing::point& location);
146 static font_picker create(const control& parent, const drawing::point& location, const drawing::size& size);
153 static font_picker create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
164 static font_picker create(const control& parent, const drawing::font& font, const drawing::point& location);
171 static font_picker create(const control& parent, const drawing::font& font, const drawing::point& location, const drawing::size& size);
179 static font_picker create(const control& parent, const drawing::font& font, const drawing::point& location, const drawing::size& size, const xtd::string& name);
185 static font_picker create(const control& parent, const drawing::font& font, const xtd::drawing::color& color);
192 static font_picker create(const control& parent, const drawing::font& font, const xtd::drawing::color& color, const drawing::point& location);
200 static font_picker create(const control& parent, const drawing::font& font, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size);
209 static font_picker create(const control& parent, const drawing::font& font, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size, const xtd::string& name);
211
213
219
220 protected:
222
224 forms::create_params create_params() const noexcept override;
226
228
234 xtd::uptr<xtd::object> clone() const override;
235
239
240 void on_handle_created(const event_args& e) override;
241
245 void wnd_proc(message& message) override;
247
248 private:
249 void wm_command_control(message& message);
250 void wm_command_control_selchange(message& message);
251
252 xtd::sptr<data> data_;
253 };
254 }
255}
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:46
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
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual const xtd::string & name() const noexcept
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual drawing::size size() const noexcept
Gets the height and width of the control.
virtual std::optional< control_ref > parent() const noexcept
Gets the parent container of the control.
Provides data for the xtd::forms::font_picker::font_picker_changed events.
Definition font_picker_event_args.hpp:28
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
event< font_picker, font_picker_event_handler > font_picker_changed
Occurs when the value of the font property changes.
Definition font_picker.hpp:217
static font_picker create()
A factory to create an xtd::forms::font_picker.
void on_font_picker_changed(const font_picker_event_args &e)
Raises the xtd::forms::control::font_changed event.
void on_handle_created(const event_args &e) override
Raises the xtd::forms::control::handle_created event.
drawing::font font() const noexcept override
Gets the selected font.
void wnd_proc(message &message) override
Processes Windows messages.
font_picker()
Initializes a new instance of the font_picker class.
virtual const drawing::color & color() const noexcept
Gets the color selected by the user.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
Contains xtd::forms::control control.
Contains xtd::forms::font_picker_event_handler event handler.
xtd::delegate< void(object &sender, const font_picker_event_args &e)> font_picker_event_handler
Represents the method that will handle the xtd::forms::font_picker::color_changeds 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
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
@ 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
Implements a Windows message.
Definition message.hpp:33