xtd 0.2.0
Loading...
Searching...
No Matches
color_dialog.h
Go to the documentation of this file.
1
4#pragma once
5#include "../forms_export.h"
6#include "common_dialog.h"
7#include <xtd/forms/choose_color_flags>
8#include <xtd/drawing/color>
9
11namespace xtd {
13 namespace forms {
33 struct data;
34
35 public:
37 using colors = std::vector<xtd::drawing::color>;
38
40
57
59
63 bool alpha_color() const noexcept;
66 color_dialog& alpha_color(bool alpha_color);
67
70 bool allow_full_open() const noexcept;
73 color_dialog& allow_full_open(bool allow_full_open);
74
77 bool any_color() const noexcept;
80 color_dialog& any_color(bool any_color);
81
85 drawing::color color() const noexcept;
89 color_dialog& color(const drawing::color& color);
90
95 const colors& custom_colors() const noexcept;
100 color_dialog& custom_colors(const colors& custom_colors);
101
106 bool full_open() const noexcept;
111 color_dialog& full_open(bool full_open);
112
116 size_t options() const noexcept;
117
120 bool show_help() const noexcept;
123 color_dialog& show_help(bool show_help);
124
128 bool solid_color_only() const noexcept;
132 color_dialog& solid_color_only(bool solid_color_only);
133
137 virtual const xtd::ustring& title() const noexcept;
142 virtual color_dialog& title(const xtd::ustring& value);
144
146
149 void reset() noexcept override;
151
152 protected:
154
159 bool run_dialog(intptr owner) override;
160
163 void run_sheet(intptr owner) override;
165
166 private:
167 bool get_option(size_t flag) const noexcept;
168 void set_option(size_t flag, bool value);
169
170 std::shared_ptr<data> data_;
171 };
172 }
173}
Represents a common dialog box that displays available colors along with controls that enable the use...
Definition color_dialog.h:32
std::vector< xtd::drawing::color > colors
Represents an xtd::drawing::color array.
Definition color_dialog.h:37
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.h:32
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Contains xtd::forms::common_dialog class.
#define forms_export_
Define shared library export.
Definition forms_export.h:13
intmax_t intptr
Represent a pointer or a handle.
Definition types.h:153
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