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