]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/colourdata.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxColourData
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
11 This class holds a variety of information related to colour dialogs.
14 @category{cmndlg,data}
16 @see wxColour, wxColourDialog, @ref overview_cmndlg_colour
18 class wxColourData
: public wxObject
21 /// number of custom colours we store
28 Constructor. Initializes the custom colours to @c wxNullColour, the
29 @e data colour setting to black, and the @e choose full setting to
37 virtual ~wxColourData();
40 Under Windows, determines whether the Windows colour dialog will
41 display the full dialog with custom colour selection controls.
43 Has no meaning under other platforms.
45 The default value is @true.
47 bool GetChooseFull() const;
50 Gets the current colour associated with the colour dialog.
52 The default colour is black.
54 wxColour
& GetColour();
57 Returns custom colours associated with the colour dialog.
60 An integer between 0 and 15, being any of the 15 custom colours
61 that the user has saved. The default custom colours are invalid
64 wxColour
GetCustomColour(int i
) const;
67 Under Windows, tells the Windows colour dialog to display the full
68 dialog with custom colour selection controls. Under other platforms,
71 The default value is @true.
73 void SetChooseFull(bool flag
);
76 Sets the default colour for the colour dialog.
78 The default colour is black.
80 void SetColour(const wxColour
& colour
);
83 Sets custom colours for the colour dialog.
86 An integer between 0 and 15 for whatever custom colour you want to
87 set. The default custom colours are invalid colours.
91 void SetCustomColour(int i
, const wxColour
& colour
);
94 Converts the colours saved in this class in a string form, separating
95 the various colours with a comma.
97 wxString
ToString() const;
100 Decodes the given string, which should be in the same format returned
101 by ToString(), and sets the internal colours.
103 bool FromString(const wxString
& str
);
106 Assignment operator for the colour data.
108 wxColourData
& operator =(const wxColourData
& data
);