xtd 0.2.0
Loading...
Searching...
No Matches
color_dialog.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../forms_export.hpp"
6#include "common_dialog.hpp"
7#include <xtd/forms/choose_color_flags>
8#include <xtd/drawing/color>
9
11namespace xtd {
13 namespace forms {
35 struct data;
36
37 public:
39 using colors = std::vector<xtd::drawing::color>;
40
42
59
61
65 bool alpha_color() const noexcept;
68 color_dialog& alpha_color(bool alpha_color);
69
72 bool allow_full_open() const noexcept;
75 color_dialog& allow_full_open(bool allow_full_open);
76
79 bool any_color() const noexcept;
82 color_dialog& any_color(bool any_color);
83
87 drawing::color color() const noexcept;
91 color_dialog& color(const drawing::color& color);
92
97 const colors& custom_colors() const noexcept;
102 color_dialog& custom_colors(const colors& custom_colors);
103
108 bool full_open() const noexcept;
113 color_dialog& full_open(bool full_open);
114
118 size_t options() const noexcept;
119
122 bool show_help() const noexcept;
125 color_dialog& show_help(bool show_help);
126
130 bool solid_color_only() const noexcept;
134 color_dialog& solid_color_only(bool solid_color_only);
135
139 virtual const xtd::string& title() const noexcept;
144 virtual color_dialog& title(const xtd::string& value);
146
148
151 void reset() noexcept override;
153
154 protected:
156
161 bool run_dialog(intptr owner) override;
162
165 void run_sheet(intptr owner) override;
167
168 private:
169 bool get_option(size_t flag) const noexcept;
170 void set_option(size_t flag, bool value);
171
172 xtd::sptr<data> data_;
173 };
174 }
175}
Represents a common dialog box that displays available colors along with controls that enable the use...
Definition color_dialog.hpp:34
std::vector< xtd::drawing::color > colors
Represents an xtd::drawing::color array.
Definition color_dialog.hpp:39
bool alpha_color() const noexcept
Gets a value indicating whether the dialog box shows alpha values and an opacity selector (slider).
color_dialog()
Initializes a new instance of the color_dialog class.
Specifies the base class used for displaying dialog boxes on the screen.
Definition common_dialog.hpp:34
Contains xtd::forms::common_dialog class.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.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