1999-09-10 02:25:47 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: oglshapes.i
|
|
|
|
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
|
|
|
|
//
|
|
|
|
// Author: Robin Dunn
|
|
|
|
//
|
|
|
|
// Created: 3-Sept-1999
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 1998 by Total Control Software
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
// not a %module
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
2003-09-18 19:48:29 -04:00
|
|
|
|
|
|
|
enum {
|
|
|
|
oglMETAFLAGS_OUTLINE,
|
|
|
|
oglMETAFLAGS_ATTACHMENTS
|
|
|
|
};
|
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
//---------------------------------------------------------------------------
|
2004-05-13 11:42:14 -04:00
|
|
|
|
|
|
|
%typemap(in) (int points, wxPoint* points_array ) {
|
|
|
|
$2 = wxPoint_LIST_helper($input, &$1);
|
|
|
|
if ($2 == NULL) SWIG_fail;
|
|
|
|
}
|
|
|
|
%typemap(freearg) (int points, wxPoint* points_array ) {
|
|
|
|
if ($2) delete [] $2;
|
|
|
|
}
|
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2001-05-17 18:47:09 -04:00
|
|
|
class wxPseudoMetaFile : public wxObject {
|
1999-09-10 02:25:47 -04:00
|
|
|
public:
|
|
|
|
wxPseudoMetaFile();
|
|
|
|
~wxPseudoMetaFile();
|
|
|
|
|
|
|
|
void Draw(wxDC& dc, double xoffset, double yoffset);
|
2003-03-25 01:35:27 -05:00
|
|
|
#ifdef wxUSE_PROLOGIO
|
1999-09-10 02:25:47 -04:00
|
|
|
void WriteAttributes(wxExpr *clause, int whichAngle);
|
|
|
|
void ReadAttributes(wxExpr *clause, int whichAngle);
|
2003-03-25 01:35:27 -05:00
|
|
|
#endif
|
1999-09-10 02:25:47 -04:00
|
|
|
void Clear();
|
|
|
|
void Copy(wxPseudoMetaFile& copy);
|
|
|
|
void Scale(double sx, double sy);
|
|
|
|
void ScaleTo(double w, double h);
|
|
|
|
void Translate(double x, double y);
|
|
|
|
void Rotate(double x, double y, double theta);
|
2003-03-25 01:35:27 -05:00
|
|
|
bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
|
1999-09-10 02:25:47 -04:00
|
|
|
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
|
2002-04-29 14:55:23 -04:00
|
|
|
void CalculateSize(wxPyDrawnShape* shape);
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
// **** fix these... is it even possible? these are lists of various GDI opperations (not the objects...)
|
|
|
|
// wxList& GetOutlineColours();
|
|
|
|
// wxList& GetFillColours();
|
|
|
|
// wxList& GetOps();
|
|
|
|
|
|
|
|
void SetRotateable(bool rot);
|
|
|
|
bool GetRotateable();
|
|
|
|
void SetSize(double w, double h);
|
|
|
|
void SetFillBrush(wxBrush* brush);
|
|
|
|
wxBrush* GetFillBrush();
|
|
|
|
void SetOutlinePen(wxPen* pen);
|
|
|
|
wxPen* GetOutlinePen();
|
|
|
|
void SetOutlineOp(int op);
|
|
|
|
int GetOutlineOp();
|
|
|
|
|
|
|
|
|
|
|
|
bool IsValid();
|
|
|
|
void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
|
|
|
|
void DrawRectangle(const wxRect& rect);
|
|
|
|
void DrawRoundedRectangle(const wxRect& rect, double radius);
|
|
|
|
void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
|
|
|
|
void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
|
|
|
|
void DrawEllipse(const wxRect& rect);
|
|
|
|
void DrawPoint(const wxPoint& pt);
|
|
|
|
void DrawText(const wxString& text, const wxPoint& pt);
|
2004-05-13 11:42:14 -04:00
|
|
|
void DrawLines(int points, wxPoint* points_array);
|
|
|
|
void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
|
|
|
|
void DrawSpline(int points, wxPoint* points_array);
|
1999-09-10 02:25:47 -04:00
|
|
|
void SetClippingRect(const wxRect& rect);
|
|
|
|
void DestroyClippingRect();
|
|
|
|
void SetPen(wxPen* pen, bool isOutline = FALSE);
|
|
|
|
void SetBrush(wxBrush* brush, bool isFill = FALSE);
|
|
|
|
void SetFont(wxFont* font);
|
|
|
|
void SetTextColour(const wxColour& colour);
|
|
|
|
void SetBackgroundColour(const wxColour& colour);
|
|
|
|
void SetBackgroundMode(int mode);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%{
|
2003-09-18 16:45:39 -04:00
|
|
|
// Using this macro can sometimes provoke an Internal Compiler Error in MSVC
|
|
|
|
// 6, so instead I'l just expand it out by hand...
|
|
|
|
// WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
|
|
|
|
|
|
|
|
IMP_PYCALLBACK__ (wxPyRectangleShape, wxRectangleShape, OnDelete);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDraw);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawContents);
|
|
|
|
IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnDrawBranches);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnMoveLinks);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnErase);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseContents);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnHighlight);
|
|
|
|
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftClick);
|
|
|
|
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftDoubleClick);
|
|
|
|
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnRightClick);
|
|
|
|
IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnSize);
|
|
|
|
IMP_PYCALLBACK_BOOL_DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePre);
|
|
|
|
IMP_PYCALLBACK__DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePost);
|
|
|
|
IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragLeft);
|
|
|
|
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragLeft);
|
|
|
|
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragLeft);
|
|
|
|
IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragRight);
|
|
|
|
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragRight);
|
|
|
|
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragRight);
|
|
|
|
IMP_PYCALLBACK__DC4DBL (wxPyRectangleShape, wxRectangleShape, OnDrawOutline);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawControlPoints);
|
|
|
|
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseControlPoints);
|
|
|
|
IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnMoveLink);
|
|
|
|
IMP_PYCALLBACK__WXCPBOOL2DBL2INT(wxPyRectangleShape, wxRectangleShape, OnSizingDragLeft);
|
|
|
|
IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingBeginDragLeft);
|
|
|
|
IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingEndDragLeft);
|
|
|
|
IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnBeginSize);
|
|
|
|
IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnEndSize)
|
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
%}
|
|
|
|
|
|
|
|
class wxPyRectangleShape : public wxPyShape {
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)"
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
wxPyRectangleShape(double width = 0.0, double height = 0.0);
|
2001-10-12 19:26:38 -04:00
|
|
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
void SetCornerRadius(double radius);
|
2004-01-02 15:37:37 -05:00
|
|
|
double GetCornerRadius();
|
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnDelete();
|
|
|
|
void base_OnDraw(wxDC& dc);
|
|
|
|
void base_OnDrawContents(wxDC& dc);
|
|
|
|
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
|
|
|
void base_OnMoveLinks(wxDC& dc);
|
|
|
|
void base_OnErase(wxDC& dc);
|
|
|
|
void base_OnEraseContents(wxDC& dc);
|
|
|
|
void base_OnHighlight(wxDC& dc);
|
|
|
|
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnSize(double x, double y);
|
2004-09-23 16:23:54 -04:00
|
|
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
|
|
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
|
|
|
void base_OnDrawControlPoints(wxDC& dc);
|
|
|
|
void base_OnEraseControlPoints(wxDC& dc);
|
2004-09-23 16:23:54 -04:00
|
|
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginSize(double w, double h);
|
|
|
|
void base_OnEndSize(double w, double h);
|
|
|
|
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%{
|
|
|
|
WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
|
|
|
|
%}
|
|
|
|
|
|
|
|
class wxPyControlPoint : public wxPyRectangleShape {
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)"
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-30 02:58:38 -04:00
|
|
|
wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
|
|
|
|
wxPyShape *object = NULL,
|
|
|
|
double size = 0.0, double the_xoffset = 0.0,
|
|
|
|
double the_yoffset = 0.0, int the_type = 0);
|
|
|
|
|
2001-10-12 19:26:38 -04:00
|
|
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
1999-09-30 02:58:38 -04:00
|
|
|
|
|
|
|
void SetCornerRadius(double radius);
|
|
|
|
|
|
|
|
void base_OnDelete();
|
|
|
|
void base_OnDraw(wxDC& dc);
|
|
|
|
void base_OnDrawContents(wxDC& dc);
|
|
|
|
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
|
|
|
void base_OnMoveLinks(wxDC& dc);
|
|
|
|
void base_OnErase(wxDC& dc);
|
|
|
|
void base_OnEraseContents(wxDC& dc);
|
|
|
|
void base_OnHighlight(wxDC& dc);
|
|
|
|
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnSize(double x, double y);
|
2004-09-23 16:23:54 -04:00
|
|
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
|
|
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
|
|
|
void base_OnDrawControlPoints(wxDC& dc);
|
|
|
|
void base_OnEraseControlPoints(wxDC& dc);
|
2004-09-23 16:23:54 -04:00
|
|
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnBeginSize(double w, double h);
|
|
|
|
void base_OnEndSize(double w, double h);
|
|
|
|
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
%{
|
|
|
|
WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape);
|
|
|
|
%}
|
|
|
|
|
|
|
|
|
|
|
|
class wxPyBitmapShape : public wxPyRectangleShape {
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)"
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
wxPyBitmapShape();
|
|
|
|
|
2001-10-12 19:26:38 -04:00
|
|
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
wxBitmap& GetBitmap();
|
|
|
|
wxString GetFilename();
|
|
|
|
void SetBitmap(const wxBitmap& bitmap);
|
|
|
|
void SetFilename(const wxString& filename);
|
|
|
|
|
|
|
|
void base_OnDelete();
|
|
|
|
void base_OnDraw(wxDC& dc);
|
|
|
|
void base_OnDrawContents(wxDC& dc);
|
|
|
|
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
|
|
|
void base_OnMoveLinks(wxDC& dc);
|
|
|
|
void base_OnErase(wxDC& dc);
|
|
|
|
void base_OnEraseContents(wxDC& dc);
|
|
|
|
void base_OnHighlight(wxDC& dc);
|
|
|
|
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnSize(double x, double y);
|
2004-09-23 16:23:54 -04:00
|
|
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
|
|
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
|
|
|
void base_OnDrawControlPoints(wxDC& dc);
|
|
|
|
void base_OnEraseControlPoints(wxDC& dc);
|
2004-09-23 16:23:54 -04:00
|
|
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnBeginSize(double w, double h);
|
|
|
|
void base_OnEndSize(double w, double h);
|
|
|
|
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
%{
|
|
|
|
WXSHAPE_IMP_CALLBACKS(wxPyDrawnShape, wxDrawnShape);
|
|
|
|
%}
|
|
|
|
|
|
|
|
class wxPyDrawnShape : public wxPyRectangleShape {
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)"
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
wxPyDrawnShape();
|
|
|
|
|
2001-10-12 19:26:38 -04:00
|
|
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
void CalculateSize();
|
|
|
|
void DestroyClippingRect();
|
|
|
|
void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint,
|
|
|
|
const wxPoint& endPoint);
|
|
|
|
void DrawAtAngle(int angle);
|
|
|
|
void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
|
|
|
|
void DrawLine(const wxPoint& point1, const wxPoint& point2);
|
2004-05-13 11:42:14 -04:00
|
|
|
void DrawLines(int points, wxPoint* points_array);
|
1999-09-10 02:25:47 -04:00
|
|
|
void DrawPoint(const wxPoint& point);
|
2004-05-13 11:42:14 -04:00
|
|
|
|
|
|
|
void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
|
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
void DrawRectangle(const wxRect& rect);
|
|
|
|
void DrawRoundedRectangle(const wxRect& rect, double radius);
|
2004-05-13 11:42:14 -04:00
|
|
|
void DrawSpline(int points, wxPoint* points_array);
|
1999-09-10 02:25:47 -04:00
|
|
|
void DrawText(const wxString& text, const wxPoint& point);
|
|
|
|
int GetAngle();
|
|
|
|
|
|
|
|
wxPseudoMetaFile& GetMetaFile();
|
|
|
|
|
|
|
|
double GetRotation();
|
2003-03-25 01:35:27 -05:00
|
|
|
bool LoadFromMetaFile(const wxString& filename);
|
1999-09-10 02:25:47 -04:00
|
|
|
void Rotate(double x, double y, double theta);
|
|
|
|
void SetClippingRect(const wxRect& rect);
|
|
|
|
void SetDrawnBackgroundColour(const wxColour& colour);
|
|
|
|
void SetDrawnBackgroundMode(int mode);
|
|
|
|
void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE);
|
|
|
|
void SetDrawnFont(wxFont* font);
|
|
|
|
void SetDrawnPen(wxPen* pen, bool isOutline = FALSE);
|
|
|
|
void SetDrawnTextColour(const wxColour& colour);
|
|
|
|
void Scale(double sx, double sy);
|
|
|
|
void SetSaveToFile(bool save);
|
|
|
|
void Translate(double x, double y);
|
|
|
|
|
|
|
|
|
|
|
|
void base_OnDelete();
|
|
|
|
void base_OnDraw(wxDC& dc);
|
|
|
|
void base_OnDrawContents(wxDC& dc);
|
|
|
|
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
|
|
|
void base_OnMoveLinks(wxDC& dc);
|
|
|
|
void base_OnErase(wxDC& dc);
|
|
|
|
void base_OnEraseContents(wxDC& dc);
|
|
|
|
void base_OnHighlight(wxDC& dc);
|
|
|
|
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnSize(double x, double y);
|
2004-09-23 16:23:54 -04:00
|
|
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
|
|
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
|
|
|
void base_OnDrawControlPoints(wxDC& dc);
|
|
|
|
void base_OnEraseControlPoints(wxDC& dc);
|
2004-09-23 16:23:54 -04:00
|
|
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnBeginSize(double w, double h);
|
|
|
|
void base_OnEndSize(double w, double h);
|
|
|
|
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2001-05-17 18:47:09 -04:00
|
|
|
class wxOGLConstraint : public wxObject {
|
1999-09-10 02:25:47 -04:00
|
|
|
public:
|
|
|
|
//wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
|
2003-11-12 16:34:20 -05:00
|
|
|
%extend {
|
1999-09-10 02:25:47 -04:00
|
|
|
wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
|
2003-11-12 16:34:20 -05:00
|
|
|
wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
|
1999-09-10 02:25:47 -04:00
|
|
|
wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
|
|
|
|
delete list;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
}
|
2001-02-28 14:15:15 -05:00
|
|
|
|
|
|
|
//~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
bool Evaluate();
|
|
|
|
void SetSpacing(double x, double y);
|
|
|
|
bool Equals(double a, double b);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%{
|
|
|
|
WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
|
|
|
|
%}
|
|
|
|
|
|
|
|
class wxPyCompositeShape : public wxPyRectangleShape {
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)"
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
wxPyCompositeShape();
|
|
|
|
|
2001-10-12 19:26:38 -04:00
|
|
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
|
|
|
|
wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
|
|
|
|
|
2000-02-16 00:57:16 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
//wxOGLConstraint * AddConstraint(int type,
|
|
|
|
// wxPyShape *constraining,
|
|
|
|
// wxList& constrained);
|
2003-11-12 16:34:20 -05:00
|
|
|
%extend {
|
2000-02-16 00:57:16 -05:00
|
|
|
wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
|
|
|
|
PyObject* constrained) {
|
2003-11-12 16:34:20 -05:00
|
|
|
wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
|
2000-02-16 00:57:16 -05:00
|
|
|
wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
|
|
|
|
delete list;
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
}
|
1999-09-10 02:25:47 -04:00
|
|
|
|
2004-12-23 15:44:09 -05:00
|
|
|
%Rename(AddSimpleConstraint, wxOGLConstraint*, AddConstraint(int type,
|
1999-09-10 02:25:47 -04:00
|
|
|
wxPyShape *constraining,
|
2004-12-23 15:44:09 -05:00
|
|
|
wxPyShape *constrained));
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
void CalculateSize();
|
|
|
|
bool ContainsDivision(wxPyDivisionShape *division);
|
|
|
|
void DeleteConstraint(wxOGLConstraint *constraint);
|
|
|
|
void DeleteConstraintsInvolvingChild(wxPyShape *child);
|
|
|
|
|
|
|
|
// **** Needs an output typemap
|
|
|
|
//wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite);
|
|
|
|
|
|
|
|
wxPyShape * FindContainerImage();
|
|
|
|
|
|
|
|
// wxList& GetConstraints();
|
|
|
|
// wxList& GetDivisions();
|
2003-11-12 16:34:20 -05:00
|
|
|
%extend {
|
1999-09-10 02:25:47 -04:00
|
|
|
PyObject* GetConstraints() {
|
|
|
|
wxList& list = self->GetConstraints();
|
2003-11-12 16:34:20 -05:00
|
|
|
return wxPy_ConvertList(&list);
|
1999-09-10 02:25:47 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
PyObject* GetDivisions() {
|
|
|
|
wxList& list = self->GetDivisions();
|
2003-11-12 16:34:20 -05:00
|
|
|
return wxPy_ConvertShapeList(&list);
|
1999-09-10 02:25:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void MakeContainer();
|
|
|
|
bool Recompute();
|
|
|
|
void RemoveChild(wxPyShape *child);
|
|
|
|
|
|
|
|
|
|
|
|
void base_OnDelete();
|
|
|
|
void base_OnDraw(wxDC& dc);
|
|
|
|
void base_OnDrawContents(wxDC& dc);
|
|
|
|
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
|
|
|
void base_OnMoveLinks(wxDC& dc);
|
|
|
|
void base_OnErase(wxDC& dc);
|
|
|
|
void base_OnEraseContents(wxDC& dc);
|
|
|
|
void base_OnHighlight(wxDC& dc);
|
|
|
|
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnSize(double x, double y);
|
2004-09-23 16:23:54 -04:00
|
|
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
|
|
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
|
|
|
void base_OnDrawControlPoints(wxDC& dc);
|
|
|
|
void base_OnEraseControlPoints(wxDC& dc);
|
2004-09-23 16:23:54 -04:00
|
|
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnBeginSize(double w, double h);
|
|
|
|
void base_OnEndSize(double w, double h);
|
|
|
|
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%{
|
|
|
|
WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape);
|
|
|
|
%}
|
|
|
|
|
|
|
|
class wxPyDividedShape : public wxPyRectangleShape {
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)"
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
wxPyDividedShape(double width = 0.0, double height = 0.0);
|
|
|
|
|
2001-10-12 19:26:38 -04:00
|
|
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
void EditRegions();
|
|
|
|
void SetRegionSizes();
|
|
|
|
|
|
|
|
void base_OnDelete();
|
|
|
|
void base_OnDraw(wxDC& dc);
|
|
|
|
void base_OnDrawContents(wxDC& dc);
|
|
|
|
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
|
|
|
void base_OnMoveLinks(wxDC& dc);
|
|
|
|
void base_OnErase(wxDC& dc);
|
|
|
|
void base_OnEraseContents(wxDC& dc);
|
|
|
|
void base_OnHighlight(wxDC& dc);
|
|
|
|
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnSize(double x, double y);
|
2004-09-23 16:23:54 -04:00
|
|
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
|
|
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
|
|
|
void base_OnDrawControlPoints(wxDC& dc);
|
|
|
|
void base_OnEraseControlPoints(wxDC& dc);
|
2004-09-23 16:23:54 -04:00
|
|
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnBeginSize(double w, double h);
|
|
|
|
void base_OnEndSize(double w, double h);
|
|
|
|
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
%{
|
|
|
|
WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape);
|
|
|
|
%}
|
|
|
|
|
|
|
|
class wxPyDivisionShape : public wxPyCompositeShape {
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
|
2004-07-17 18:51:01 -04:00
|
|
|
%typemap(out) wxPyDivisionShape*; // turn off this typemap
|
2003-11-12 16:34:20 -05:00
|
|
|
|
1999-09-10 02:25:47 -04:00
|
|
|
wxPyDivisionShape();
|
|
|
|
|
2004-07-17 18:51:01 -04:00
|
|
|
%typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
|
|
|
|
|
2001-10-12 19:26:38 -04:00
|
|
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
1999-09-10 02:25:47 -04:00
|
|
|
|
|
|
|
void AdjustBottom(double bottom, bool test);
|
|
|
|
void AdjustLeft(double left, bool test);
|
|
|
|
void AdjustRight(double right, bool test);
|
|
|
|
void AdjustTop(double top, bool test);
|
|
|
|
void Divide(int direction);
|
|
|
|
void EditEdge(int side);
|
|
|
|
wxPyDivisionShape * GetBottomSide();
|
|
|
|
int GetHandleSide();
|
|
|
|
wxPyDivisionShape * GetLeftSide();
|
|
|
|
wxString GetLeftSideColour();
|
|
|
|
wxPen * GetLeftSidePen();
|
|
|
|
wxPyDivisionShape * GetRightSide();
|
|
|
|
wxPyDivisionShape * GetTopSide();
|
|
|
|
wxPen * GetTopSidePen();
|
|
|
|
void ResizeAdjoining(int side, double newPos, bool test);
|
|
|
|
void PopupMenu(double x, double y);
|
|
|
|
void SetBottomSide(wxPyDivisionShape *shape);
|
|
|
|
void SetHandleSide(int side);
|
|
|
|
void SetLeftSide(wxPyDivisionShape *shape);
|
|
|
|
void SetLeftSideColour(const wxString& colour);
|
|
|
|
void SetLeftSidePen(wxPen *pen);
|
|
|
|
void SetRightSide(wxPyDivisionShape *shape);
|
|
|
|
void SetTopSide(wxPyDivisionShape *shape);
|
|
|
|
void SetTopSideColour(const wxString& colour);
|
|
|
|
void SetTopSidePen(wxPen *pen);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void base_OnDelete();
|
|
|
|
void base_OnDraw(wxDC& dc);
|
|
|
|
void base_OnDrawContents(wxDC& dc);
|
|
|
|
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
|
|
|
void base_OnMoveLinks(wxDC& dc);
|
|
|
|
void base_OnErase(wxDC& dc);
|
|
|
|
void base_OnEraseContents(wxDC& dc);
|
|
|
|
void base_OnHighlight(wxDC& dc);
|
|
|
|
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
void base_OnSize(double x, double y);
|
2004-09-23 16:23:54 -04:00
|
|
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
|
|
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
|
|
|
void base_OnDrawControlPoints(wxDC& dc);
|
|
|
|
void base_OnEraseControlPoints(wxDC& dc);
|
2004-09-23 16:23:54 -04:00
|
|
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
|
1999-09-30 02:58:38 -04:00
|
|
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
|
|
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
1999-09-10 02:25:47 -04:00
|
|
|
void base_OnBeginSize(double w, double h);
|
|
|
|
void base_OnEndSize(double w, double h);
|
|
|
|
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|