]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_stockobjs.i
reSWIGged
[wxWidgets.git] / wxPython / src / _stockobjs.i
CommitLineData
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
20class wxPenList : public wxObject {
21public:
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
33class wxBrushList : public wxObject {
34public:
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
45class wxColourDatabase : public wxObject {
46public:
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
67class wxFontList : public wxObject {
68public:
69
70 void AddFont(wxFont* font);
71 wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
dd9f7fea 72 bool underline = False, const wxString& facename = wxPyEmptyString,
d14a1e28
RD
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
87wxFont* const wxNORMAL_FONT;
88wxFont* const wxSMALL_FONT;
89wxFont* const wxITALIC_FONT;
90wxFont* const wxSWISS_FONT;
91
92wxPen* const wxRED_PEN;
93wxPen* const wxCYAN_PEN;
94wxPen* const wxGREEN_PEN;
95wxPen* const wxBLACK_PEN;
96wxPen* const wxWHITE_PEN;
97wxPen* const wxTRANSPARENT_PEN;
98wxPen* const wxBLACK_DASHED_PEN;
99wxPen* const wxGREY_PEN;
100wxPen* const wxMEDIUM_GREY_PEN;
101wxPen* const wxLIGHT_GREY_PEN;
102
103wxBrush* const wxBLUE_BRUSH;
104wxBrush* const wxGREEN_BRUSH;
105wxBrush* const wxWHITE_BRUSH;
106wxBrush* const wxBLACK_BRUSH;
107wxBrush* const wxTRANSPARENT_BRUSH;
108wxBrush* const wxCYAN_BRUSH;
109wxBrush* const wxRED_BRUSH;
110wxBrush* const wxGREY_BRUSH;
111wxBrush* const wxMEDIUM_GREY_BRUSH;
112wxBrush* const wxLIGHT_GREY_BRUSH;
113
114wxColour* const wxBLACK;
115wxColour* const wxWHITE;
116wxColour* const wxRED;
117wxColour* const wxBLUE;
118wxColour* const wxGREEN;
119wxColour* const wxCYAN;
120wxColour* const wxLIGHT_GREY;
121
122wxCursor* const wxSTANDARD_CURSOR;
123wxCursor* const wxHOURGLASS_CURSOR;
124wxCursor* const wxCROSS_CURSOR;
125
126
127const wxBitmap wxNullBitmap;
128const wxIcon wxNullIcon;
129const wxCursor wxNullCursor;
130const wxPen wxNullPen;
131const wxBrush wxNullBrush;
132const wxPalette wxNullPalette;
133const wxFont wxNullFont;
134const wxColour wxNullColour;
135
136
137wxFontList* const wxTheFontList;
138wxPenList* const wxThePenList;
139wxBrushList* const wxTheBrushList;
140wxColourDatabase* const wxTheColourDatabase;
141
142%mutable;
143
144
145//---------------------------------------------------------------------------
146