]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_stockobjs.i
wx.App
[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
9e58eb56
RD
83// %typemap(varout) wxFont* {
84// // my typemap
85// $result = SWIG_NewPointerObj((void *) $1, $1_descriptor, 0);
86// }
87
d14a1e28
RD
88
89// See also wxPy_ReinitStockObjects in helpers.cpp
90%immutable;
91
92wxFont* const wxNORMAL_FONT;
93wxFont* const wxSMALL_FONT;
94wxFont* const wxITALIC_FONT;
95wxFont* const wxSWISS_FONT;
96
97wxPen* const wxRED_PEN;
98wxPen* const wxCYAN_PEN;
99wxPen* const wxGREEN_PEN;
100wxPen* const wxBLACK_PEN;
101wxPen* const wxWHITE_PEN;
102wxPen* const wxTRANSPARENT_PEN;
103wxPen* const wxBLACK_DASHED_PEN;
104wxPen* const wxGREY_PEN;
105wxPen* const wxMEDIUM_GREY_PEN;
106wxPen* const wxLIGHT_GREY_PEN;
107
108wxBrush* const wxBLUE_BRUSH;
109wxBrush* const wxGREEN_BRUSH;
110wxBrush* const wxWHITE_BRUSH;
111wxBrush* const wxBLACK_BRUSH;
112wxBrush* const wxTRANSPARENT_BRUSH;
113wxBrush* const wxCYAN_BRUSH;
114wxBrush* const wxRED_BRUSH;
115wxBrush* const wxGREY_BRUSH;
116wxBrush* const wxMEDIUM_GREY_BRUSH;
117wxBrush* const wxLIGHT_GREY_BRUSH;
118
119wxColour* const wxBLACK;
120wxColour* const wxWHITE;
121wxColour* const wxRED;
122wxColour* const wxBLUE;
123wxColour* const wxGREEN;
124wxColour* const wxCYAN;
125wxColour* const wxLIGHT_GREY;
126
127wxCursor* const wxSTANDARD_CURSOR;
128wxCursor* const wxHOURGLASS_CURSOR;
129wxCursor* const wxCROSS_CURSOR;
130
131
132const wxBitmap wxNullBitmap;
133const wxIcon wxNullIcon;
134const wxCursor wxNullCursor;
135const wxPen wxNullPen;
136const wxBrush wxNullBrush;
137const wxPalette wxNullPalette;
138const wxFont wxNullFont;
139const wxColour wxNullColour;
140
141
142wxFontList* const wxTheFontList;
143wxPenList* const wxThePenList;
144wxBrushList* const wxTheBrushList;
145wxColourDatabase* const wxTheColourDatabase;
146
147%mutable;
148
149
150//---------------------------------------------------------------------------
151