]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/contrib/ogl/_ogldefs.i
Made metal theme a little faster.
[wxWidgets.git] / wxPython / contrib / ogl / _ogldefs.i
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: _ogldefs.i
3// Purpose: SWIG definitions for the wxWindows Object Graphics Library
4//
5// Author: Robin Dunn
6//
7// Created: 27-Aug-1999
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13
14//---------------------------------------------------------------------------
15
16
17class wxOGLConstraint;
18class wxBitmapShape;
19class wxDiagram;
20class wxDrawnShape;
21class wxCircleShape;
22class wxCompositeShape;
23class wxDividedShape;
24class wxDivisionShape;
25class wxEllipseShape;
26class wxLineShape;
27class wxPolygonShape;
28class wxRectangleShape;
29class wxPseudoMetaFile;
30class wxShape;
31class wxShapeCanvas;
32class wxShapeEvtHandler;
33class wxTextShape;
34class wxControlPoint;
35
36class wxPyOGLConstraint;
37class wxPyBitmapShape;
38class wxPyDiagram;
39class wxPyDrawnShape;
40class wxPyCircleShape;
41class wxPyCompositeShape;
42class wxPyDividedShape;
43class wxPyDivisionShape;
44class wxPyEllipseShape;
45class wxPyLineShape;
46class wxPyPolygonShape;
47class wxPyRectangleShape;
48class wxPyPseudoMetaFile;
49class wxPyShape;
50class wxPyShapeCanvas;
51class wxPyShapeEvtHandler;
52class wxPyTextShape;
53class wxPyControlPoint;
54
55
56//---------------------------------------------------------------------------
57// Typemaps just for OGL
58
59
60// OOR Support
61%typemap(python, out) wxPyShape* { $target = wxPyMake_wxShapeEvtHandler($source); }
62%typemap(python, out) wxPyShapeEvtHandler* { $target = wxPyMake_wxShapeEvtHandler($source); }
63%typemap(python, out) wxPyDivisionShape* { $target = wxPyMake_wxShapeEvtHandler($source); }
64
65%typemap(python, out) wxPyShapeCanvas* { $target = wxPyMake_wxObject($source); }
66%typemap(python, out) wxDiagram* { $target = wxPyMake_wxObject($source); }
67%typemap(python, out) wxOGLConstraint* { $target = wxPyMake_wxObject($source); }
68%typemap(python, out) wxPseudoMetaFile* { $target = wxPyMake_wxObject($source); }
69%typemap(python, out) wxArrowHead* { $target = wxPyMake_wxObject($source); }
70
71
72
73
74// wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll
75// use the pen and brush lists to simulate that...
76
77%typemap(python, in) wxPen* {
78 wxPen* temp;
79 if ($source) {
80 if ($source == Py_None) { temp = NULL; }
81 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxPen_p")) {
82 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
83 return NULL;
84 }
85 }
86 if (temp)
87 $target = wxThePenList->FindOrCreatePen(temp->GetColour(),
88 temp->GetWidth(),
89 temp->GetStyle());
90 else
91 $target = NULL;
92}
93
94%typemap(python, in) wxBrush* {
95 wxBrush* temp;
96 if ($source) {
97 if ($source == Py_None) { temp = NULL; }
98 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxBrush_p")) {
99 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
100 return NULL;
101 }
102 }
103 if (temp)
104 $target = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
105 else
106 $target = NULL;
107}
108
109
110%typemap(python, in) wxFont* {
111 wxFont* temp;
112 if ($source) {
113 if ($source == Py_None) { temp = NULL; }
114 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxFont_p")) {
115 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
116 return NULL;
117 }
118 }
119 if (temp)
120 $target = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
121 temp->GetFamily(),
122 temp->GetStyle(),
123 temp->GetWeight(),
124 temp->GetUnderlined(),
125 temp->GetFaceName(),
126 temp->GetEncoding());
127 else
128 $target = NULL;
129}
130
131
132//---------------------------------------------------------------------------
133//---------------------------------------------------------------------------
134
135
136
137
138