xtd 0.2.0
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:
40
42
59
61
65 bool alpha_color() const noexcept;
69
72 bool allow_full_open() const noexcept;
76
79 bool any_color() const noexcept;
83
87 drawing::color color() const noexcept;
92
97 const colors& custom_colors() const noexcept;
103
108 bool full_open() const noexcept;
114
118 size_t options() const noexcept;
119
122 bool show_help() const noexcept;
126
130 bool solid_color_only() const noexcept;
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}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:61
size_t options() const noexcept
Gets values to initialize the color_dialog.
const colors & custom_colors() const noexcept
Gets the set of custom colors shown in the dialog box.
bool full_open() const noexcept
Gets a value indicating whether the controls used to create custom colors are visible when the dialog...
xtd::array< 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).
bool run_dialog(intptr owner) override
When overridden in a derived class, specifies a common dialog box.
void run_sheet(intptr owner) override
When overridden in a derived class, specifies a common dialog box.
bool show_help() const noexcept
Gets a value indicating whether a Help button appears in the color dialog box.
bool allow_full_open() const noexcept
Gets a value indicating whether the user can use the dialog box to define custom colors.
virtual const xtd::string & title() const noexcept
Gets the color dialog box title.
color_dialog()
Initializes a new instance of the color_dialog class.
bool solid_color_only() const noexcept
Gets a value indicating whether the dialog box will restrict users to selecting solid colors only.
void reset() noexcept override
Resets all options to their default values, the last selected color to black, and the custom colors t...
drawing::color color() const noexcept
Gets the color selected by the user.
bool any_color() const noexcept
Gets a value indicating whether the dialog box displays all available colors in the set of basic colo...
common_dialog()
Initializes a new instance of the common_dialog class.
Contains xtd::forms::common_dialog class.
Contains forms_export_ keyword.
#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
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
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 const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201