]>
Commit | Line | Data |
---|---|---|
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 | ||
43 | class wxPseudoMetaFile { | |
44 | public: | |
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 | ||
107 | class wxPyRectangleShape : public wxPyShape { | |
108 | public: | |
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); | |
140 | void base_OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); | |
141 | void base_OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
142 | void base_OnSizingEndDragLeft(wxControlPoint* 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 | WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape); | |
151 | %} | |
152 | ||
153 | ||
154 | class wxPyBitmapShape : public wxPyRectangleShape { | |
155 | public: | |
156 | wxPyBitmapShape(); | |
157 | ||
158 | void _setSelf(PyObject* self); | |
159 | %pragma(python) addtomethod = "__init__:self._setSelf(self)" | |
160 | ||
161 | wxBitmap& GetBitmap(); | |
162 | wxString GetFilename(); | |
163 | void SetBitmap(const wxBitmap& bitmap); | |
164 | void SetFilename(const wxString& filename); | |
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(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); | |
191 | void base_OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
192 | void base_OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
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(wxPyDrawnShape, wxDrawnShape); | |
201 | %} | |
202 | ||
203 | class wxPyDrawnShape : public wxPyRectangleShape { | |
204 | public: | |
205 | wxPyDrawnShape(); | |
206 | ||
207 | void _setSelf(PyObject* self); | |
208 | %pragma(python) addtomethod = "__init__:self._setSelf(self)" | |
209 | ||
210 | void CalculateSize(); | |
211 | void DestroyClippingRect(); | |
212 | void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint, | |
213 | const wxPoint& endPoint); | |
214 | void DrawAtAngle(int angle); | |
215 | void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle); | |
216 | void DrawLine(const wxPoint& point1, const wxPoint& point2); | |
217 | void DrawLines(int LCOUNT, wxPoint* LIST); | |
218 | void DrawPoint(const wxPoint& point); | |
219 | void DrawPolygon(int LCOUNT, wxPoint* LIST, int flags = 0); | |
220 | void DrawRectangle(const wxRect& rect); | |
221 | void DrawRoundedRectangle(const wxRect& rect, double radius); | |
222 | void DrawSpline(int LCOUNT, wxPoint* LIST); | |
223 | void DrawText(const wxString& text, const wxPoint& point); | |
224 | int GetAngle(); | |
225 | ||
226 | wxPseudoMetaFile& GetMetaFile(); | |
227 | ||
228 | double GetRotation(); | |
229 | bool LoadFromMetaFile(char * filename); | |
230 | void Rotate(double x, double y, double theta); | |
231 | void SetClippingRect(const wxRect& rect); | |
232 | void SetDrawnBackgroundColour(const wxColour& colour); | |
233 | void SetDrawnBackgroundMode(int mode); | |
234 | void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE); | |
235 | void SetDrawnFont(wxFont* font); | |
236 | void SetDrawnPen(wxPen* pen, bool isOutline = FALSE); | |
237 | void SetDrawnTextColour(const wxColour& colour); | |
238 | void Scale(double sx, double sy); | |
239 | void SetSaveToFile(bool save); | |
240 | void Translate(double x, double y); | |
241 | ||
242 | ||
243 | void base_OnDelete(); | |
244 | void base_OnDraw(wxDC& dc); | |
245 | void base_OnDrawContents(wxDC& dc); | |
246 | void base_OnDrawBranches(wxDC& dc, bool erase = FALSE); | |
247 | void base_OnMoveLinks(wxDC& dc); | |
248 | void base_OnErase(wxDC& dc); | |
249 | void base_OnEraseContents(wxDC& dc); | |
250 | void base_OnHighlight(wxDC& dc); | |
251 | void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0); | |
252 | void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); | |
253 | void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); | |
254 | void base_OnSize(double x, double y); | |
255 | bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); | |
256 | void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); | |
257 | void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); | |
258 | void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); | |
259 | void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); | |
260 | void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); | |
261 | void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0); | |
262 | void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0); | |
263 | void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); | |
264 | void base_OnDrawControlPoints(wxDC& dc); | |
265 | void base_OnEraseControlPoints(wxDC& dc); | |
266 | void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE); | |
267 | void base_OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); | |
268 | void base_OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
269 | void base_OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
270 | void base_OnBeginSize(double w, double h); | |
271 | void base_OnEndSize(double w, double h); | |
272 | // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering); | |
273 | ||
274 | }; | |
275 | ||
276 | ||
277 | //--------------------------------------------------------------------------- | |
278 | ||
279 | class wxOGLConstraint { | |
280 | public: | |
281 | //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained); | |
282 | %addmethods { | |
283 | wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) { | |
284 | wxList* list = wxPy_wxListHelper(constrained, "wxPyShape"); | |
285 | wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list); | |
286 | delete list; | |
287 | return rv; | |
288 | } | |
289 | } | |
290 | ~wxOGLConstraint(); | |
291 | ||
292 | bool Evaluate(); | |
293 | void SetSpacing(double x, double y); | |
294 | bool Equals(double a, double b); | |
295 | ||
296 | }; | |
297 | ||
298 | ||
299 | ||
300 | //--------------------------------------------------------------------------- | |
301 | ||
302 | %{ | |
303 | WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape); | |
304 | %} | |
305 | ||
306 | class wxPyCompositeShape : public wxPyRectangleShape { | |
307 | public: | |
308 | wxPyCompositeShape(); | |
309 | ||
310 | void _setSelf(PyObject* self); | |
311 | %pragma(python) addtomethod = "__init__:self._setSelf(self)" | |
312 | ||
313 | void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL); | |
314 | ||
315 | wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint); | |
316 | ||
317 | // **** Needs a typemap | |
318 | //wxOGLConstraint * AddConstraint(int type, | |
319 | // wxPyShape *constraining, | |
320 | // wxList& constrained); | |
321 | ||
322 | %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type, | |
323 | wxPyShape *constraining, | |
324 | wxPyShape *constrained); | |
325 | ||
326 | void CalculateSize(); | |
327 | bool ContainsDivision(wxPyDivisionShape *division); | |
328 | void DeleteConstraint(wxOGLConstraint *constraint); | |
329 | void DeleteConstraintsInvolvingChild(wxPyShape *child); | |
330 | ||
331 | // **** Needs an output typemap | |
332 | //wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite); | |
333 | ||
334 | wxPyShape * FindContainerImage(); | |
335 | ||
336 | // wxList& GetConstraints(); | |
337 | // wxList& GetDivisions(); | |
338 | %addmethods { | |
339 | PyObject* GetConstraints() { | |
340 | wxList& list = self->GetConstraints(); | |
341 | return wxPy_ConvertList(&list, "wxOGLConstraint"); | |
342 | } | |
343 | ||
344 | PyObject* GetDivisions() { | |
345 | wxList& list = self->GetDivisions(); | |
346 | return wxPy_ConvertList(&list, "wxPyDivisionShape"); | |
347 | } | |
348 | } | |
349 | ||
350 | void MakeContainer(); | |
351 | bool Recompute(); | |
352 | void RemoveChild(wxPyShape *child); | |
353 | ||
354 | ||
355 | void base_OnDelete(); | |
356 | void base_OnDraw(wxDC& dc); | |
357 | void base_OnDrawContents(wxDC& dc); | |
358 | void base_OnDrawBranches(wxDC& dc, bool erase = FALSE); | |
359 | void base_OnMoveLinks(wxDC& dc); | |
360 | void base_OnErase(wxDC& dc); | |
361 | void base_OnEraseContents(wxDC& dc); | |
362 | void base_OnHighlight(wxDC& dc); | |
363 | void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0); | |
364 | void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); | |
365 | void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); | |
366 | void base_OnSize(double x, double y); | |
367 | bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); | |
368 | void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); | |
369 | void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); | |
370 | void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); | |
371 | void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); | |
372 | void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); | |
373 | void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0); | |
374 | void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0); | |
375 | void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); | |
376 | void base_OnDrawControlPoints(wxDC& dc); | |
377 | void base_OnEraseControlPoints(wxDC& dc); | |
378 | void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE); | |
379 | void base_OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); | |
380 | void base_OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
381 | void base_OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
382 | void base_OnBeginSize(double w, double h); | |
383 | void base_OnEndSize(double w, double h); | |
384 | // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering); | |
385 | ||
386 | }; | |
387 | ||
388 | ||
389 | //--------------------------------------------------------------------------- | |
390 | ||
391 | %{ | |
392 | WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape); | |
393 | %} | |
394 | ||
395 | class wxPyDividedShape : public wxPyRectangleShape { | |
396 | public: | |
397 | wxPyDividedShape(double width = 0.0, double height = 0.0); | |
398 | ||
399 | void _setSelf(PyObject* self); | |
400 | %pragma(python) addtomethod = "__init__:self._setSelf(self)" | |
401 | ||
402 | void EditRegions(); | |
403 | void SetRegionSizes(); | |
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); | |
429 | void base_OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); | |
430 | void base_OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
431 | void base_OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
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 | WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape); | |
442 | %} | |
443 | ||
444 | class wxPyDivisionShape : public wxPyCompositeShape { | |
445 | public: | |
446 | wxPyDivisionShape(); | |
447 | ||
448 | void _setSelf(PyObject* self); | |
449 | %pragma(python) addtomethod = "__init__:self._setSelf(self)" | |
450 | ||
451 | void AdjustBottom(double bottom, bool test); | |
452 | void AdjustLeft(double left, bool test); | |
453 | void AdjustRight(double right, bool test); | |
454 | void AdjustTop(double top, bool test); | |
455 | void Divide(int direction); | |
456 | void EditEdge(int side); | |
457 | wxPyDivisionShape * GetBottomSide(); | |
458 | int GetHandleSide(); | |
459 | wxPyDivisionShape * GetLeftSide(); | |
460 | wxString GetLeftSideColour(); | |
461 | wxPen * GetLeftSidePen(); | |
462 | wxPyDivisionShape * GetRightSide(); | |
463 | wxPyDivisionShape * GetTopSide(); | |
464 | wxPen * GetTopSidePen(); | |
465 | void ResizeAdjoining(int side, double newPos, bool test); | |
466 | void PopupMenu(double x, double y); | |
467 | void SetBottomSide(wxPyDivisionShape *shape); | |
468 | void SetHandleSide(int side); | |
469 | void SetLeftSide(wxPyDivisionShape *shape); | |
470 | void SetLeftSideColour(const wxString& colour); | |
471 | void SetLeftSidePen(wxPen *pen); | |
472 | void SetRightSide(wxPyDivisionShape *shape); | |
473 | void SetTopSide(wxPyDivisionShape *shape); | |
474 | void SetTopSideColour(const wxString& colour); | |
475 | void SetTopSidePen(wxPen *pen); | |
476 | ||
477 | ||
478 | ||
479 | void base_OnDelete(); | |
480 | void base_OnDraw(wxDC& dc); | |
481 | void base_OnDrawContents(wxDC& dc); | |
482 | void base_OnDrawBranches(wxDC& dc, bool erase = FALSE); | |
483 | void base_OnMoveLinks(wxDC& dc); | |
484 | void base_OnErase(wxDC& dc); | |
485 | void base_OnEraseContents(wxDC& dc); | |
486 | void base_OnHighlight(wxDC& dc); | |
487 | void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0); | |
488 | void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); | |
489 | void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); | |
490 | void base_OnSize(double x, double y); | |
491 | bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); | |
492 | void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); | |
493 | void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); | |
494 | void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); | |
495 | void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); | |
496 | void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); | |
497 | void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0); | |
498 | void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0); | |
499 | void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); | |
500 | void base_OnDrawControlPoints(wxDC& dc); | |
501 | void base_OnEraseControlPoints(wxDC& dc); | |
502 | void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE); | |
503 | void base_OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); | |
504 | void base_OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
505 | void base_OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); | |
506 | void base_OnBeginSize(double w, double h); | |
507 | void base_OnEndSize(double w, double h); | |
508 | // void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering); | |
509 | ||
510 | }; | |
511 | ||
512 | ||
513 | ||
514 | //--------------------------------------------------------------------------- | |
515 |