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