]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/colourdata.h
Update documentation for new library name.
[wxWidgets.git] / interface / wx / colourdata.h
CommitLineData
4608b3f8
PC
1/////////////////////////////////////////////////////////////////////////////
2// Name: colourdata.h
3// Purpose: interface of wxColourData
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxColourData
11
12 This class holds a variety of information related to colour dialogs.
13
14 @library{wxcore}
15 @category{cmndlg,data}
16
17 @see wxColour, wxColourDialog, @ref overview_cmndlg_colour
18*/
19class wxColourData : public wxObject
20{
21public:
22 /**
23 Constructor. Initializes the custom colours to @c wxNullColour, the
24 @e data colour setting to black, and the @e choose full setting to
25 @true.
26 */
27 wxColourData();
28
29 /**
30 Destructor.
31 */
32 virtual ~wxColourData();
33
34 /**
35 Under Windows, determines whether the Windows colour dialog will
36 display the full dialog with custom colour selection controls. Under
37 PalmOS, determines whether colour dialog will display full rgb colour
38 picker or only available palette indexer. Has no meaning under other
39 platforms.
40
41 The default value is @true.
42 */
43 bool GetChooseFull() const;
44
45 /**
46 Gets the current colour associated with the colour dialog.
47
48 The default colour is black.
49 */
50 wxColour& GetColour();
51
52 /**
53 Returns custom colours associated with the colour dialog.
54
55 @param i
56 An integer between 0 and 15, being any of the 15 custom colours
57 that the user has saved. The default custom colours are invalid
58 colours.
59 */
60 wxColour GetCustomColour(int i) const;
61
62 /**
63 Under Windows, tells the Windows colour dialog to display the full
64 dialog with custom colour selection controls. Under other platforms,
65 has no effect.
66
67 The default value is @true.
68 */
69 void SetChooseFull(bool flag);
70
71 /**
72 Sets the default colour for the colour dialog.
73
74 The default colour is black.
75 */
76 void SetColour(const wxColour& colour);
77
78 /**
79 Sets custom colours for the colour dialog.
80
81 @param i
82 An integer between 0 and 15 for whatever custom colour you want to
83 set. The default custom colours are invalid colours.
84 @param colour
85 The colour to set
86 */
87 void SetCustomColour(int i, const wxColour& colour);
88
89 /**
d13b34d3 90 Converts the colours saved in this class in a string form, separating
4608b3f8
PC
91 the various colours with a comma.
92 */
93 wxString ToString() const;
94
95 /**
96 Decodes the given string, which should be in the same format returned
97 by ToString(), and sets the internal colours.
98 */
99 bool FromString(const wxString& str);
100
101 /**
102 Assignment operator for the colour data.
103 */
104 wxColourData& operator =(const wxColourData& data);
105};