xtd 0.2.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 virtual bool alpha_color() const noexcept;
51 virtual color_picker& alpha_color(bool alpha_color);
52
56 virtual const drawing::color& color() const noexcept;
60 virtual color_picker& color(const drawing::color& color);
62
63
65
69 static color_picker create();
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);
88 static color_picker create(const xtd::drawing::color& color);
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);
110 static color_picker create(const control& parent);
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);
133 static color_picker create(const control& parent, const xtd::drawing::color& color);
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
183 void on_color_picker_changed(const color_picker_event_args& e);
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
Represents a picker control that displays available colors along with controls that enable the user t...
Definition color_picker.hpp:32
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).
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
Encapsulates the information needed when creating a control.
Definition create_params.hpp:29
Implements a Windows message.
Definition message.hpp:28
Contains xtd::forms::color_picker_event_handler event handler.
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:25
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::forms::style_sheets::control class.