xtd 1.0.0
Loading...
Searching...
No Matches
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 [[nodiscard]] virtual auto alpha_color() const noexcept -> bool;
51 virtual auto alpha_color(bool value) -> color_picker&;
52
56 [[nodiscard]] virtual auto color() const noexcept -> const xtd::drawing::color&;
60 virtual auto color(const xtd::drawing::color& value) -> color_picker&;
62
63
65
69 [[nodiscard]] static auto create() -> color_picker;
73 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> color_picker;
78 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> color_picker;
84 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> color_picker;
88 [[nodiscard]] static auto create(const xtd::drawing::color& color) -> color_picker;
93 [[nodiscard]] static auto create(const xtd::drawing::color& color, const xtd::drawing::point& location) -> color_picker;
99 [[nodiscard]] static auto create(const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size) -> color_picker;
106 [[nodiscard]] static auto create(const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> color_picker;
110 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> color_picker;
115 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> color_picker;
121 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> color_picker;
128 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> color_picker;
133 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::color& color) -> color_picker;
139 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::color& color, const xtd::drawing::point& location) -> color_picker;
146 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size) -> color_picker;
154 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::color& color, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> color_picker;
156
158
164
165 protected:
167
169 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
171
173
178
179 auto on_handle_created(const event_args& e) -> void override;
180 auto wnd_proc(message& message) -> void override;
182
183 private:
184 auto wm_command_control(message& message) -> void;
185 auto wm_command_control_selchange(message& message) -> void;
186
187 xtd::sptr<data> data_;
188 };
189 }
190}
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
Provides data for the xtd::forms::color_picker::color_picker_changed event.
Definition color_picker_event_args.hpp:27
xtd::event< color_picker, xtd::forms::color_picker_event_handler > color_picker_changed
Occurs when the value of the color property changes.
Definition color_picker.hpp:162
auto on_color_picker_changed(const color_picker_event_args &e) -> void
Raises the color_changed event.
auto on_handle_created(const event_args &e) -> void override
Raises the xtd::forms::control::handle_created event.
auto wnd_proc(message &message) -> void override
Processes Windows messages.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
static auto create() -> color_picker
A factory to create an xtd::forms::color_picker.
color_picker()
Initializes a new instance of the color_picker class.
virtual auto color() const noexcept -> const xtd::drawing::color &
Gets the color selected by the user.
virtual auto alpha_color() const noexcept -> bool
Gets a value indicating whether the dialog box shows alpha values and an opacity selector (slider).
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...
Contains xtd::forms::color_picker_event_handler event handler.
Contains xtd::forms::control control.
xtd::delegate< void(xtd::object &sender, const xtd::forms::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
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