1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions for the wxWindows Object Graphics Library
7 // Created: 3-Sept-1999
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include "oglhelpers.h"
21 //---------------------------------------------------------------------------
24 %include my_typemaps.i
37 %pragma(python) code = "import wx"
39 //---------------------------------------------------------------------------
43 oglMETAFLAGS_ATTACHMENTS
46 //---------------------------------------------------------------------------
47 //---------------------------------------------------------------------------
49 class wxPseudoMetaFile : public wxObject {
54 void Draw(wxDC& dc, double xoffset, double yoffset);
56 void WriteAttributes(wxExpr *clause, int whichAngle);
57 void ReadAttributes(wxExpr *clause, int whichAngle);
60 void Copy(wxPseudoMetaFile& copy);
61 void Scale(double sx, double sy);
62 void ScaleTo(double w, double h);
63 void Translate(double x, double y);
64 void Rotate(double x, double y, double theta);
65 bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
66 void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
67 void CalculateSize(wxPyDrawnShape* shape);
69 // **** fix these... is it even possible? these are lists of various GDI opperations (not the objects...)
70 // wxList& GetOutlineColours();
71 // wxList& GetFillColours();
74 void SetRotateable(bool rot);
76 void SetSize(double w, double h);
77 void SetFillBrush(wxBrush* brush);
78 wxBrush* GetFillBrush();
79 void SetOutlinePen(wxPen* pen);
80 wxPen* GetOutlinePen();
81 void SetOutlineOp(int op);
86 void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
87 void DrawRectangle(const wxRect& rect);
88 void DrawRoundedRectangle(const wxRect& rect, double radius);
89 void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
90 void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
91 void DrawEllipse(const wxRect& rect);
92 void DrawPoint(const wxPoint& pt);
93 void DrawText(const wxString& text, const wxPoint& pt);
94 void DrawLines(int PCOUNT, wxPoint* points);
95 void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
96 void DrawSpline(int PCOUNT, wxPoint* points);
97 void SetClippingRect(const wxRect& rect);
98 void DestroyClippingRect();
99 void SetPen(wxPen* pen, bool isOutline = FALSE);
100 void SetBrush(wxBrush* brush, bool isFill = FALSE);
101 void SetFont(wxFont* font);
102 void SetTextColour(const wxColour& colour);
103 void SetBackgroundColour(const wxColour& colour);
104 void SetBackgroundMode(int mode);
108 //---------------------------------------------------------------------------
111 // Using this macro can sometimes provoke an Internal Compiler Error in MSVC
112 // 6, so instead I'l just expand it out by hand...
113 // WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
115 IMP_PYCALLBACK__ (wxPyRectangleShape, wxRectangleShape, OnDelete);
116 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDraw);
117 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawContents);
118 IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnDrawBranches);
119 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnMoveLinks);
120 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnErase);
121 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseContents);
122 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnHighlight);
123 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftClick);
124 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftDoubleClick);
125 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnRightClick);
126 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnSize);
127 IMP_PYCALLBACK_BOOL_DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePre);
128 IMP_PYCALLBACK__DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePost);
129 IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragLeft);
130 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragLeft);
131 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragLeft);
132 IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragRight);
133 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragRight);
134 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragRight);
135 IMP_PYCALLBACK__DC4DBL (wxPyRectangleShape, wxRectangleShape, OnDrawOutline);
136 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawControlPoints);
137 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseControlPoints);
138 IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnMoveLink);
139 IMP_PYCALLBACK__WXCPBOOL2DBL2INT(wxPyRectangleShape, wxRectangleShape, OnSizingDragLeft);
140 IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingBeginDragLeft);
141 IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingEndDragLeft);
142 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnBeginSize);
143 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnEndSize)
147 class wxPyRectangleShape : public wxPyShape {
149 wxPyRectangleShape(double width = 0.0, double height = 0.0);
151 void _setCallbackInfo(PyObject* self, PyObject* _class);
152 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyRectangleShape)"
153 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
155 void SetCornerRadius(double radius);
157 void base_OnDelete();
158 void base_OnDraw(wxDC& dc);
159 void base_OnDrawContents(wxDC& dc);
160 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
161 void base_OnMoveLinks(wxDC& dc);
162 void base_OnErase(wxDC& dc);
163 void base_OnEraseContents(wxDC& dc);
164 void base_OnHighlight(wxDC& dc);
165 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
166 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
167 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
168 void base_OnSize(double x, double y);
169 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
170 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
171 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
172 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
173 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
174 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
175 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
176 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
177 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
178 void base_OnDrawControlPoints(wxDC& dc);
179 void base_OnEraseControlPoints(wxDC& dc);
180 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
181 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
182 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
183 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
184 void base_OnBeginSize(double w, double h);
185 void base_OnEndSize(double w, double h);
186 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
189 //---------------------------------------------------------------------------
192 WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
195 class wxPyControlPoint : public wxPyRectangleShape {
197 wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
198 wxPyShape *object = NULL,
199 double size = 0.0, double the_xoffset = 0.0,
200 double the_yoffset = 0.0, int the_type = 0);
202 void _setCallbackInfo(PyObject* self, PyObject* _class);
203 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyControlPoint)"
204 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
206 void SetCornerRadius(double radius);
208 void base_OnDelete();
209 void base_OnDraw(wxDC& dc);
210 void base_OnDrawContents(wxDC& dc);
211 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
212 void base_OnMoveLinks(wxDC& dc);
213 void base_OnErase(wxDC& dc);
214 void base_OnEraseContents(wxDC& dc);
215 void base_OnHighlight(wxDC& dc);
216 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
217 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
218 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
219 void base_OnSize(double x, double y);
220 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
221 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
222 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
223 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
224 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
225 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
226 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
227 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
228 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
229 void base_OnDrawControlPoints(wxDC& dc);
230 void base_OnEraseControlPoints(wxDC& dc);
231 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
232 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
233 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
234 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
235 void base_OnBeginSize(double w, double h);
236 void base_OnEndSize(double w, double h);
237 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
240 //---------------------------------------------------------------------------
242 WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape);
246 class wxPyBitmapShape : public wxPyRectangleShape {
250 void _setCallbackInfo(PyObject* self, PyObject* _class);
251 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyBitmapShape)"
252 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
254 wxBitmap& GetBitmap();
255 wxString GetFilename();
256 void SetBitmap(const wxBitmap& bitmap);
257 void SetFilename(const wxString& filename);
259 void base_OnDelete();
260 void base_OnDraw(wxDC& dc);
261 void base_OnDrawContents(wxDC& dc);
262 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
263 void base_OnMoveLinks(wxDC& dc);
264 void base_OnErase(wxDC& dc);
265 void base_OnEraseContents(wxDC& dc);
266 void base_OnHighlight(wxDC& dc);
267 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
268 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
269 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
270 void base_OnSize(double x, double y);
271 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
272 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
273 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
274 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
275 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
276 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
277 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
278 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
279 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
280 void base_OnDrawControlPoints(wxDC& dc);
281 void base_OnEraseControlPoints(wxDC& dc);
282 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
283 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
284 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
285 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
286 void base_OnBeginSize(double w, double h);
287 void base_OnEndSize(double w, double h);
288 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
291 //---------------------------------------------------------------------------
293 WXSHAPE_IMP_CALLBACKS(wxPyDrawnShape, wxDrawnShape);
296 class wxPyDrawnShape : public wxPyRectangleShape {
300 void _setCallbackInfo(PyObject* self, PyObject* _class);
301 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDrawnShape)"
302 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
304 void CalculateSize();
305 void DestroyClippingRect();
306 void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint,
307 const wxPoint& endPoint);
308 void DrawAtAngle(int angle);
309 void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
310 void DrawLine(const wxPoint& point1, const wxPoint& point2);
311 void DrawLines(int PCOUNT, wxPoint* points);
312 void DrawPoint(const wxPoint& point);
313 void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
314 void DrawRectangle(const wxRect& rect);
315 void DrawRoundedRectangle(const wxRect& rect, double radius);
316 void DrawSpline(int PCOUNT, wxPoint* points);
317 void DrawText(const wxString& text, const wxPoint& point);
320 wxPseudoMetaFile& GetMetaFile();
322 double GetRotation();
323 bool LoadFromMetaFile(const wxString& filename);
324 void Rotate(double x, double y, double theta);
325 void SetClippingRect(const wxRect& rect);
326 void SetDrawnBackgroundColour(const wxColour& colour);
327 void SetDrawnBackgroundMode(int mode);
328 void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE);
329 void SetDrawnFont(wxFont* font);
330 void SetDrawnPen(wxPen* pen, bool isOutline = FALSE);
331 void SetDrawnTextColour(const wxColour& colour);
332 void Scale(double sx, double sy);
333 void SetSaveToFile(bool save);
334 void Translate(double x, double y);
337 void base_OnDelete();
338 void base_OnDraw(wxDC& dc);
339 void base_OnDrawContents(wxDC& dc);
340 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
341 void base_OnMoveLinks(wxDC& dc);
342 void base_OnErase(wxDC& dc);
343 void base_OnEraseContents(wxDC& dc);
344 void base_OnHighlight(wxDC& dc);
345 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
346 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
347 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
348 void base_OnSize(double x, double y);
349 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
350 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
351 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
352 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
353 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
354 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
355 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
356 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
357 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
358 void base_OnDrawControlPoints(wxDC& dc);
359 void base_OnEraseControlPoints(wxDC& dc);
360 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
361 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
362 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
363 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
364 void base_OnBeginSize(double w, double h);
365 void base_OnEndSize(double w, double h);
366 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
371 //---------------------------------------------------------------------------
373 class wxOGLConstraint : public wxObject {
375 //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
377 wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
378 wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
379 wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
385 //~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
388 void SetSpacing(double x, double y);
389 bool Equals(double a, double b);
395 //---------------------------------------------------------------------------
398 WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
401 class wxPyCompositeShape : public wxPyRectangleShape {
403 wxPyCompositeShape();
405 void _setCallbackInfo(PyObject* self, PyObject* _class);
406 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCompositeShape)"
407 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
409 void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
411 wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
414 //wxOGLConstraint * AddConstraint(int type,
415 // wxPyShape *constraining,
416 // wxList& constrained);
418 wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
419 PyObject* constrained) {
420 wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
421 wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
427 %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
428 wxPyShape *constraining,
429 wxPyShape *constrained);
431 void CalculateSize();
432 bool ContainsDivision(wxPyDivisionShape *division);
433 void DeleteConstraint(wxOGLConstraint *constraint);
434 void DeleteConstraintsInvolvingChild(wxPyShape *child);
436 // **** Needs an output typemap
437 //wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite);
439 wxPyShape * FindContainerImage();
441 // wxList& GetConstraints();
442 // wxList& GetDivisions();
444 PyObject* GetConstraints() {
445 wxList& list = self->GetConstraints();
446 return wxPy_ConvertList(&list, "wxOGLConstraint");
449 PyObject* GetDivisions() {
450 wxList& list = self->GetDivisions();
451 return wxPy_ConvertShapeList(&list, "wxPyDivisionShape");
455 void MakeContainer();
457 void RemoveChild(wxPyShape *child);
460 void base_OnDelete();
461 void base_OnDraw(wxDC& dc);
462 void base_OnDrawContents(wxDC& dc);
463 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
464 void base_OnMoveLinks(wxDC& dc);
465 void base_OnErase(wxDC& dc);
466 void base_OnEraseContents(wxDC& dc);
467 void base_OnHighlight(wxDC& dc);
468 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
469 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
470 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
471 void base_OnSize(double x, double y);
472 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
473 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
474 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
475 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
476 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
477 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
478 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
479 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
480 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
481 void base_OnDrawControlPoints(wxDC& dc);
482 void base_OnEraseControlPoints(wxDC& dc);
483 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
484 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
485 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
486 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
487 void base_OnBeginSize(double w, double h);
488 void base_OnEndSize(double w, double h);
489 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
494 //---------------------------------------------------------------------------
497 WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape);
500 class wxPyDividedShape : public wxPyRectangleShape {
502 wxPyDividedShape(double width = 0.0, double height = 0.0);
504 void _setCallbackInfo(PyObject* self, PyObject* _class);
505 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDividedShape)"
506 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
509 void SetRegionSizes();
511 void base_OnDelete();
512 void base_OnDraw(wxDC& dc);
513 void base_OnDrawContents(wxDC& dc);
514 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
515 void base_OnMoveLinks(wxDC& dc);
516 void base_OnErase(wxDC& dc);
517 void base_OnEraseContents(wxDC& dc);
518 void base_OnHighlight(wxDC& dc);
519 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
520 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
521 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
522 void base_OnSize(double x, double y);
523 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
524 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
525 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
526 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
527 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
528 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
529 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
530 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
531 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
532 void base_OnDrawControlPoints(wxDC& dc);
533 void base_OnEraseControlPoints(wxDC& dc);
534 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
535 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
536 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
537 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
538 void base_OnBeginSize(double w, double h);
539 void base_OnEndSize(double w, double h);
540 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
545 //---------------------------------------------------------------------------
547 WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape);
550 class wxPyDivisionShape : public wxPyCompositeShape {
554 void _setCallbackInfo(PyObject* self, PyObject* _class);
555 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDivisionShape)"
556 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
558 void AdjustBottom(double bottom, bool test);
559 void AdjustLeft(double left, bool test);
560 void AdjustRight(double right, bool test);
561 void AdjustTop(double top, bool test);
562 void Divide(int direction);
563 void EditEdge(int side);
564 wxPyDivisionShape * GetBottomSide();
566 wxPyDivisionShape * GetLeftSide();
567 wxString GetLeftSideColour();
568 wxPen * GetLeftSidePen();
569 wxPyDivisionShape * GetRightSide();
570 wxPyDivisionShape * GetTopSide();
571 wxPen * GetTopSidePen();
572 void ResizeAdjoining(int side, double newPos, bool test);
573 void PopupMenu(double x, double y);
574 void SetBottomSide(wxPyDivisionShape *shape);
575 void SetHandleSide(int side);
576 void SetLeftSide(wxPyDivisionShape *shape);
577 void SetLeftSideColour(const wxString& colour);
578 void SetLeftSidePen(wxPen *pen);
579 void SetRightSide(wxPyDivisionShape *shape);
580 void SetTopSide(wxPyDivisionShape *shape);
581 void SetTopSideColour(const wxString& colour);
582 void SetTopSidePen(wxPen *pen);
586 void base_OnDelete();
587 void base_OnDraw(wxDC& dc);
588 void base_OnDrawContents(wxDC& dc);
589 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
590 void base_OnMoveLinks(wxDC& dc);
591 void base_OnErase(wxDC& dc);
592 void base_OnEraseContents(wxDC& dc);
593 void base_OnHighlight(wxDC& dc);
594 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
595 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
596 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
597 void base_OnSize(double x, double y);
598 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
599 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
600 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
601 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
602 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
603 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
604 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
605 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
606 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
607 void base_OnDrawControlPoints(wxDC& dc);
608 void base_OnEraseControlPoints(wxDC& dc);
609 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
610 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
611 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
612 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
613 void base_OnBeginSize(double w, double h);
614 void base_OnEndSize(double w, double h);
615 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
621 //---------------------------------------------------------------------------