]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: colordlg.h | |
e54c96f1 | 3 | // Purpose: interface of wxColourDialog |
23324ae1 FM |
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 | |
968f15e2 BP |
18 | @see @ref overview_cmndlg_colour, wxColour, wxColourData, |
19 | wxGetColourFromUser() | |
23324ae1 FM |
20 | */ |
21 | class wxColourDialog : public wxDialog | |
22 | { | |
23 | public: | |
24 | /** | |
968f15e2 BP |
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). | |
3c4f71cc | 33 | |
4cc4bfaf | 34 | @see wxColourData |
23324ae1 | 35 | */ |
4cc4bfaf | 36 | wxColourDialog(wxWindow* parent, wxColourData* data = NULL); |
23324ae1 FM |
37 | |
38 | /** | |
39 | Destructor. | |
40 | */ | |
41 | ~wxColourDialog(); | |
42 | ||
43 | /** | |
968f15e2 | 44 | Same as wxColourDialog(). |
23324ae1 | 45 | */ |
4cc4bfaf | 46 | bool Create(wxWindow* parent, wxColourData* data = NULL); |
23324ae1 FM |
47 | |
48 | /** | |
968f15e2 | 49 | Returns the colour data associated with the colour dialog. |
23324ae1 FM |
50 | */ |
51 | wxColourData GetColourData(); | |
52 | ||
53 | /** | |
968f15e2 BP |
54 | Shows the dialog, returning wxID_OK if the user pressed OK, and |
55 | wxID_CANCEL otherwise. | |
23324ae1 FM |
56 | */ |
57 | int ShowModal(); | |
58 | }; | |
59 | ||
60 | ||
e54c96f1 | 61 | |
23324ae1 FM |
62 | // ============================================================================ |
63 | // Global functions/macros | |
64 | // ============================================================================ | |
65 | ||
ba2874ff BP |
66 | /** @ingroup group_funcmacro_dialog */ |
67 | //@{ | |
68 | ||
23324ae1 | 69 | /** |
ba2874ff BP |
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. | |
7c913512 FM |
73 | |
74 | @param parent | |
ba2874ff | 75 | The parent window for the colour selection dialog. |
7c913512 | 76 | @param colInit |
4cc4bfaf | 77 | If given, this will be the colour initially selected in the dialog. |
7c913512 | 78 | @param caption |
4cc4bfaf | 79 | If given, this will be used for the dialog caption. |
7c913512 | 80 | @param data |
ba2874ff BP |
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} | |
23324ae1 | 86 | */ |
4cc4bfaf | 87 | wxColour wxGetColourFromUser(wxWindow* parent, |
23324ae1 FM |
88 | const wxColour& colInit, |
89 | const wxString& caption = wxEmptyString, | |
4cc4bfaf | 90 | wxColourData* data = NULL); |
23324ae1 | 91 | |
ba2874ff BP |
92 | //@} |
93 |