]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/ogl/_oglshapes.i
A clarification
[wxWidgets.git] / wxPython / contrib / ogl / _oglshapes.i
CommitLineData
e91a9dfc
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: oglshapes.i
3// Purpose: SWIG definitions for the wxWindows Object Graphics Library
4//
5// Author: Robin Dunn
6//
7// Created: 3-Sept-1999
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13
d14a1e28 14// not a %module
e91a9dfc 15
e91a9dfc
RD
16
17//---------------------------------------------------------------------------
7b443969
RD
18
19enum {
20 oglMETAFLAGS_OUTLINE,
21 oglMETAFLAGS_ATTACHMENTS
22};
23
e91a9dfc
RD
24//---------------------------------------------------------------------------
25//---------------------------------------------------------------------------
26
9416aa89 27class wxPseudoMetaFile : public wxObject {
e91a9dfc
RD
28public:
29 wxPseudoMetaFile();
30 ~wxPseudoMetaFile();
31
32 void Draw(wxDC& dc, double xoffset, double yoffset);
1e4a197e 33#ifdef wxUSE_PROLOGIO
e91a9dfc
RD
34 void WriteAttributes(wxExpr *clause, int whichAngle);
35 void ReadAttributes(wxExpr *clause, int whichAngle);
1e4a197e 36#endif
e91a9dfc
RD
37 void Clear();
38 void Copy(wxPseudoMetaFile& copy);
39 void Scale(double sx, double sy);
40 void ScaleTo(double w, double h);
41 void Translate(double x, double y);
42 void Rotate(double x, double y, double theta);
1e4a197e 43 bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
e91a9dfc 44 void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
3bd1e033 45 void CalculateSize(wxPyDrawnShape* shape);
e91a9dfc
RD
46
47 // **** fix these... is it even possible? these are lists of various GDI opperations (not the objects...)
48 // wxList& GetOutlineColours();
49 // wxList& GetFillColours();
50 // wxList& GetOps();
51
52 void SetRotateable(bool rot);
53 bool GetRotateable();
54 void SetSize(double w, double h);
55 void SetFillBrush(wxBrush* brush);
56 wxBrush* GetFillBrush();
57 void SetOutlinePen(wxPen* pen);
58 wxPen* GetOutlinePen();
59 void SetOutlineOp(int op);
60 int GetOutlineOp();
61
62
63 bool IsValid();
64 void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
65 void DrawRectangle(const wxRect& rect);
66 void DrawRoundedRectangle(const wxRect& rect, double radius);
67 void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
68 void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
69 void DrawEllipse(const wxRect& rect);
70 void DrawPoint(const wxPoint& pt);
71 void DrawText(const wxString& text, const wxPoint& pt);
eec92d76
RD
72 void DrawLines(int PCOUNT, wxPoint* points);
73 void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
74 void DrawSpline(int PCOUNT, wxPoint* points);
e91a9dfc
RD
75 void SetClippingRect(const wxRect& rect);
76 void DestroyClippingRect();
77 void SetPen(wxPen* pen, bool isOutline = FALSE);
78 void SetBrush(wxBrush* brush, bool isFill = FALSE);
79 void SetFont(wxFont* font);
80 void SetTextColour(const wxColour& colour);
81 void SetBackgroundColour(const wxColour& colour);
82 void SetBackgroundMode(int mode);
83};
84
85
86//---------------------------------------------------------------------------
87
88%{
b8be6cea
RD
89// Using this macro can sometimes provoke an Internal Compiler Error in MSVC
90// 6, so instead I'l just expand it out by hand...
91// WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
92
93 IMP_PYCALLBACK__ (wxPyRectangleShape, wxRectangleShape, OnDelete);
94 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDraw);
95 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawContents);
96 IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnDrawBranches);
97 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnMoveLinks);
98 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnErase);
99 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseContents);
100 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnHighlight);
101 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftClick);
102 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftDoubleClick);
103 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnRightClick);
104 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnSize);
105 IMP_PYCALLBACK_BOOL_DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePre);
106 IMP_PYCALLBACK__DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePost);
107 IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragLeft);
108 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragLeft);
109 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragLeft);
110 IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragRight);
111 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragRight);
112 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragRight);
113 IMP_PYCALLBACK__DC4DBL (wxPyRectangleShape, wxRectangleShape, OnDrawOutline);
114 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawControlPoints);
115 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseControlPoints);
116 IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnMoveLink);
117 IMP_PYCALLBACK__WXCPBOOL2DBL2INT(wxPyRectangleShape, wxRectangleShape, OnSizingDragLeft);
118 IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingBeginDragLeft);
119 IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingEndDragLeft);
120 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnBeginSize);
121 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnEndSize)
122
e91a9dfc
RD
123%}
124
125class wxPyRectangleShape : public wxPyShape {
126public:
2b9048c5 127 %pythonAppend wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)"
d14a1e28 128
e91a9dfc 129 wxPyRectangleShape(double width = 0.0, double height = 0.0);
0122b7e3 130 void _setCallbackInfo(PyObject* self, PyObject* _class);
e91a9dfc
RD
131
132 void SetCornerRadius(double radius);
e7726f5e
RD
133 double GetCornerRadius();
134
e91a9dfc
RD
135 void base_OnDelete();
136 void base_OnDraw(wxDC& dc);
137 void base_OnDrawContents(wxDC& dc);
138 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
139 void base_OnMoveLinks(wxDC& dc);
140 void base_OnErase(wxDC& dc);
141 void base_OnEraseContents(wxDC& dc);
142 void base_OnHighlight(wxDC& dc);
143 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
144 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
145 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
146 void base_OnSize(double x, double y);
dd9f7fea
RD
147 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
148 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
e91a9dfc
RD
149 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
150 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
151 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
152 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
153 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
154 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
155 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
156 void base_OnDrawControlPoints(wxDC& dc);
157 void base_OnEraseControlPoints(wxDC& dc);
dd9f7fea 158 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
2348eaee
RD
159 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
160 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
161 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
162 void base_OnBeginSize(double w, double h);
163 void base_OnEndSize(double w, double h);
164// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
165};
166
167//---------------------------------------------------------------------------
168
169%{
170 WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
171%}
172
173class wxPyControlPoint : public wxPyRectangleShape {
174public:
2b9048c5 175 %pythonAppend wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)"
d14a1e28 176
2348eaee
RD
177 wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
178 wxPyShape *object = NULL,
179 double size = 0.0, double the_xoffset = 0.0,
180 double the_yoffset = 0.0, int the_type = 0);
181
0122b7e3 182 void _setCallbackInfo(PyObject* self, PyObject* _class);
2348eaee
RD
183
184 void SetCornerRadius(double radius);
185
186 void base_OnDelete();
187 void base_OnDraw(wxDC& dc);
188 void base_OnDrawContents(wxDC& dc);
189 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
190 void base_OnMoveLinks(wxDC& dc);
191 void base_OnErase(wxDC& dc);
192 void base_OnEraseContents(wxDC& dc);
193 void base_OnHighlight(wxDC& dc);
194 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
195 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
196 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
197 void base_OnSize(double x, double y);
dd9f7fea
RD
198 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
199 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
2348eaee
RD
200 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
201 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
202 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
203 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
204 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
205 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
206 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
207 void base_OnDrawControlPoints(wxDC& dc);
208 void base_OnEraseControlPoints(wxDC& dc);
dd9f7fea 209 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
2348eaee
RD
210 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
211 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
212 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
213 void base_OnBeginSize(double w, double h);
214 void base_OnEndSize(double w, double h);
215// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
216};
217
218//---------------------------------------------------------------------------
219%{
220 WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape);
221%}
222
223
224class wxPyBitmapShape : public wxPyRectangleShape {
225public:
2b9048c5 226 %pythonAppend wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)"
d14a1e28 227
e91a9dfc
RD
228 wxPyBitmapShape();
229
0122b7e3 230 void _setCallbackInfo(PyObject* self, PyObject* _class);
e91a9dfc
RD
231
232 wxBitmap& GetBitmap();
233 wxString GetFilename();
234 void SetBitmap(const wxBitmap& bitmap);
235 void SetFilename(const wxString& filename);
236
237 void base_OnDelete();
238 void base_OnDraw(wxDC& dc);
239 void base_OnDrawContents(wxDC& dc);
240 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
241 void base_OnMoveLinks(wxDC& dc);
242 void base_OnErase(wxDC& dc);
243 void base_OnEraseContents(wxDC& dc);
244 void base_OnHighlight(wxDC& dc);
245 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
246 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
247 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
248 void base_OnSize(double x, double y);
dd9f7fea
RD
249 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
250 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
e91a9dfc
RD
251 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
252 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
253 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
254 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
255 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
256 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
257 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
258 void base_OnDrawControlPoints(wxDC& dc);
259 void base_OnEraseControlPoints(wxDC& dc);
dd9f7fea 260 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
2348eaee
RD
261 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
262 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
263 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
264 void base_OnBeginSize(double w, double h);
265 void base_OnEndSize(double w, double h);
266// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
267};
268
269//---------------------------------------------------------------------------
270%{
271 WXSHAPE_IMP_CALLBACKS(wxPyDrawnShape, wxDrawnShape);
272%}
273
274class wxPyDrawnShape : public wxPyRectangleShape {
275public:
2b9048c5 276 %pythonAppend wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)"
d14a1e28 277
e91a9dfc
RD
278 wxPyDrawnShape();
279
0122b7e3 280 void _setCallbackInfo(PyObject* self, PyObject* _class);
e91a9dfc
RD
281
282 void CalculateSize();
283 void DestroyClippingRect();
284 void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint,
285 const wxPoint& endPoint);
286 void DrawAtAngle(int angle);
287 void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
288 void DrawLine(const wxPoint& point1, const wxPoint& point2);
eec92d76 289 void DrawLines(int PCOUNT, wxPoint* points);
e91a9dfc 290 void DrawPoint(const wxPoint& point);
eec92d76 291 void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
e91a9dfc
RD
292 void DrawRectangle(const wxRect& rect);
293 void DrawRoundedRectangle(const wxRect& rect, double radius);
eec92d76 294 void DrawSpline(int PCOUNT, wxPoint* points);
e91a9dfc
RD
295 void DrawText(const wxString& text, const wxPoint& point);
296 int GetAngle();
297
298 wxPseudoMetaFile& GetMetaFile();
299
300 double GetRotation();
1e4a197e 301 bool LoadFromMetaFile(const wxString& filename);
e91a9dfc
RD
302 void Rotate(double x, double y, double theta);
303 void SetClippingRect(const wxRect& rect);
304 void SetDrawnBackgroundColour(const wxColour& colour);
305 void SetDrawnBackgroundMode(int mode);
306 void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE);
307 void SetDrawnFont(wxFont* font);
308 void SetDrawnPen(wxPen* pen, bool isOutline = FALSE);
309 void SetDrawnTextColour(const wxColour& colour);
310 void Scale(double sx, double sy);
311 void SetSaveToFile(bool save);
312 void Translate(double x, double y);
313
314
315 void base_OnDelete();
316 void base_OnDraw(wxDC& dc);
317 void base_OnDrawContents(wxDC& dc);
318 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
319 void base_OnMoveLinks(wxDC& dc);
320 void base_OnErase(wxDC& dc);
321 void base_OnEraseContents(wxDC& dc);
322 void base_OnHighlight(wxDC& dc);
323 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
324 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
325 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
326 void base_OnSize(double x, double y);
dd9f7fea
RD
327 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
328 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
e91a9dfc
RD
329 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
330 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
331 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
332 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
333 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
334 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
335 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
336 void base_OnDrawControlPoints(wxDC& dc);
337 void base_OnEraseControlPoints(wxDC& dc);
dd9f7fea 338 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
2348eaee
RD
339 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
340 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
341 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
342 void base_OnBeginSize(double w, double h);
343 void base_OnEndSize(double w, double h);
344// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
345
346};
347
348
349//---------------------------------------------------------------------------
350
9416aa89 351class wxOGLConstraint : public wxObject {
e91a9dfc
RD
352public:
353 //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
d14a1e28 354 %extend {
e91a9dfc 355 wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
d14a1e28 356 wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
e91a9dfc
RD
357 wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
358 delete list;
359 return rv;
360 }
361 }
9ae9011b
RD
362
363 //~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
e91a9dfc
RD
364
365 bool Evaluate();
366 void SetSpacing(double x, double y);
367 bool Equals(double a, double b);
368
369};
370
371
372
373//---------------------------------------------------------------------------
374
375%{
376 WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
377%}
378
379class wxPyCompositeShape : public wxPyRectangleShape {
380public:
2b9048c5 381 %pythonAppend wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)"
d14a1e28 382
e91a9dfc
RD
383 wxPyCompositeShape();
384
0122b7e3 385 void _setCallbackInfo(PyObject* self, PyObject* _class);
d14a1e28 386
e91a9dfc 387 void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
e91a9dfc
RD
388 wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
389
714d23b4 390
e91a9dfc
RD
391 //wxOGLConstraint * AddConstraint(int type,
392 // wxPyShape *constraining,
393 // wxList& constrained);
d14a1e28 394 %extend {
714d23b4
RD
395 wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
396 PyObject* constrained) {
d14a1e28 397 wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
714d23b4
RD
398 wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
399 delete list;
400 return rv;
401 }
402 }
e91a9dfc
RD
403
404 %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
405 wxPyShape *constraining,
406 wxPyShape *constrained);
407
408 void CalculateSize();
409 bool ContainsDivision(wxPyDivisionShape *division);
410 void DeleteConstraint(wxOGLConstraint *constraint);
411 void DeleteConstraintsInvolvingChild(wxPyShape *child);
412
413 // **** Needs an output typemap
414 //wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite);
415
416 wxPyShape * FindContainerImage();
417
418 // wxList& GetConstraints();
419 // wxList& GetDivisions();
d14a1e28 420 %extend {
e91a9dfc
RD
421 PyObject* GetConstraints() {
422 wxList& list = self->GetConstraints();
d14a1e28 423 return wxPy_ConvertList(&list);
e91a9dfc
RD
424 }
425
426 PyObject* GetDivisions() {
427 wxList& list = self->GetDivisions();
d14a1e28 428 return wxPy_ConvertShapeList(&list);
e91a9dfc
RD
429 }
430 }
431
432 void MakeContainer();
433 bool Recompute();
434 void RemoveChild(wxPyShape *child);
435
436
437 void base_OnDelete();
438 void base_OnDraw(wxDC& dc);
439 void base_OnDrawContents(wxDC& dc);
440 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
441 void base_OnMoveLinks(wxDC& dc);
442 void base_OnErase(wxDC& dc);
443 void base_OnEraseContents(wxDC& dc);
444 void base_OnHighlight(wxDC& dc);
445 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
446 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
447 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
448 void base_OnSize(double x, double y);
dd9f7fea
RD
449 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
450 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
e91a9dfc
RD
451 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
452 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
453 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
454 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
455 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
456 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
457 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
458 void base_OnDrawControlPoints(wxDC& dc);
459 void base_OnEraseControlPoints(wxDC& dc);
dd9f7fea 460 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
2348eaee
RD
461 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
462 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
463 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
464 void base_OnBeginSize(double w, double h);
465 void base_OnEndSize(double w, double h);
466// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
467
468};
469
470
471//---------------------------------------------------------------------------
472
473%{
474 WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape);
475%}
476
477class wxPyDividedShape : public wxPyRectangleShape {
478public:
2b9048c5 479 %pythonAppend wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)"
d14a1e28 480
e91a9dfc
RD
481 wxPyDividedShape(double width = 0.0, double height = 0.0);
482
0122b7e3 483 void _setCallbackInfo(PyObject* self, PyObject* _class);
e91a9dfc
RD
484
485 void EditRegions();
486 void SetRegionSizes();
487
488 void base_OnDelete();
489 void base_OnDraw(wxDC& dc);
490 void base_OnDrawContents(wxDC& dc);
491 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
492 void base_OnMoveLinks(wxDC& dc);
493 void base_OnErase(wxDC& dc);
494 void base_OnEraseContents(wxDC& dc);
495 void base_OnHighlight(wxDC& dc);
496 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
497 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
498 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
499 void base_OnSize(double x, double y);
dd9f7fea
RD
500 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
501 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
e91a9dfc
RD
502 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
503 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
504 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
505 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
506 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
507 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
508 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
509 void base_OnDrawControlPoints(wxDC& dc);
510 void base_OnEraseControlPoints(wxDC& dc);
dd9f7fea 511 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
2348eaee
RD
512 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
513 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
514 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
515 void base_OnBeginSize(double w, double h);
516 void base_OnEndSize(double w, double h);
517// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
518
519};
520
521
522//---------------------------------------------------------------------------
523%{
524 WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape);
525%}
526
527class wxPyDivisionShape : public wxPyCompositeShape {
528public:
2b9048c5 529 %pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
d14a1e28 530
e91a9dfc
RD
531 wxPyDivisionShape();
532
0122b7e3 533 void _setCallbackInfo(PyObject* self, PyObject* _class);
e91a9dfc
RD
534
535 void AdjustBottom(double bottom, bool test);
536 void AdjustLeft(double left, bool test);
537 void AdjustRight(double right, bool test);
538 void AdjustTop(double top, bool test);
539 void Divide(int direction);
540 void EditEdge(int side);
541 wxPyDivisionShape * GetBottomSide();
542 int GetHandleSide();
543 wxPyDivisionShape * GetLeftSide();
544 wxString GetLeftSideColour();
545 wxPen * GetLeftSidePen();
546 wxPyDivisionShape * GetRightSide();
547 wxPyDivisionShape * GetTopSide();
548 wxPen * GetTopSidePen();
549 void ResizeAdjoining(int side, double newPos, bool test);
550 void PopupMenu(double x, double y);
551 void SetBottomSide(wxPyDivisionShape *shape);
552 void SetHandleSide(int side);
553 void SetLeftSide(wxPyDivisionShape *shape);
554 void SetLeftSideColour(const wxString& colour);
555 void SetLeftSidePen(wxPen *pen);
556 void SetRightSide(wxPyDivisionShape *shape);
557 void SetTopSide(wxPyDivisionShape *shape);
558 void SetTopSideColour(const wxString& colour);
559 void SetTopSidePen(wxPen *pen);
560
561
562
563 void base_OnDelete();
564 void base_OnDraw(wxDC& dc);
565 void base_OnDrawContents(wxDC& dc);
566 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
567 void base_OnMoveLinks(wxDC& dc);
568 void base_OnErase(wxDC& dc);
569 void base_OnEraseContents(wxDC& dc);
570 void base_OnHighlight(wxDC& dc);
571 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
572 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
573 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
574 void base_OnSize(double x, double y);
dd9f7fea
RD
575 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
576 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
e91a9dfc
RD
577 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
578 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
579 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
580 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
581 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
582 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
583 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
584 void base_OnDrawControlPoints(wxDC& dc);
585 void base_OnEraseControlPoints(wxDC& dc);
dd9f7fea 586 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
2348eaee
RD
587 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
588 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
589 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
590 void base_OnBeginSize(double w, double h);
591 void base_OnEndSize(double w, double h);
592// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
593
594};
595
596
597
598//---------------------------------------------------------------------------
599