]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: _stockobjs.i | |
3 | // Purpose: SWIG interface defining "stock" GDI objects | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 13-Sept-2003 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 2003 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | // Not a %module | |
14 | ||
15 | ||
16 | //--------------------------------------------------------------------------- | |
17 | %newgroup | |
18 | ||
19 | ||
20 | class wxPenList : public wxObject { | |
21 | public: | |
22 | ||
23 | void AddPen(wxPen* pen); | |
24 | wxPen* FindOrCreatePen(const wxColour& colour, int width, int style); | |
25 | void RemovePen(wxPen* pen); | |
26 | ||
27 | int GetCount(); | |
28 | }; | |
29 | ||
30 | ||
31 | //--------------------------------------------------------------------------- | |
32 | ||
33 | class wxBrushList : public wxObject { | |
34 | public: | |
35 | ||
36 | void AddBrush(wxBrush *brush); | |
37 | wxBrush * FindOrCreateBrush(const wxColour& colour, int style); | |
38 | void RemoveBrush(wxBrush *brush); | |
39 | ||
40 | int GetCount(); | |
41 | }; | |
42 | ||
43 | //--------------------------------------------------------------------------- | |
44 | ||
45 | class wxColourDatabase : public wxObject { | |
46 | public: | |
47 | wxColourDatabase(); | |
48 | ~wxColourDatabase(); | |
49 | ||
50 | // find colour by name or name for the given colour | |
51 | wxColour Find(const wxString& name) const; | |
52 | wxString FindName(const wxColour& colour) const; | |
53 | %pythoncode { FindColour = Find } | |
54 | ||
55 | // add a new colour to the database | |
56 | void AddColour(const wxString& name, const wxColour& colour); | |
57 | ||
58 | %extend { | |
59 | void Append(const wxString& name, int red, int green, int blue) { | |
60 | self->AddColour(name, wxColour(red, green, blue)); | |
61 | } | |
62 | } | |
63 | }; | |
64 | ||
65 | //--------------------------------------------------------------------------- | |
66 | ||
67 | class wxFontList : public wxObject { | |
68 | public: | |
69 | ||
70 | void AddFont(wxFont* font); | |
71 | wxFont * FindOrCreateFont(int point_size, int family, int style, int weight, | |
72 | bool underline = FALSE, const wxString& facename = wxPyEmptyString, | |
73 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
74 | void RemoveFont(wxFont *font); | |
75 | ||
76 | int GetCount(); | |
77 | }; | |
78 | ||
79 | //--------------------------------------------------------------------------- | |
80 | %newgroup | |
81 | ||
82 | ||
83 | ||
84 | // See also wxPy_ReinitStockObjects in helpers.cpp | |
85 | %immutable; | |
86 | ||
87 | wxFont* const wxNORMAL_FONT; | |
88 | wxFont* const wxSMALL_FONT; | |
89 | wxFont* const wxITALIC_FONT; | |
90 | wxFont* const wxSWISS_FONT; | |
91 | ||
92 | wxPen* const wxRED_PEN; | |
93 | wxPen* const wxCYAN_PEN; | |
94 | wxPen* const wxGREEN_PEN; | |
95 | wxPen* const wxBLACK_PEN; | |
96 | wxPen* const wxWHITE_PEN; | |
97 | wxPen* const wxTRANSPARENT_PEN; | |
98 | wxPen* const wxBLACK_DASHED_PEN; | |
99 | wxPen* const wxGREY_PEN; | |
100 | wxPen* const wxMEDIUM_GREY_PEN; | |
101 | wxPen* const wxLIGHT_GREY_PEN; | |
102 | ||
103 | wxBrush* const wxBLUE_BRUSH; | |
104 | wxBrush* const wxGREEN_BRUSH; | |
105 | wxBrush* const wxWHITE_BRUSH; | |
106 | wxBrush* const wxBLACK_BRUSH; | |
107 | wxBrush* const wxTRANSPARENT_BRUSH; | |
108 | wxBrush* const wxCYAN_BRUSH; | |
109 | wxBrush* const wxRED_BRUSH; | |
110 | wxBrush* const wxGREY_BRUSH; | |
111 | wxBrush* const wxMEDIUM_GREY_BRUSH; | |
112 | wxBrush* const wxLIGHT_GREY_BRUSH; | |
113 | ||
114 | wxColour* const wxBLACK; | |
115 | wxColour* const wxWHITE; | |
116 | wxColour* const wxRED; | |
117 | wxColour* const wxBLUE; | |
118 | wxColour* const wxGREEN; | |
119 | wxColour* const wxCYAN; | |
120 | wxColour* const wxLIGHT_GREY; | |
121 | ||
122 | wxCursor* const wxSTANDARD_CURSOR; | |
123 | wxCursor* const wxHOURGLASS_CURSOR; | |
124 | wxCursor* const wxCROSS_CURSOR; | |
125 | ||
126 | ||
127 | const wxBitmap wxNullBitmap; | |
128 | const wxIcon wxNullIcon; | |
129 | const wxCursor wxNullCursor; | |
130 | const wxPen wxNullPen; | |
131 | const wxBrush wxNullBrush; | |
132 | const wxPalette wxNullPalette; | |
133 | const wxFont wxNullFont; | |
134 | const wxColour wxNullColour; | |
135 | ||
136 | ||
137 | wxFontList* const wxTheFontList; | |
138 | wxPenList* const wxThePenList; | |
139 | wxBrushList* const wxTheBrushList; | |
140 | wxColourDatabase* const wxTheColourDatabase; | |
141 | ||
142 | %mutable; | |
143 | ||
144 | ||
145 | //--------------------------------------------------------------------------- | |
146 |