]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: colordlg.h | |
3 | // Purpose: documentation for wxColourDialog class | |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxColourDialog | |
11 | @wxheader{colordlg.h} | |
7c913512 | 12 | |
23324ae1 | 13 | This class represents the colour chooser dialog. |
7c913512 | 14 | |
23324ae1 FM |
15 | @library{wxcore} |
16 | @category{cmndlg} | |
7c913512 | 17 | |
23324ae1 FM |
18 | @seealso |
19 | @ref overview_wxcolourdialogoverview "wxColourDialog Overview", wxColour, | |
20 | wxColourData, wxGetColourFromUser | |
21 | */ | |
22 | class wxColourDialog : public wxDialog | |
23 | { | |
24 | public: | |
25 | /** | |
26 | Constructor. Pass a parent window, and optionally a pointer to a block of colour | |
27 | data, which will be copied to the colour dialog's colour data. Custom | |
28 | colours from colour data object will be be used in dialog's colour palette. | |
29 | Invalid entries in custom colours list will be ignored on some platforms (GTK) | |
30 | or replaced with white colour on platforms where custom colours palette has | |
31 | fixed size (MSW). | |
32 | ||
33 | @sa wxColourData | |
34 | */ | |
35 | wxColourDialog(wxWindow* parent, wxColourData* data = @NULL); | |
36 | ||
37 | /** | |
38 | Destructor. | |
39 | */ | |
40 | ~wxColourDialog(); | |
41 | ||
42 | /** | |
43 | Same as @ref ctor() constructor. | |
44 | */ | |
45 | bool Create(wxWindow* parent, wxColourData* data = @NULL); | |
46 | ||
47 | /** | |
48 | Returns the @ref overview_wxcolourdata "colour data" associated with the colour | |
49 | dialog. | |
50 | */ | |
51 | wxColourData GetColourData(); | |
52 | ||
53 | /** | |
54 | Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL | |
55 | otherwise. | |
56 | */ | |
57 | int ShowModal(); | |
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. | |
7c913512 FM |
69 | |
70 | @param parent | |
23324ae1 | 71 | The parent window for the colour selection dialog |
7c913512 FM |
72 | |
73 | @param colInit | |
23324ae1 | 74 | If given, this will be the colour initially selected in the dialog. |
7c913512 FM |
75 | |
76 | @param caption | |
23324ae1 | 77 | If given, this will be used for the dialog caption. |
7c913512 FM |
78 | |
79 | @param data | |
23324ae1 FM |
80 | Optional object storing additional colour dialog settings, such |
81 | as custom colours. If none is provided the same settings as the last time are | |
82 | used. | |
83 | */ | |
84 | wxColour wxGetColourFromUser(wxWindow * parent, | |
85 | const wxColour& colInit, | |
86 | const wxString& caption = wxEmptyString, | |
87 | wxColourData * data = @NULL); | |
88 |