xtd 0.2.0
Loading...
Searching...
No Matches
color_picker.h
Go to the documentation of this file.
1
4#pragma once
5#include "control.h"
7
9namespace xtd {
11 namespace forms {
31 struct data;
32
33 public:
35
40
42
46 virtual bool alpha_color() const noexcept;
49 virtual color_picker& alpha_color(bool alpha_color);
50
54 virtual const drawing::color& color() const noexcept;
58 virtual color_picker& color(const drawing::color& color);
60
61
63
67 static color_picker create();
71 static color_picker create(const drawing::point& location);
76 static color_picker create(const drawing::point& location, const drawing::size& size);
82 static color_picker create(const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
86 static color_picker create(const xtd::drawing::color& color);
91 static color_picker create(const xtd::drawing::color& color, const drawing::point& location);
97 static color_picker create(const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size);
104 static color_picker create(const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
108 static color_picker create(const control& parent);
113 static color_picker create(const control& parent, const drawing::point& location);
119 static color_picker create(const control& parent, const drawing::point& location, const drawing::size& size);
126 static color_picker create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
131 static color_picker create(const control& parent, const xtd::drawing::color& color);
137 static color_picker create(const control& parent, const xtd::drawing::color& color, const drawing::point& location);
144 static color_picker create(const control& parent, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size);
152 static color_picker create(const control& parent, const xtd::drawing::color& color, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
154
156
162
163 protected:
165
167 forms::create_params create_params() const noexcept override;
169
171
177 std::unique_ptr<xtd::object> clone() const override;
178
181 void on_color_picker_changed(const color_picker_event_args& e);
182
183 void on_handle_created(const event_args& e) override;
184 void wnd_proc(message& message) override;
186
187 private:
188 void wm_command_control(message& message);
189 void wm_command_control_selchange(message& message);
190
191 std::shared_ptr<data> data_;
192 };
193 }
194}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Represents an event.
Definition event.h:21
Provides data for the xtd::forms::color_picker::color_picker_changed event.
Definition color_picker_event_args.h:25
Represents a picker control that displays available colors along with controls that enable the user t...
Definition color_picker.h:30
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.h:79
Encapsulates the information needed when creating a control.
Definition create_params.h:27
Implements a Windows message.
Definition message.h:26
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
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.h:23
#define forms_export_
Define shared library export.
Definition forms_export.h:13
size_t size
Represents a size of any object in bytes.
Definition types.h:197
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::style_sheets::control class.