1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defining "stock" GDI objects
7 // Created: 13-Sept-2003
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
20 // See also wxPy_ReinitStockObjects in helpers.cpp
24 wxFont* const wxNORMAL_FONT;
25 wxFont* const wxSMALL_FONT;
26 wxFont* const wxITALIC_FONT;
27 wxFont* const wxSWISS_FONT;
29 wxPen* const wxRED_PEN;
30 wxPen* const wxCYAN_PEN;
31 wxPen* const wxGREEN_PEN;
32 wxPen* const wxBLACK_PEN;
33 wxPen* const wxWHITE_PEN;
34 wxPen* const wxTRANSPARENT_PEN;
35 wxPen* const wxBLACK_DASHED_PEN;
36 wxPen* const wxGREY_PEN;
37 wxPen* const wxMEDIUM_GREY_PEN;
38 wxPen* const wxLIGHT_GREY_PEN;
40 wxBrush* const wxBLUE_BRUSH;
41 wxBrush* const wxGREEN_BRUSH;
42 wxBrush* const wxWHITE_BRUSH;
43 wxBrush* const wxBLACK_BRUSH;
44 wxBrush* const wxTRANSPARENT_BRUSH;
45 wxBrush* const wxCYAN_BRUSH;
46 wxBrush* const wxRED_BRUSH;
47 wxBrush* const wxGREY_BRUSH;
48 wxBrush* const wxMEDIUM_GREY_BRUSH;
49 wxBrush* const wxLIGHT_GREY_BRUSH;
51 wxColour* const wxBLACK;
52 wxColour* const wxWHITE;
53 wxColour* const wxRED;
54 wxColour* const wxBLUE;
55 wxColour* const wxGREEN;
56 wxColour* const wxCYAN;
57 wxColour* const wxLIGHT_GREY;
59 wxCursor* const wxSTANDARD_CURSOR;
60 wxCursor* const wxHOURGLASS_CURSOR;
61 wxCursor* const wxCROSS_CURSOR;
64 const wxBitmap wxNullBitmap;
65 const wxIcon wxNullIcon;
66 const wxCursor wxNullCursor;
67 const wxPen wxNullPen;
68 const wxBrush wxNullBrush;
69 const wxPalette wxNullPalette;
70 const wxFont wxNullFont;
71 const wxColour wxNullColour;
77 //---------------------------------------------------------------------------
79 class wxPenList : public wxObject {
82 void AddPen(wxPen* pen);
83 wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
84 void RemovePen(wxPen* pen);
90 //---------------------------------------------------------------------------
92 class wxBrushList : public wxObject {
95 void AddBrush(wxBrush *brush);
96 wxBrush * FindOrCreateBrush(const wxColour& colour, int style=wxSOLID);
97 void RemoveBrush(wxBrush *brush);
102 //---------------------------------------------------------------------------
104 MustHaveApp(wxColourDatabase);
106 class wxColourDatabase : public wxObject {
111 // find colour by name or name for the given colour
112 wxColour Find(const wxString& name) const;
113 wxString FindName(const wxColour& colour) const;
114 %pythoncode { FindColour = Find }
116 // add a new colour to the database
117 void AddColour(const wxString& name, const wxColour& colour);
120 void Append(const wxString& name, int red, int green, int blue) {
121 self->AddColour(name, wxColour(red, green, blue));
126 //---------------------------------------------------------------------------
128 class wxFontList : public wxObject {
131 void AddFont(wxFont* font);
132 wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
133 bool underline = false, const wxString& facename = wxPyEmptyString,
134 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
135 void RemoveFont(wxFont *font);
140 //---------------------------------------------------------------------------
145 // See also wxPy_ReinitStockObjects in helpers.cpp
148 wxFontList* const wxTheFontList;
149 wxPenList* const wxThePenList;
150 wxBrushList* const wxTheBrushList;
151 wxColourDatabase* const wxTheColourDatabase;
156 //---------------------------------------------------------------------------
158 %pythoncode { NullColor = NullColour }