]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/ogl/oglshapes.i
added SetStatusText method (avoiding dc.Clear)
[wxWidgets.git] / wxPython / contrib / ogl / oglshapes.i
CommitLineData
e91a9dfc
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: oglshapes.i
3// Purpose: SWIG definitions for the wxWindows Object Graphics Library
4//
5// Author: Robin Dunn
6//
7// Created: 3-Sept-1999
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13
14%module oglshapes
15
16%{
1e7ecb7b 17#include "export.h"
e91a9dfc
RD
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
9416aa89 43class wxPseudoMetaFile : public wxObject {
e91a9dfc
RD
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);
eec92d76
RD
87 void DrawLines(int PCOUNT, wxPoint* points);
88 void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
89 void DrawSpline(int PCOUNT, wxPoint* points);
e91a9dfc
RD
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
0122b7e3
RD
111 void _setCallbackInfo(PyObject* self, PyObject* _class);
112 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyRectangleShape)"
2f4e9287 113 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
e91a9dfc
RD
114
115 void SetCornerRadius(double radius);
116
117 void base_OnDelete();
118 void base_OnDraw(wxDC& dc);
119 void base_OnDrawContents(wxDC& dc);
120 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
121 void base_OnMoveLinks(wxDC& dc);
122 void base_OnErase(wxDC& dc);
123 void base_OnEraseContents(wxDC& dc);
124 void base_OnHighlight(wxDC& dc);
125 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
126 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
127 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
128 void base_OnSize(double x, double y);
129 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
130 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
131 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
132 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
133 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
134 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
135 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
136 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
137 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
138 void base_OnDrawControlPoints(wxDC& dc);
139 void base_OnEraseControlPoints(wxDC& dc);
140 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
2348eaee
RD
141 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
142 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
143 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
144 void base_OnBeginSize(double w, double h);
145 void base_OnEndSize(double w, double h);
146// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
147};
148
149//---------------------------------------------------------------------------
150
151%{
152 WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
153%}
154
155class wxPyControlPoint : public wxPyRectangleShape {
156public:
157 wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
158 wxPyShape *object = NULL,
159 double size = 0.0, double the_xoffset = 0.0,
160 double the_yoffset = 0.0, int the_type = 0);
161
0122b7e3
RD
162 void _setCallbackInfo(PyObject* self, PyObject* _class);
163 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyControlPoint)"
2f4e9287 164 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
2348eaee
RD
165
166 void SetCornerRadius(double radius);
167
168 void base_OnDelete();
169 void base_OnDraw(wxDC& dc);
170 void base_OnDrawContents(wxDC& dc);
171 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
172 void base_OnMoveLinks(wxDC& dc);
173 void base_OnErase(wxDC& dc);
174 void base_OnEraseContents(wxDC& dc);
175 void base_OnHighlight(wxDC& dc);
176 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
177 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
178 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
179 void base_OnSize(double x, double y);
180 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
181 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
182 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
183 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
184 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
185 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
186 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
187 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
188 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
189 void base_OnDrawControlPoints(wxDC& dc);
190 void base_OnEraseControlPoints(wxDC& dc);
191 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
192 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
193 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
194 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
195 void base_OnBeginSize(double w, double h);
196 void base_OnEndSize(double w, double h);
197// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
198};
199
200//---------------------------------------------------------------------------
201%{
202 WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape);
203%}
204
205
206class wxPyBitmapShape : public wxPyRectangleShape {
207public:
208 wxPyBitmapShape();
209
0122b7e3
RD
210 void _setCallbackInfo(PyObject* self, PyObject* _class);
211 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyBitmapShape)"
2f4e9287 212 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
e91a9dfc
RD
213
214 wxBitmap& GetBitmap();
215 wxString GetFilename();
216 void SetBitmap(const wxBitmap& bitmap);
217 void SetFilename(const wxString& filename);
218
219 void base_OnDelete();
220 void base_OnDraw(wxDC& dc);
221 void base_OnDrawContents(wxDC& dc);
222 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
223 void base_OnMoveLinks(wxDC& dc);
224 void base_OnErase(wxDC& dc);
225 void base_OnEraseContents(wxDC& dc);
226 void base_OnHighlight(wxDC& dc);
227 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
228 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
229 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
230 void base_OnSize(double x, double y);
231 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
232 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
233 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
234 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
235 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
236 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
237 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
238 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
239 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
240 void base_OnDrawControlPoints(wxDC& dc);
241 void base_OnEraseControlPoints(wxDC& dc);
242 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
2348eaee
RD
243 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
244 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
245 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
246 void base_OnBeginSize(double w, double h);
247 void base_OnEndSize(double w, double h);
248// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
249};
250
251//---------------------------------------------------------------------------
252%{
253 WXSHAPE_IMP_CALLBACKS(wxPyDrawnShape, wxDrawnShape);
254%}
255
256class wxPyDrawnShape : public wxPyRectangleShape {
257public:
258 wxPyDrawnShape();
259
0122b7e3
RD
260 void _setCallbackInfo(PyObject* self, PyObject* _class);
261 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDrawnShape)"
2f4e9287 262 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
e91a9dfc
RD
263
264 void CalculateSize();
265 void DestroyClippingRect();
266 void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint,
267 const wxPoint& endPoint);
268 void DrawAtAngle(int angle);
269 void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
270 void DrawLine(const wxPoint& point1, const wxPoint& point2);
eec92d76 271 void DrawLines(int PCOUNT, wxPoint* points);
e91a9dfc 272 void DrawPoint(const wxPoint& point);
eec92d76 273 void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
e91a9dfc
RD
274 void DrawRectangle(const wxRect& rect);
275 void DrawRoundedRectangle(const wxRect& rect, double radius);
eec92d76 276 void DrawSpline(int PCOUNT, wxPoint* points);
e91a9dfc
RD
277 void DrawText(const wxString& text, const wxPoint& point);
278 int GetAngle();
279
280 wxPseudoMetaFile& GetMetaFile();
281
282 double GetRotation();
283 bool LoadFromMetaFile(char * filename);
284 void Rotate(double x, double y, double theta);
285 void SetClippingRect(const wxRect& rect);
286 void SetDrawnBackgroundColour(const wxColour& colour);
287 void SetDrawnBackgroundMode(int mode);
288 void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE);
289 void SetDrawnFont(wxFont* font);
290 void SetDrawnPen(wxPen* pen, bool isOutline = FALSE);
291 void SetDrawnTextColour(const wxColour& colour);
292 void Scale(double sx, double sy);
293 void SetSaveToFile(bool save);
294 void Translate(double x, double y);
295
296
297 void base_OnDelete();
298 void base_OnDraw(wxDC& dc);
299 void base_OnDrawContents(wxDC& dc);
300 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
301 void base_OnMoveLinks(wxDC& dc);
302 void base_OnErase(wxDC& dc);
303 void base_OnEraseContents(wxDC& dc);
304 void base_OnHighlight(wxDC& dc);
305 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
306 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
307 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
308 void base_OnSize(double x, double y);
309 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
310 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
311 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
312 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
313 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
314 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
315 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
316 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
317 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
318 void base_OnDrawControlPoints(wxDC& dc);
319 void base_OnEraseControlPoints(wxDC& dc);
320 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
2348eaee
RD
321 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
322 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
323 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
324 void base_OnBeginSize(double w, double h);
325 void base_OnEndSize(double w, double h);
326// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
327
328};
329
330
331//---------------------------------------------------------------------------
332
9416aa89 333class wxOGLConstraint : public wxObject {
e91a9dfc
RD
334public:
335 //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
336 %addmethods {
337 wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
99ab9f3b 338 wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
e91a9dfc
RD
339 wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
340 delete list;
341 return rv;
342 }
343 }
9ae9011b
RD
344
345 //~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
e91a9dfc
RD
346
347 bool Evaluate();
348 void SetSpacing(double x, double y);
349 bool Equals(double a, double b);
350
351};
352
353
354
355//---------------------------------------------------------------------------
356
357%{
358 WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
359%}
360
361class wxPyCompositeShape : public wxPyRectangleShape {
362public:
363 wxPyCompositeShape();
364
0122b7e3
RD
365 void _setCallbackInfo(PyObject* self, PyObject* _class);
366 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCompositeShape)"
2f4e9287 367 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
e91a9dfc
RD
368
369 void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
370
371 wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
372
714d23b4 373
e91a9dfc
RD
374 //wxOGLConstraint * AddConstraint(int type,
375 // wxPyShape *constraining,
376 // wxList& constrained);
714d23b4
RD
377 %addmethods {
378 wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
379 PyObject* constrained) {
99ab9f3b 380 wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
714d23b4
RD
381 wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
382 delete list;
383 return rv;
384 }
385 }
e91a9dfc
RD
386
387 %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
388 wxPyShape *constraining,
389 wxPyShape *constrained);
390
391 void CalculateSize();
392 bool ContainsDivision(wxPyDivisionShape *division);
393 void DeleteConstraint(wxOGLConstraint *constraint);
394 void DeleteConstraintsInvolvingChild(wxPyShape *child);
395
396 // **** Needs an output typemap
397 //wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite);
398
399 wxPyShape * FindContainerImage();
400
401 // wxList& GetConstraints();
402 // wxList& GetDivisions();
403 %addmethods {
404 PyObject* GetConstraints() {
405 wxList& list = self->GetConstraints();
406 return wxPy_ConvertList(&list, "wxOGLConstraint");
407 }
408
409 PyObject* GetDivisions() {
410 wxList& list = self->GetDivisions();
411 return wxPy_ConvertList(&list, "wxPyDivisionShape");
412 }
413 }
414
415 void MakeContainer();
416 bool Recompute();
417 void RemoveChild(wxPyShape *child);
418
419
420 void base_OnDelete();
421 void base_OnDraw(wxDC& dc);
422 void base_OnDrawContents(wxDC& dc);
423 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
424 void base_OnMoveLinks(wxDC& dc);
425 void base_OnErase(wxDC& dc);
426 void base_OnEraseContents(wxDC& dc);
427 void base_OnHighlight(wxDC& dc);
428 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
429 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
430 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
431 void base_OnSize(double x, double y);
432 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
433 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
434 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
435 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
436 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
437 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
438 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
439 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
440 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
441 void base_OnDrawControlPoints(wxDC& dc);
442 void base_OnEraseControlPoints(wxDC& dc);
443 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
2348eaee
RD
444 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
445 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
446 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
447 void base_OnBeginSize(double w, double h);
448 void base_OnEndSize(double w, double h);
449// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
450
451};
452
453
454//---------------------------------------------------------------------------
455
456%{
457 WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape);
458%}
459
460class wxPyDividedShape : public wxPyRectangleShape {
461public:
462 wxPyDividedShape(double width = 0.0, double height = 0.0);
463
0122b7e3
RD
464 void _setCallbackInfo(PyObject* self, PyObject* _class);
465 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDividedShape)"
2f4e9287 466 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
e91a9dfc
RD
467
468 void EditRegions();
469 void SetRegionSizes();
470
471 void base_OnDelete();
472 void base_OnDraw(wxDC& dc);
473 void base_OnDrawContents(wxDC& dc);
474 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
475 void base_OnMoveLinks(wxDC& dc);
476 void base_OnErase(wxDC& dc);
477 void base_OnEraseContents(wxDC& dc);
478 void base_OnHighlight(wxDC& dc);
479 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
480 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
481 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
482 void base_OnSize(double x, double y);
483 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
484 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
485 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
486 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
487 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
488 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
489 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
490 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
491 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
492 void base_OnDrawControlPoints(wxDC& dc);
493 void base_OnEraseControlPoints(wxDC& dc);
494 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
2348eaee
RD
495 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
496 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
497 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
498 void base_OnBeginSize(double w, double h);
499 void base_OnEndSize(double w, double h);
500// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
501
502};
503
504
505//---------------------------------------------------------------------------
506%{
507 WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape);
508%}
509
510class wxPyDivisionShape : public wxPyCompositeShape {
511public:
512 wxPyDivisionShape();
513
0122b7e3
RD
514 void _setCallbackInfo(PyObject* self, PyObject* _class);
515 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDivisionShape)"
2f4e9287 516 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
e91a9dfc
RD
517
518 void AdjustBottom(double bottom, bool test);
519 void AdjustLeft(double left, bool test);
520 void AdjustRight(double right, bool test);
521 void AdjustTop(double top, bool test);
522 void Divide(int direction);
523 void EditEdge(int side);
524 wxPyDivisionShape * GetBottomSide();
525 int GetHandleSide();
526 wxPyDivisionShape * GetLeftSide();
527 wxString GetLeftSideColour();
528 wxPen * GetLeftSidePen();
529 wxPyDivisionShape * GetRightSide();
530 wxPyDivisionShape * GetTopSide();
531 wxPen * GetTopSidePen();
532 void ResizeAdjoining(int side, double newPos, bool test);
533 void PopupMenu(double x, double y);
534 void SetBottomSide(wxPyDivisionShape *shape);
535 void SetHandleSide(int side);
536 void SetLeftSide(wxPyDivisionShape *shape);
537 void SetLeftSideColour(const wxString& colour);
538 void SetLeftSidePen(wxPen *pen);
539 void SetRightSide(wxPyDivisionShape *shape);
540 void SetTopSide(wxPyDivisionShape *shape);
541 void SetTopSideColour(const wxString& colour);
542 void SetTopSidePen(wxPen *pen);
543
544
545
546 void base_OnDelete();
547 void base_OnDraw(wxDC& dc);
548 void base_OnDrawContents(wxDC& dc);
549 void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
550 void base_OnMoveLinks(wxDC& dc);
551 void base_OnErase(wxDC& dc);
552 void base_OnEraseContents(wxDC& dc);
553 void base_OnHighlight(wxDC& dc);
554 void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
555 void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
556 void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
557 void base_OnSize(double x, double y);
558 bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
559 void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
560 void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
561 void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
562 void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
563 void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
564 void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
565 void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
566 void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
567 void base_OnDrawControlPoints(wxDC& dc);
568 void base_OnEraseControlPoints(wxDC& dc);
569 void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
2348eaee
RD
570 void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
571 void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
572 void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
e91a9dfc
RD
573 void base_OnBeginSize(double w, double h);
574 void base_OnEndSize(double w, double h);
575// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
576
577};
578
579
580
581//---------------------------------------------------------------------------
582