Updates for wxColourDatabase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -487,20 +487,19 @@ public:
|
|||||||
class wxColourDatabase : public wxObject {
|
class wxColourDatabase : public wxObject {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxColour *FindColour(const wxString& colour) ;
|
wxColourDatabase();
|
||||||
wxColour *FindColourNoAdd(const wxString& colour) const;
|
~wxColourDatabase();
|
||||||
|
|
||||||
|
// find colour by name or name for the given colour
|
||||||
|
wxColour Find(const wxString& name) const;
|
||||||
wxString FindName(const wxColour& colour) const;
|
wxString FindName(const wxColour& colour) const;
|
||||||
|
|
||||||
%addmethods {
|
// add a new colour to the database
|
||||||
void AddColour(const wxString& name, wxColour* colour) {
|
void AddColour(const wxString& name, const wxColour& colour);
|
||||||
// make a copy since the python one will be GC'd
|
|
||||||
wxColour* c = new wxColour(*colour);
|
|
||||||
self->AddColour(name, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
%addmethods {
|
||||||
void Append(const wxString& name, int red, int green, int blue) {
|
void Append(const wxString& name, int red, int green, int blue) {
|
||||||
wxColour* c = new wxColour(red, green, blue);
|
self->AddColour(name, wxColour(red, green, blue));
|
||||||
self->AddColour(name, c);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user