xtd 1.0.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:
40
42
59
61
65 [[nodiscard]] auto alpha_color() const noexcept -> bool;
68 auto alpha_color(bool value) -> color_dialog&;
69
72 [[nodiscard]] auto allow_full_open() const noexcept -> bool;
75 auto allow_full_open(bool value) -> color_dialog&;
76
79 [[nodiscard]] auto any_color() const noexcept -> bool;
82 auto any_color(bool value) -> color_dialog&;
83
87 [[nodiscard]] auto color() const noexcept -> xtd::drawing::color;
91 auto color(const xtd::drawing::color& value) -> color_dialog&;
92
97 [[nodiscard]] auto custom_colors() const noexcept -> const colors&;
102 auto custom_colors(const colors& value) -> color_dialog&;
103
108 [[nodiscard]] auto full_open() const noexcept -> bool;
113 auto full_open(bool value) -> color_dialog&;
114
118 [[nodiscard]] auto options() const noexcept -> xtd::usize;
119
122 [[nodiscard]] auto show_help() const noexcept -> bool;
125 auto show_help(bool value) -> color_dialog&;
126
130 [[nodiscard]] auto solid_color_only() const noexcept -> bool;
134 auto solid_color_only(bool value) -> color_dialog&;
135
139 [[nodiscard]] virtual auto title() const noexcept -> const xtd::string&;
144 virtual auto title(const xtd::string& value) -> color_dialog&;
146
148
151 auto reset() noexcept -> void override;
153
154 protected:
156
161 [[nodiscard]] auto run_dialog(xtd::intptr owner) -> bool override;
162
165 auto run_sheet(xtd::intptr owner) -> void override;
167
168 private:
169 [[nodiscard]] auto get_option(xtd::usize flag) const noexcept -> bool;
170 auto set_option(xtd::usize flag, bool value) -> void;
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:64
auto run_dialog(xtd::intptr owner) -> bool override
When overridden in a derived class, specifies a common dialog box.
auto full_open() const noexcept -> bool
Gets a value indicating whether the controls used to create custom colors are visible when the dialog...
auto reset() noexcept -> void override
Resets all options to their default values, the last selected color to black, and the custom colors t...
auto solid_color_only() const noexcept -> bool
Gets a value indicating whether the dialog box will restrict users to selecting solid colors only.
xtd::array< xtd::drawing::color > colors
Represents an xtd::drawing::color array.
Definition color_dialog.hpp:39
auto any_color() const noexcept -> bool
Gets a value indicating whether the dialog box displays all available colors in the set of basic colo...
virtual auto title() const noexcept -> const xtd::string &
Gets the color dialog box title.
color_dialog()
Initializes a new instance of the color_dialog class.
auto options() const noexcept -> xtd::usize
Gets values to initialize the color_dialog.
auto custom_colors() const noexcept -> const colors &
Gets the set of custom colors shown in the dialog box.
auto color() const noexcept -> xtd::drawing::color
Gets the color selected by the user.
auto run_sheet(xtd::intptr owner) -> void override
When overridden in a derived class, specifies a common dialog box.
auto alpha_color() const noexcept -> bool
Gets a value indicating whether the dialog box shows alpha values and an opacity selector (slider).
auto allow_full_open() const noexcept -> bool
Gets a value indicating whether the user can use the dialog box to define custom colors.
auto show_help() const noexcept -> bool
Gets a value indicating whether a Help button appears in the color dialog box.
Specifies the base class used for displaying dialog boxes on the screen.
Definition common_dialog.hpp:34
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
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
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 auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197