]> git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/ogl/_ogldefs.i
Patch [ 1314868 ] [wxMSW] Show MDI child menubars when ShowFullScreen(false)
[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 // Typemaps just for OGL
16
17
18 // OOR Support
19 %typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
20 %typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
21 %typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
22
23 %typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1, $owner); }
24 %typemap(out) wxDiagram* { $result = wxPyMake_wxObject($1, $owner); }
25 %typemap(out) wxOGLConstraint* { $result = wxPyMake_wxObject($1, $owner); }
26 %typemap(out) wxPseudoMetaFile* { $result = wxPyMake_wxObject($1, $owner); }
27 %typemap(out) wxArrowHead* { $result = wxPyMake_wxObject($1, $owner); }
28
29
30
31
32 // wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll
33 // use the pen and brush lists to simulate that...
34
35 %typemap(in) wxPen* {
36 wxPen* temp;
37 if ($input) {
38 if ($input == Py_None) { temp = NULL; }
39 else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxPen"))) {
40 PyErr_SetString(PyExc_TypeError, "Type error, expected wxPen.");
41 return NULL;
42 }
43 }
44 if (temp)
45 $1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
46 temp->GetWidth(),
47 temp->GetStyle());
48 else
49 $1 = NULL;
50 }
51
52 %typemap(in) wxBrush* {
53 wxBrush* temp;
54 if ($input) {
55 if ($input == Py_None) { temp = NULL; }
56 else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxBrush"))) {
57 PyErr_SetString(PyExc_TypeError, "Type error, expected wxBrush.");
58 return NULL;
59 }
60 }
61 if (temp)
62 $1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
63 else
64 $1 = NULL;
65 }
66
67
68 %typemap(in) wxFont* {
69 wxFont* temp;
70 if ($input) {
71 if ($input == Py_None) { temp = NULL; }
72 else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxFont"))) {
73 PyErr_SetString(PyExc_TypeError, "Type error, expected wxFont.");
74 return NULL;
75 }
76 }
77 if (temp)
78 $1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
79 temp->GetFamily(),
80 temp->GetStyle(),
81 temp->GetWeight(),
82 temp->GetUnderlined(),
83 temp->GetFaceName(),
84 temp->GetEncoding());
85 else
86 $1 = NULL;
87 }
88
89
90 //---------------------------------------------------------------------------
91 //---------------------------------------------------------------------------
92
93
94
95
96