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 /////////////////////////////////////////////////////////////////////////////
17 //---------------------------------------------------------------------------
21 oglMETAFLAGS_ATTACHMENTS
24 //---------------------------------------------------------------------------
26 %typemap(in) (int points, wxPoint* points_array ) {
27 $2 = wxPoint_LIST_helper($input, &$1);
28 if ($2 == NULL) SWIG_fail;
30 %typemap(freearg) (int points, wxPoint* points_array ) {
34 //---------------------------------------------------------------------------
36 class wxPseudoMetaFile : public wxObject {
41 void Draw(wxDC& dc, double xoffset, double yoffset);
43 void WriteAttributes(wxExpr *clause, int whichAngle);
44 void ReadAttributes(wxExpr *clause, int whichAngle);
47 void Copy(wxPseudoMetaFile& copy);
48 void Scale(double sx, double sy);
49 void ScaleTo(double w, double h);
50 void Translate(double x, double y);
51 void Rotate(double x, double y, double theta);
52 bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
53 void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
54 void CalculateSize(wxPyDrawnShape* shape);
56 // **** fix these... is it even possible? these are lists of various GDI opperations (not the objects...)
57 // wxList& GetOutlineColours();
58 // wxList& GetFillColours();
61 void SetRotateable(bool rot);
63 void SetSize(double w, double h);
64 void SetFillBrush(wxBrush* brush);
65 wxBrush* GetFillBrush();
66 void SetOutlinePen(wxPen* pen);
67 wxPen* GetOutlinePen();
68 void SetOutlineOp(int op);
73 void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
74 void DrawRectangle(const wxRect& rect);
75 void DrawRoundedRectangle(const wxRect& rect, double radius);
76 void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
77 void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
78 void DrawEllipse(const wxRect& rect);
79 void DrawPoint(const wxPoint& pt);
80 void DrawText(const wxString& text, const wxPoint& pt);
81 void DrawLines(int points, wxPoint* points_array);
82 void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
83 void DrawSpline(int points, wxPoint* points_array);
84 void SetClippingRect(const wxRect& rect);
85 void DestroyClippingRect();
86 void SetPen(wxPen* pen, bool isOutline = FALSE);
87 void SetBrush(wxBrush* brush, bool isFill = FALSE);
88 void SetFont(wxFont* font);
89 void SetTextColour(const wxColour& colour);
90 void SetBackgroundColour(const wxColour& colour);
91 void SetBackgroundMode(int mode);
95 //---------------------------------------------------------------------------
98 // Using this macro can sometimes provoke an Internal Compiler Error in MSVC
99 // 6, so instead I'l just expand it out by hand...
100 // WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
102 IMP_PYCALLBACK__ (wxPyRectangleShape, wxRectangleShape, OnDelete);
103 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDraw);
104 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawContents);
105 IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnDrawBranches);
106 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnMoveLinks);
107 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnErase);
108 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseContents);
109 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnHighlight);
110 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftClick);
111 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftDoubleClick);
112 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnRightClick);
113 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnSize);
114 IMP_PYCALLBACK_BOOL_DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePre);
115 IMP_PYCALLBACK__DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePost);
116 IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragLeft);
117 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragLeft);
118 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragLeft);
119 IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragRight);
120 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragRight);
121 IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragRight);
122 IMP_PYCALLBACK__DC4DBL (wxPyRectangleShape, wxRectangleShape, OnDrawOutline);
123 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawControlPoints);
124 IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseControlPoints);
125 IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnMoveLink);
126 IMP_PYCALLBACK__WXCPBOOL2DBL2INT(wxPyRectangleShape, wxRectangleShape, OnSizingDragLeft);
127 IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingBeginDragLeft);
128 IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingEndDragLeft);
129 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnBeginSize);
130 IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnEndSize)
134 class wxPyRectangleShape : public wxPyShape {
136 %pythonAppend wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)"
138 wxPyRectangleShape(double width = 0.0, double height = 0.0);
139 void _setCallbackInfo(PyObject* self, PyObject* _class);
141 void SetCornerRadius(double radius);
142 double GetCornerRadius();
144 void base_OnDelete();
145 void base_OnDraw(wxDC& dc);
146 void base_OnDrawContents(wxDC& dc);
147 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
148 void base_OnMoveLinks(wxDC& dc);
149 void base_OnErase(wxDC& dc);
150 void base_OnEraseContents(wxDC& dc);
151 void base_OnHighlight(wxDC& dc);
152 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
153 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
154 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
155 void base_OnSize(double x, double y);
156 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
157 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
158 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
159 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
160 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
161 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
162 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
163 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
164 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
165 void base_OnDrawControlPoints(wxDC& dc);
166 void base_OnEraseControlPoints(wxDC& dc);
167 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
168 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
169 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
170 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
171 void base_OnBeginSize(double w, double h);
172 void base_OnEndSize(double w, double h);
173 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
176 //---------------------------------------------------------------------------
179 WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
182 class wxPyControlPoint : public wxPyRectangleShape {
184 %pythonAppend wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)"
186 wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
187 wxPyShape *object = NULL,
188 double size = 0.0, double the_xoffset = 0.0,
189 double the_yoffset = 0.0, int the_type = 0);
191 void _setCallbackInfo(PyObject* self, PyObject* _class);
193 void SetCornerRadius(double radius);
195 void base_OnDelete();
196 void base_OnDraw(wxDC& dc);
197 void base_OnDrawContents(wxDC& dc);
198 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
199 void base_OnMoveLinks(wxDC& dc);
200 void base_OnErase(wxDC& dc);
201 void base_OnEraseContents(wxDC& dc);
202 void base_OnHighlight(wxDC& dc);
203 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
204 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
205 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
206 void base_OnSize(double x, double y);
207 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
208 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
209 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
210 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
211 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
212 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
213 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
214 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
215 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
216 void base_OnDrawControlPoints(wxDC& dc);
217 void base_OnEraseControlPoints(wxDC& dc);
218 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
219 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
220 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
221 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
222 void base_OnBeginSize(double w, double h);
223 void base_OnEndSize(double w, double h);
224 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
227 //---------------------------------------------------------------------------
229 WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape);
233 class wxPyBitmapShape : public wxPyRectangleShape {
235 %pythonAppend wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)"
239 void _setCallbackInfo(PyObject* self, PyObject* _class);
241 wxBitmap& GetBitmap();
242 wxString GetFilename();
243 void SetBitmap(const wxBitmap& bitmap);
244 void SetFilename(const wxString& filename);
246 void base_OnDelete();
247 void base_OnDraw(wxDC& dc);
248 void base_OnDrawContents(wxDC& dc);
249 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
250 void base_OnMoveLinks(wxDC& dc);
251 void base_OnErase(wxDC& dc);
252 void base_OnEraseContents(wxDC& dc);
253 void base_OnHighlight(wxDC& dc);
254 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
255 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
256 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
257 void base_OnSize(double x, double y);
258 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
259 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
260 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
261 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
262 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
263 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
264 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
265 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
266 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
267 void base_OnDrawControlPoints(wxDC& dc);
268 void base_OnEraseControlPoints(wxDC& dc);
269 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
270 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
271 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
272 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
273 void base_OnBeginSize(double w, double h);
274 void base_OnEndSize(double w, double h);
275 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
278 //---------------------------------------------------------------------------
280 WXSHAPE_IMP_CALLBACKS(wxPyDrawnShape, wxDrawnShape);
283 class wxPyDrawnShape : public wxPyRectangleShape {
285 %pythonAppend wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)"
289 void _setCallbackInfo(PyObject* self, PyObject* _class);
291 void CalculateSize();
292 void DestroyClippingRect();
293 void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint,
294 const wxPoint& endPoint);
295 void DrawAtAngle(int angle);
296 void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
297 void DrawLine(const wxPoint& point1, const wxPoint& point2);
298 void DrawLines(int points, wxPoint* points_array);
299 void DrawPoint(const wxPoint& point);
301 void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
303 void DrawRectangle(const wxRect& rect);
304 void DrawRoundedRectangle(const wxRect& rect, double radius);
305 void DrawSpline(int points, wxPoint* points_array);
306 void DrawText(const wxString& text, const wxPoint& point);
309 wxPseudoMetaFile& GetMetaFile();
311 double GetRotation();
312 bool LoadFromMetaFile(const wxString& filename);
313 void Rotate(double x, double y, double theta);
314 void SetClippingRect(const wxRect& rect);
315 void SetDrawnBackgroundColour(const wxColour& colour);
316 void SetDrawnBackgroundMode(int mode);
317 void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE);
318 void SetDrawnFont(wxFont* font);
319 void SetDrawnPen(wxPen* pen, bool isOutline = FALSE);
320 void SetDrawnTextColour(const wxColour& colour);
321 void Scale(double sx, double sy);
322 void SetSaveToFile(bool save);
323 void Translate(double x, double y);
326 void base_OnDelete();
327 void base_OnDraw(wxDC& dc);
328 void base_OnDrawContents(wxDC& dc);
329 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
330 void base_OnMoveLinks(wxDC& dc);
331 void base_OnErase(wxDC& dc);
332 void base_OnEraseContents(wxDC& dc);
333 void base_OnHighlight(wxDC& dc);
334 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
335 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
336 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
337 void base_OnSize(double x, double y);
338 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
339 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
340 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
341 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
342 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
343 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
344 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
345 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
346 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
347 void base_OnDrawControlPoints(wxDC& dc);
348 void base_OnEraseControlPoints(wxDC& dc);
349 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
350 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
351 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
352 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
353 void base_OnBeginSize(double w, double h);
354 void base_OnEndSize(double w, double h);
355 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
360 //---------------------------------------------------------------------------
362 class wxOGLConstraint : public wxObject {
364 //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
366 wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
367 wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
368 wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
374 //~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
377 void SetSpacing(double x, double y);
378 bool Equals(double a, double b);
384 //---------------------------------------------------------------------------
387 WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
390 class wxPyCompositeShape : public wxPyRectangleShape {
392 %pythonAppend wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)"
394 wxPyCompositeShape();
396 void _setCallbackInfo(PyObject* self, PyObject* _class);
398 void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
399 wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
402 //wxOGLConstraint * AddConstraint(int type,
403 // wxPyShape *constraining,
404 // wxList& constrained);
406 wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
407 PyObject* constrained) {
408 wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
409 wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
415 %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
416 wxPyShape *constraining,
417 wxPyShape *constrained);
419 void CalculateSize();
420 bool ContainsDivision(wxPyDivisionShape *division);
421 void DeleteConstraint(wxOGLConstraint *constraint);
422 void DeleteConstraintsInvolvingChild(wxPyShape *child);
424 // **** Needs an output typemap
425 //wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite);
427 wxPyShape * FindContainerImage();
429 // wxList& GetConstraints();
430 // wxList& GetDivisions();
432 PyObject* GetConstraints() {
433 wxList& list = self->GetConstraints();
434 return wxPy_ConvertList(&list);
437 PyObject* GetDivisions() {
438 wxList& list = self->GetDivisions();
439 return wxPy_ConvertShapeList(&list);
443 void MakeContainer();
445 void RemoveChild(wxPyShape *child);
448 void base_OnDelete();
449 void base_OnDraw(wxDC& dc);
450 void base_OnDrawContents(wxDC& dc);
451 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
452 void base_OnMoveLinks(wxDC& dc);
453 void base_OnErase(wxDC& dc);
454 void base_OnEraseContents(wxDC& dc);
455 void base_OnHighlight(wxDC& dc);
456 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
457 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
458 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
459 void base_OnSize(double x, double y);
460 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
461 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
462 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
463 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
464 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
465 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
466 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
467 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
468 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
469 void base_OnDrawControlPoints(wxDC& dc);
470 void base_OnEraseControlPoints(wxDC& dc);
471 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
472 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
473 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
474 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
475 void base_OnBeginSize(double w, double h);
476 void base_OnEndSize(double w, double h);
477 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
482 //---------------------------------------------------------------------------
485 WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape);
488 class wxPyDividedShape : public wxPyRectangleShape {
490 %pythonAppend wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)"
492 wxPyDividedShape(double width = 0.0, double height = 0.0);
494 void _setCallbackInfo(PyObject* self, PyObject* _class);
497 void SetRegionSizes();
499 void base_OnDelete();
500 void base_OnDraw(wxDC& dc);
501 void base_OnDrawContents(wxDC& dc);
502 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
503 void base_OnMoveLinks(wxDC& dc);
504 void base_OnErase(wxDC& dc);
505 void base_OnEraseContents(wxDC& dc);
506 void base_OnHighlight(wxDC& dc);
507 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
508 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
509 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
510 void base_OnSize(double x, double y);
511 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
512 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
513 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
514 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
515 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
516 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
517 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
518 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
519 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
520 void base_OnDrawControlPoints(wxDC& dc);
521 void base_OnEraseControlPoints(wxDC& dc);
522 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
523 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
524 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
525 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
526 void base_OnBeginSize(double w, double h);
527 void base_OnEndSize(double w, double h);
528 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
533 //---------------------------------------------------------------------------
535 WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape);
538 class wxPyDivisionShape : public wxPyCompositeShape {
540 %pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
541 %typemap(out) wxPyDivisionShape*; // turn off this typemap
545 %typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
547 void _setCallbackInfo(PyObject* self, PyObject* _class);
549 void AdjustBottom(double bottom, bool test);
550 void AdjustLeft(double left, bool test);
551 void AdjustRight(double right, bool test);
552 void AdjustTop(double top, bool test);
553 void Divide(int direction);
554 void EditEdge(int side);
555 wxPyDivisionShape * GetBottomSide();
557 wxPyDivisionShape * GetLeftSide();
558 wxString GetLeftSideColour();
559 wxPen * GetLeftSidePen();
560 wxPyDivisionShape * GetRightSide();
561 wxPyDivisionShape * GetTopSide();
562 wxPen * GetTopSidePen();
563 void ResizeAdjoining(int side, double newPos, bool test);
564 void PopupMenu(double x, double y);
565 void SetBottomSide(wxPyDivisionShape *shape);
566 void SetHandleSide(int side);
567 void SetLeftSide(wxPyDivisionShape *shape);
568 void SetLeftSideColour(const wxString& colour);
569 void SetLeftSidePen(wxPen *pen);
570 void SetRightSide(wxPyDivisionShape *shape);
571 void SetTopSide(wxPyDivisionShape *shape);
572 void SetTopSideColour(const wxString& colour);
573 void SetTopSidePen(wxPen *pen);
577 void base_OnDelete();
578 void base_OnDraw(wxDC& dc);
579 void base_OnDrawContents(wxDC& dc);
580 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
581 void base_OnMoveLinks(wxDC& dc);
582 void base_OnErase(wxDC& dc);
583 void base_OnEraseContents(wxDC& dc);
584 void base_OnHighlight(wxDC& dc);
585 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
586 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
587 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
588 void base_OnSize(double x, double y);
589 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
590 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
591 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
592 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
593 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
594 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
595 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
596 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
597 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
598 void base_OnDrawControlPoints(wxDC& dc);
599 void base_OnEraseControlPoints(wxDC& dc);
600 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
601 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
602 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
603 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
604 void base_OnBeginSize(double w, double h);
605 void base_OnEndSize(double w, double h);
606 // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
612 //---------------------------------------------------------------------------