This class represents the color chooser dialog. Only modal dialog is supported.
Styles: | Styles | Description |
wCdFullOpen | Displays the full dialog with custom color selection controls. |
wCdCenter | Centers the window relative to it's owner. |
wCdScreenCenter | Centers the window on screen. |
|
Events: | wDialogEventwDialogEvent | Description |
wEvent_DialogCreated | When the dialog is created but not yet shown. |
wEvent_DialogClosed | When the dialog is being closed. |
wEvent_DialogHelp | When the Help button is pressed. |
|
proc getColor(self: wColorDialog): wColor {...}{.inline, raises: [], tags: [].}
-
Returns the default or user-selected color.
proc getCustomColor(self: wColorDialog; i: range[0 .. 15]): wColor {...}{.inline, raises: [],
tags: [].}
-
Returns custom colors associated with the color dialog.
proc setColor(self: wColorDialog; color: wColor) {...}{.inline, raises: [], tags: [].}
-
Sets the default color.
proc setCustomColor(self: wColorDialog; i: range[0 .. 15]; color: wColor) {...}{.inline,
raises: [], tags: [].}
-
Sets custom colors for the color dialog.
proc enableHelp(self: wColorDialog; flag = true) {...}{.raises: [], tags: [].}
-
Display a Help button, the dialog got wEvent_DialogHelp event when the button pressed.
proc init(self: wColorDialog; owner: wWindow = nil; defaultColor = wBlack;
style: wStyle = 0) {...}{.raises: [wWindowError, wCursorError, IndexDefect,
wFontError], tags: [RootEffect].}
-
Initializer.
proc ColorDialog(owner: wWindow = nil; defaultColor = wBlack; style: wStyle = 0): wColorDialog {...}{.
inline, discardable,
raises: [wWindowError, wCursorError, IndexDefect, wFontError], tags: [RootEffect].}
-
Constructor.
proc showModal(self: wColorDialog): wId {...}{.discardable, raises: [], tags: [].}
-
Shows the dialog, returning wIdOk if the user pressed OK, and wIdCancel otherwise.
proc display(self: wColorDialog): wColor {...}{.inline, discardable, raises: [], tags: [].}
-
Shows the dialog in modal mode, returning the user-selected color or -1.