xtd - Reference Guide 0.2.0
xtd::forms::color_box Class Referencefinal

#include <color_box.h>

Definition

Represents a common dialog box that displays available colors along with controls that enable the user to define custom colors.

Namespace
xtd::forms
Library
xtd.forms
Examples
The following code example demonstrates the use of color_box dialog.
#include <xtd/xtd>
using namespace xtd;
using namespace xtd::drawing;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Color box example");
controls().push_back(button1);
button1.location({10, 10});
button1.text("Color...");
button1.click += [&] {
color color = back_color();
back_color(color);
};
}
private:
};
int main() {
application::run(form1 {});
}

Methods

static xtd::forms::dialog_result show (xtd::drawing::color &color, const xtd::forms::iwin32_window &owner)
 Displays a color box in front of the specified window. The color box displays a color. More...
 
static xtd::forms::dialog_result show (xtd::drawing::color &color, const xtd::forms::iwin32_window &owner, const xtd::ustring &title)
 Displays a color box in front of the specified window. The color box displays a color. More...
 
static xtd::forms::dialog_result show (xtd::drawing::color &color, const xtd::forms::iwin32_window &owner, const xtd::ustring &title, color_box_styles styles)
 Displays a color box in front of the specified window. The color box displays a color with styles. More...
 
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)
 Displays a color box in front of the specified window. The color box displays a color with styles, and custom colors. More...
 
static xtd::forms::dialog_result show (xtd::drawing::color &color)
 Displays a color box. The color box displays a color. More...
 
static xtd::forms::dialog_result show (xtd::drawing::color &color, const xtd::ustring &title)
 Displays a color box. The color box displays a color. More...
 
static xtd::forms::dialog_result show (xtd::drawing::color &color, const xtd::ustring &title, color_box_styles styles)
 Displays a color box. The color box displays a color with styles. More...
 
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)
 Displays a color box. The color box displays a color with styles, and custom colors. More...
 

Member Function Documentation

◆ show() [1/8]

static xtd::forms::dialog_result xtd::forms::color_box::show ( xtd::drawing::color color,
const xtd::forms::iwin32_window owner 
)
inlinestatic

Displays a color box in front of the specified window. The color box displays a color.

Parameters
colorA xtd::drawing::color that specifies the color to display.
ownerA iwin32_window that represents the owner window of the color box.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

◆ show() [2/8]

static xtd::forms::dialog_result xtd::forms::color_box::show ( xtd::drawing::color color,
const xtd::forms::iwin32_window owner,
const xtd::ustring title 
)
inlinestatic

Displays a color box in front of the specified window. The color box displays a color.

Parameters
colorA xtd::drawing::color that specifies the color to display.
ownerA iwin32_window that represents the owner window of the color box.
titleThe file dialog box title. The default value is an empty string ("").
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

◆ show() [3/8]

static xtd::forms::dialog_result xtd::forms::color_box::show ( xtd::drawing::color color,
const xtd::forms::iwin32_window owner,
const xtd::ustring title,
color_box_styles  styles 
)
inlinestatic

Displays a color box in front of the specified window. The color box displays a color with styles.

Parameters
colorA xtd::drawing::color that specifies the color to display.
ownerA iwin32_window that represents the owner window of the color box.
titleThe file dialog box title. The default value is an empty string ("").
stylesA bitwise combination of the color_box_styles values. The default is alpha_color and allow_full_open.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

◆ show() [4/8]

static xtd::forms::dialog_result xtd::forms::color_box::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 
)
inlinestatic

Displays a color box in front of the specified window. The color box displays a color with styles, and custom colors.

Parameters
colorA xtd::drawing::color that specifies the color to display.
ownerA iwin32_window that represents the owner window of the color box.
titleThe file dialog box title. The default value is an empty string ("").
stylesA bitwise combination of the color_box_styles values. The default is alpha_color and allow_full_open.
custom_colorsA colors array that contains user custom colors.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

◆ show() [5/8]

static xtd::forms::dialog_result xtd::forms::color_box::show ( xtd::drawing::color color)
inlinestatic

Displays a color box. The color box displays a color.

Parameters
colorA xtd::drawing::color that specifies the color to display.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

◆ show() [6/8]

static xtd::forms::dialog_result xtd::forms::color_box::show ( xtd::drawing::color color,
const xtd::ustring title 
)
inlinestatic

Displays a color box. The color box displays a color.

Parameters
colorA xtd::drawing::color that specifies the color to display.
titleThe file dialog box title. The default value is an empty string ("").
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

◆ show() [7/8]

static xtd::forms::dialog_result xtd::forms::color_box::show ( xtd::drawing::color color,
const xtd::ustring title,
color_box_styles  styles 
)
inlinestatic

Displays a color box. The color box displays a color with styles.

Parameters
colorA xtd::drawing::color that specifies the color to display.
titleThe file dialog box title. The default value is an empty string ("").
stylesA bitwise combination of the color_box_styles values. The default is alpha_color and allow_full_open.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

◆ show() [8/8]

static xtd::forms::dialog_result xtd::forms::color_box::show ( xtd::drawing::color color,
const xtd::ustring title,
color_box_styles  styles,
const std::vector< xtd::drawing::color > &  custom_colors 
)
inlinestatic

Displays a color box. The color box displays a color with styles, and custom colors.

Parameters
colorA xtd::drawing::color that specifies the color to display.
titleThe file dialog box title. The default value is an empty string ("").
stylesA bitwise combination of the color_box_styles values. The default is alpha_color and allow_full_open.
custom_colorsA colors array that contains user custom colors.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the color parameter contains the new chosen color.

The documentation for this class was generated from the following file: