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