]> git.saurik.com Git - wxWidgets.git/blob - interface/colordlg.h
Catagorized all functions and macros belonging to the RTTI and Versioning groups.
[wxWidgets.git] / interface / colordlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: colordlg.h
3 // Purpose: interface of wxColourDialog
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxColourDialog
11 @wxheader{colordlg.h}
12
13 This class represents the colour chooser dialog.
14
15 @library{wxcore}
16 @category{cmndlg}
17
18 @see @ref overview_wxcolourdialogoverview "wxColourDialog Overview", wxColour,
19 wxColourData, wxGetColourFromUser()
20 */
21 class wxColourDialog : public wxDialog
22 {
23 public:
24 /**
25 Constructor. Pass a parent window, and optionally a pointer to a block of colour
26 data, which will be copied to the colour dialog's colour data. Custom
27 colours from colour data object will be be used in dialog's colour palette.
28 Invalid entries in custom colours list will be ignored on some platforms (GTK)
29 or replaced with white colour on platforms where custom colours palette has
30 fixed size (MSW).
31
32 @see wxColourData
33 */
34 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
35
36 /**
37 Destructor.
38 */
39 ~wxColourDialog();
40
41 /**
42 Same as @ref ctor() constructor.
43 */
44 bool Create(wxWindow* parent, wxColourData* data = NULL);
45
46 /**
47 Returns the @ref overview_wxcolourdata "colour data" associated with the colour
48 dialog.
49 */
50 wxColourData GetColourData();
51
52 /**
53 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
54 otherwise.
55 */
56 int ShowModal();
57 };
58
59
60
61 // ============================================================================
62 // Global functions/macros
63 // ============================================================================
64
65 /**
66 Shows the colour selection dialog and returns the colour selected by user or
67 invalid colour (use @ref wxColour::isok wxColour:IsOk to test whether a colour
68 is valid) if the dialog was cancelled.
69
70 @param parent
71 The parent window for the colour selection dialog
72 @param colInit
73 If given, this will be the colour initially selected in the dialog.
74 @param caption
75 If given, this will be used for the dialog caption.
76 @param data
77 Optional object storing additional colour dialog settings, such
78 as custom colours. If none is provided the same settings as the last time
79 are
80 used.
81 */
82 wxColour wxGetColourFromUser(wxWindow* parent,
83 const wxColour& colInit,
84 const wxString& caption = wxEmptyString,
85 wxColourData* data = NULL);
86