wxcolourdatabasewxwidgets maintains a database of standard rgb colours for a predefined set of named colours (such as "black'', "light grey''). the application may add to this set if desired by using addcolour and may use it to look up colours by names using find or find the names for the standard colour suing findname. there is one predefined instance of this class called wxthecolourdatabase. derived from none include files <wx/gdicmn.h> remarks the standard database contains at least the following colours: aquamarine, black, blue, blue violet, brown, cadet blue, coral, cornflower blue, cyan, dark grey, dark green, dark olive green, dark orchid, dark slate blue, dark slate grey dark turquoise, dim grey, firebrick, forest green, gold, goldenrod, grey, green, green yellow, indian red, khaki, light blue, light grey, light steel blue, lime green, magenta, maroon, medium aquamarine, medium blue, medium forest green, medium goldenrod, medium orchid, medium sea green, medium slate blue, medium spring green, medium turquoise, medium violet red, midnight blue, navy, orange, orange red, orchid, pale green, pink, plum, purple, red, salmon, sea green, sienna, sky blue, slate blue, spring green, steel blue, tan, thistle, turquoise, violet, violet red, wheat, white, yellow, yellow green. see also members
wxcolourdatabase::wxcolourdatabase
wxcolourdatabase::wxcolourdatabasewxcolourdatabase() constructs the colour database. it will be initialized at the first use.
wxcolourdatabase::addcolourvoid addcolour(const wxstring& colourname, const wxcolour&colour) void addcolour(const wxstring& colourname, wxcolour* colour) adds a colour to the database. if a colour with the same name already exists, it is replaced. please note that the overload taking a pointer is deprecated and will be removed in the next wxwidgets version, please don't use it.
wxcolourdatabase::findwxcolour find(const wxstring& colourname) finds a colour given the name. returns an invalid colour object (that is, such that its ok() method returns false) if the colour wasn't found in the database.
wxcolourdatabase::findnamewxstring findname(const wxcolour& colour) const finds a colour name given the colour. returns an empty string if the colour is not found in the database.
|