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