]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/colourdata.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxColourData
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 This class holds a variety of information related to colour dialogs.
15 @category{cmndlg,data}
17 @see wxColour, wxColourDialog, @ref overview_cmndlg_colour
19 class wxColourData
: public wxObject
22 /// number of custom colours we store
29 Constructor. Initializes the custom colours to @c wxNullColour, the
30 @e data colour setting to black, and the @e choose full setting to
38 virtual ~wxColourData();
41 Under Windows, determines whether the Windows colour dialog will
42 display the full dialog with custom colour selection controls.
44 Has no meaning under other platforms.
46 The default value is @true.
48 bool GetChooseFull() const;
51 Gets the current colour associated with the colour dialog.
53 The default colour is black.
55 wxColour
& GetColour();
58 Returns custom colours associated with the colour dialog.
61 An integer between 0 and 15, being any of the 15 custom colours
62 that the user has saved. The default custom colours are invalid
65 wxColour
GetCustomColour(int i
) const;
68 Under Windows, tells the Windows colour dialog to display the full
69 dialog with custom colour selection controls. Under other platforms,
72 The default value is @true.
74 void SetChooseFull(bool flag
);
77 Sets the default colour for the colour dialog.
79 The default colour is black.
81 void SetColour(const wxColour
& colour
);
84 Sets custom colours for the colour dialog.
87 An integer between 0 and 15 for whatever custom colour you want to
88 set. The default custom colours are invalid colours.
92 void SetCustomColour(int i
, const wxColour
& colour
);
95 Converts the colours saved in this class in a string form, separating
96 the various colours with a comma.
98 wxString
ToString() const;
101 Decodes the given string, which should be in the same format returned
102 by ToString(), and sets the internal colours.
104 bool FromString(const wxString
& str
);
107 Assignment operator for the colour data.
109 wxColourData
& operator =(const wxColourData
& data
);