xtd 0.2.0
color_picker.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
7
9namespace xtd {
11 namespace forms {
33 struct data;
34
35 public:
37
42
44
48 virtual bool alpha_color() const noexcept;
52
56 virtual const drawing::color& color() const noexcept;
62
63
65
73 static color_picker create(const drawing::point& location);
78 static color_picker create(const drawing::point& location, const drawing::size& size);
84 static color_picker create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
93 static color_picker create(const xtd::drawing::color& color, const drawing::point& location);
99 static color_picker create(const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size);
106 static color_picker create(const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size, const xtd::string& name);
115 static color_picker create(const control& parent, const drawing::point& location);
121 static color_picker create(const control& parent, const drawing::point& location, const drawing::size& size);
128 static color_picker create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
139 static color_picker create(const control& parent, const xtd::drawing::color& color, const drawing::point& location);
146 static color_picker create(const control& parent, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size);
154 static color_picker create(const control& parent, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size, const xtd::string& name);
156
158
164
165 protected:
167
169 forms::create_params create_params() const noexcept override;
171
173
179 xtd::uptr<xtd::object> clone() const override;
180
184
185 void on_handle_created(const event_args& e) override;
186 void wnd_proc(message& message) override;
188
189 private:
190 void wm_command_control(message& message);
191 void wm_command_control_selchange(message& message);
192
193 xtd::sptr<data> data_;
194 };
195 }
196}
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
Provides data for the xtd::forms::color_picker::color_picker_changed event.
Definition color_picker_event_args.hpp:27
static color_picker create()
A factory to create an xtd::forms::color_picker.
event< color_picker, color_picker_event_handler > color_picker_changed
Occurs when the value of the color property changes.
Definition color_picker.hpp:162
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
color_picker()
Initializes a new instance of the color_picker class.
virtual bool alpha_color() const noexcept
Gets a value indicating whether the dialog box shows alpha values and an opacity selector (slider).
void wnd_proc(message &message) override
Processes Windows messages.
void on_handle_created(const event_args &e) override
Raises the xtd::forms::control::handle_created event.
virtual const drawing::color & color() const noexcept
Gets the color selected by the user.
void on_color_picker_changed(const color_picker_event_args &e)
Raises the color_changed event.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
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.
Contains xtd::forms::color_picker_event_handler event handler.
Contains xtd::forms::control control.
xtd::delegate< void(object &sender, const color_picker_event_args &e)> color_picker_event_handler
Represents the method that will handle the xtd::forms::color_picker::color_changeds of the xtd::forms...
Definition color_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