![]() |
xtd.forms - Reference Guide
0.1.0
Modern c++17 library containing classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows, Apple macOS and Linux like Ubuntu operating system.
|
Represents a common dialog box that displays available colors along with controls that enable the user to define custom colors. More...
#include <color_dialog.hpp>
Public Member Functions | |
color_dialog ()=default | |
Initializes a new instance of the color_dialog class. More... | |
bool | allow_full_open () const |
Gets a value indicating whether the user can use the dialog box to define custom colors. More... | |
color_dialog & | allow_full_open (bool allow_full_open) |
Sets a value indicating whether the user can use the dialog box to define custom colors. More... | |
bool | alpha_color () const |
Gets a value indicating whether the dialog box shows alpha values and an opacity selector (slider). More... | |
color_dialog & | alpha_color (bool alpha_color) |
Sets a value indicating whether the user can use the dialog box to define custom colors. More... | |
bool | any_color () const |
Gets a value indicating whether the dialog box displays all available colors in the set of basic colors. More... | |
color_dialog & | any_color (bool any_color) |
Sets a value indicating whether the dialog box displays all available colors in the set of basic colors. More... | |
drawing::color | color () const |
Gets the color selected by the user. More... | |
color_dialog & | color (const drawing::color &color) |
Sets the color selected by the user. More... | |
const std::optional< std::vector< int32_t > > & | custom_colors () const |
Gets the set of custom colors shown in the dialog box. More... | |
color_dialog & | custom_colors (const std::vector< int32_t > &custom_colors) |
Sets the set of custom colors shown in the dialog box. More... | |
bool | full_open () const |
Gets a value indicating whether the controls used to create custom colors are visible when the dialog box is opened. More... | |
color_dialog & | full_open (bool full_open) |
Sets a value indicating whether the controls used to create custom colors are visible when the dialog box is opened. More... | |
size_t | options () const |
void | reset () override |
Resets all options to their default values, the last selected color to black, and the custom colors to their default values. More... | |
bool | show_help () const |
Gets a value indicating whether a Help button appears in the color dialog box. More... | |
color_dialog & | show_help (bool show_help) |
Sets a value indicating whether a Help button appears in the color dialog box. More... | |
bool | solid_color_only () const |
Gets a value indicating whether the dialog box will restrict users to selecting solid colors only. More... | |
color_dialog & | solid_color_only (bool solid_color_only) |
Sets a value indicating whether the dialog box will restrict users to selecting solid colors only. More... | |
![]() | |
common_dialog ()=default | |
Initializes a new instance of the common_dialog class. More... | |
xtd::forms::dialog_result | show_dialog () |
Runs a common dialog box with a default owner. More... | |
xtd::forms::dialog_result | show_dialog (const iwin32_window &owner) |
Runs a common dialog box with the specified owner. More... | |
std::any | tag () const |
Gets an object that contains data about the control. More... | |
common_dialog & | tag (const std::any &tag) |
Sets an object that contains data about the control. More... | |
Protected Member Functions | |
bool | run_dialog (intptr_t owner) override |
When overridden in a derived class, specifies a common dialog box. More... | |
![]() | |
virtual void | on_help_request (help_event_args &e) |
Raises the help_request event. More... | |
![]() | |
virtual bool | can_raise_events () const |
Gets a value indicating whether the component can raise an event. More... | |
bool | design_mode () const |
Gets a value that indicates whether the component is currently in design mode. More... | |
Additional Inherited Members | |
![]() | |
event< common_dialog, help_event_handler< component & > > | help_request |
Occurs when the user clicks the Help button on a common dialog box. More... | |
Represents a common dialog box that displays available colors along with controls that enable the user to define custom colors.
|
default |
Initializes a new instance of the color_dialog class.
Property | Initial Value |
---|---|
alpha_color | true |
allow_full_open | true |
any_color | false |
color | drawing::color::black |
custom_colors | has no value |
full_open | false |
show_help | false |
solid_color_only | false |
|
inline |
Gets a value indicating whether the user can use the dialog box to define custom colors.
|
inline |
Sets a value indicating whether the user can use the dialog box to define custom colors.
allow_full_open | true if the user can define custom colors; otherwise, false. The default is true. |
|
inline |
Gets a value indicating whether the dialog box shows alpha values and an opacity selector (slider).
|
inline |
Sets a value indicating whether the user can use the dialog box to define custom colors.
alpha_color | true if the dialog box shows alpha values and an opacity selector (slider); otherwise, false. |
|
inline |
Gets a value indicating whether the dialog box displays all available colors in the set of basic colors.
|
inline |
Sets a value indicating whether the dialog box displays all available colors in the set of basic colors.
any_color | true if the dialog box displays all available colors in the set of basic colors; otherwise, false. The default value is false. |
|
inline |
Gets the color selected by the user.
|
inline |
Sets the color selected by the user.
color | The color selected by the user. If a color is not selected. |
|
inline |
Gets the set of custom colors shown in the dialog box.
|
inline |
Sets the set of custom colors shown in the dialog box.
custom_color | A set of custom colors shown by the dialog box. |
|
inline |
Gets a value indicating whether the controls used to create custom colors are visible when the dialog box is opened.
|
inline |
Sets a value indicating whether the controls used to create custom colors are visible when the dialog box is opened.
full_open | true if the custom color controls are available when the dialog box is opened; otherwise, false. The default value is false. |
|
inline |
|
overridevirtual |
Resets all options to their default values, the last selected color to black, and the custom colors to their default values.
Implements xtd::forms::common_dialog.
|
overrideprotectedvirtual |
When overridden in a derived class, specifies a common dialog box.
owner | A value that represents the window handle of the owner window for the common dialog box. |
Implements xtd::forms::common_dialog.
|
inline |
Gets a value indicating whether a Help button appears in the color dialog box.
|
inline |
Sets a value indicating whether a Help button appears in the color dialog box.
show_help | true if the Help button is shown in the dialog box; otherwise, false. |
|
inline |
Gets a value indicating whether the dialog box will restrict users to selecting solid colors only.
|
inline |
Sets a value indicating whether the dialog box will restrict users to selecting solid colors only.
solid_color_only | true if users can select only solid colors; otherwise, false. |