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