1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions for the wxWindows Object Graphics Library
7 // Created: 27-Aug-1999
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
14 //---------------------------------------------------------------------------
17 class wxOGLConstraint;
22 class wxCompositeShape;
24 class wxDivisionShape;
28 class wxRectangleShape;
29 class wxPseudoMetaFile;
32 class wxShapeEvtHandler;
36 class wxPyOGLConstraint;
37 class wxPyBitmapShape;
40 class wxPyCircleShape;
41 class wxPyCompositeShape;
42 class wxPyDividedShape;
43 class wxPyDivisionShape;
44 class wxPyEllipseShape;
46 class wxPyPolygonShape;
47 class wxPyRectangleShape;
48 class wxPyPseudoMetaFile;
50 class wxPyShapeCanvas;
51 class wxPyShapeEvtHandler;
53 class wxPyControlPoint;
56 //---------------------------------------------------------------------------
57 // Typemaps just for OGL
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); }
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...
76 %typemap(python, in) wxPen* {
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.");
86 $target = wxThePenList->FindOrCreatePen(temp->GetColour(),
93 %typemap(python, in) wxBrush* {
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.");
103 $target = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
109 %typemap(python, in) wxFont* {
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.");
119 $target = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
123 temp->GetUnderlined(),
125 temp->GetEncoding());
131 //---------------------------------------------------------------------------
132 //---------------------------------------------------------------------------