wColorDialog

This class represents the color chooser dialog. Only modal dialog is supported.

Superclass:wDialog
Styles:
StylesDescription
wCdFullOpenDisplays the full dialog with custom color selection controls.
wCdCenterCenters the window relative to it's owner.
wCdScreenCenterCenters the window on screen.
Events:wDialogEvent
wDialogEventDescription
wEvent_DialogCreatedWhen the dialog is created but not yet shown.
wEvent_DialogClosedWhen the dialog is being closed.
wEvent_DialogHelpWhen the Help button is pressed.

Consts

wCdFullOpen = 0x00000002
wCdCenter = 1152921504606846976
wCdScreenCenter = 2305843009213693952

Procs

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 final(self: wColorDialog) {...}{.raises: [], tags: [].}
Default finalizer for wColorDialog.
proc init(self: wColorDialog; owner: wWindow = nil; defaultColor = wBlack;
         style: wStyle = 0) {...}{.raises: [Exception, wCursorError, IndexError, wFontError],
                          tags: [RootEffect].}
Initializer.
proc ColorDialog(owner: wWindow = nil; defaultColor = wBlack; style: wStyle = 0): wColorDialog {...}{.
    inline, discardable,
    raises: [Exception, wCursorError, IndexError, 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.