]> git.saurik.com Git - wxWidgets.git/blob - interface/colordlg.h
fixed wxMac compilation after ShowWithEffect() changes; also fixed to use correct...
[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_cmndlg_colour, wxColour, wxColourData,
19 wxGetColourFromUser()
20 */
21 class wxColourDialog : public wxDialog
22 {
23 public:
24 /**
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
27 data.
28
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).
33
34 @see wxColourData
35 */
36 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
37
38 /**
39 Destructor.
40 */
41 ~wxColourDialog();
42
43 /**
44 Same as wxColourDialog().
45 */
46 bool Create(wxWindow* parent, wxColourData* data = NULL);
47
48 /**
49 Returns the colour data associated with the colour dialog.
50 */
51 wxColourData GetColourData();
52
53 /**
54 Shows the dialog, returning wxID_OK if the user pressed OK, and
55 wxID_CANCEL otherwise.
56 */
57 int ShowModal();
58 };
59
60
61
62 // ============================================================================
63 // Global functions/macros
64 // ============================================================================
65
66 /** @ingroup group_funcmacro_dialog */
67 //@{
68
69 /**
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.
73
74 @param parent
75 The parent window for the colour selection dialog.
76 @param colInit
77 If given, this will be the colour initially selected in the dialog.
78 @param caption
79 If given, this will be used for the dialog caption.
80 @param data
81 Optional object storing additional colour dialog settings, such as
82 custom colours. If none is provided the same settings as the last time
83 are used.
84
85 @header{wx/colordlg.h}
86 */
87 wxColour wxGetColourFromUser(wxWindow* parent,
88 const wxColour& colInit,
89 const wxString& caption = wxEmptyString,
90 wxColourData* data = NULL);
91
92 //@}
93