]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/colordlg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxColourDialog
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 This class represents the colour chooser dialog.
17 @see @ref overview_cmndlg_colour, wxColour, wxColourData,
20 class wxColourDialog
: public wxDialog
24 Constructor. Pass a parent window, and optionally a pointer to a block
25 of colour data, which will be copied to the colour dialog's colour
28 Custom colours from colour data object will be be used in the dialog's
29 colour palette. Invalid entries in custom colours list will be ignored
30 on some platforms(GTK) or replaced with white colour on platforms where
31 custom colours palette has fixed size (MSW).
35 wxColourDialog(wxWindow
* parent
, wxColourData
* data
= NULL
);
43 Same as wxColourDialog().
45 bool Create(wxWindow
* parent
, wxColourData
* data
= NULL
);
48 Returns the colour data associated with the colour dialog.
50 wxColourData
GetColourData();
53 Shows the dialog, returning wxID_OK if the user pressed OK, and
54 wxID_CANCEL otherwise.
61 // ============================================================================
62 // Global functions/macros
63 // ============================================================================
65 /** @ingroup group_funcmacro_dialog */
69 Shows the colour selection dialog and returns the colour selected by user
70 or invalid colour (use wxColour::IsOk() to test whether a colour is valid)
71 if the dialog was cancelled.
74 The parent window for the colour selection dialog.
76 If given, this will be the colour initially selected in the dialog.
78 If given, this will be used for the dialog caption.
80 Optional object storing additional colour dialog settings, such as
81 custom colours. If none is provided the same settings as the last time
84 @header{wx/colordlg.h}
86 wxColour
wxGetColourFromUser(wxWindow
* parent
,
87 const wxColour
& colInit
,
88 const wxString
& caption
= wxEmptyString
,
89 wxColourData
* data
= NULL
);