xtd 0.2.0
color_box.h
Go to the documentation of this file.
1 #pragma once
5 #include "../forms_export.h"
6 #include "color_box_styles.h"
7 #include "dialog_result.h"
8 #include "iwin32_window.h"
9 #include <xtd/drawing/color>
10 #include <xtd/static>
11 #include <xtd/ustring>
12 
14 namespace xtd {
16  namespace forms {
33  class forms_export_ color_box final static_ {
34  public:
36 
50  static xtd::forms::dialog_result show(xtd::drawing::color& color, const xtd::forms::iwin32_window& owner, const xtd::ustring& title);
58  static xtd::forms::dialog_result show(xtd::drawing::color& color, const xtd::forms::iwin32_window& owner, const xtd::ustring& title, color_box_styles styles);
67  static xtd::forms::dialog_result show(xtd::drawing::color& color, const xtd::forms::iwin32_window& owner, const xtd::ustring& title, color_box_styles styles, const std::vector<xtd::drawing::color>& custom_colors);
68 
79  static xtd::forms::dialog_result show(xtd::drawing::color& color, const xtd::ustring& title);
86  static xtd::forms::dialog_result show(xtd::drawing::color& color, const xtd::ustring& title, color_box_styles styles);
94  static xtd::forms::dialog_result show(xtd::drawing::color& color, const xtd::ustring& title, color_box_styles styles, const std::vector<xtd::drawing::color>& custom_colors);
96 
97  private:
98  static xtd::forms::dialog_result show_color_box(xtd::drawing::color& color, const xtd::forms::iwin32_window* owner = nullptr, const xtd::ustring& title = "", color_box_styles styles = color_box_styles::alpha_color | color_box_styles::allow_full_open, const std::optional<std::vector<xtd::drawing::color>>& custom_colors = std::optional<std::vector<xtd::drawing::color>> {});
99  };
100  }
101 }
dialog_result
Specifies identifiers to indicate the return value of a dialog box.
Definition: dialog_result.h:41
#define static_
This keyword is use to represent a static object. A static object can&#39;t be instantiated (constructors...
Definition: static.h:37
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
The color box shows alpha values and an opacity selector (slider).
Represents a common dialog box that displays available colors along with controls that enable the use...
Definition: color_box.h:33
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Contains xtd::forms::iwin32_window interface.
Provides an interface to expose Win32 HWND handles.
Definition: iwin32_window.h:21
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:45
Contains xtd::forms::dialog_result enum class.
color_box_styles
Specifies constants defining which color_box styles is used.
Definition: color_box_styles.h:20
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The user can use the dialog box to define custom colors.
Contains xtd::forms::color_box_styles enum class.