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