DEC_PYCALLBACK__WXCP2DBL2INT (OnSizingEndDragLeft); \
DEC_PYCALLBACK__2DBL (OnBeginSize); \
DEC_PYCALLBACK__2DBL (OnEndSize); \
- \
- PYPRIVATE;
+ PYPRIVATE
#define WXSHAPE_IMP_CALLBACKS(CLASS, PARENT) \
IMP_PYCALLBACK__WXCP2DBL2INT (CLASS, PARENT, OnSizingBeginDragLeft);\
IMP_PYCALLBACK__WXCP2DBL2INT (CLASS, PARENT, OnSizingEndDragLeft); \
IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnBeginSize); \
- IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnEndSize); \
+ IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnEndSize)
// This one may be difficult...
//---------------------------------------------------------------------------
-// These are prototypes of some helper functions found in oglhelpers.cpp
+// These are prototypes of some helper functions found in ogl.i
-wxList* wxPy_wxListHelper(PyObject* pyList, char* className);
+wxList* wxPy_wxListHelper(PyObject* pyList, const wxChar* className);
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList);
-
+PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source);
+PyObject* wxPy_ConvertShapeList(wxListBase* list);
+PyObject* wxPy_ConvertRealPointList(wxListBase* list);
//---------------------------------------------------------------------------
// virtual callbacks into Python callbacks.
class wxPyShapeCanvas : public wxShapeCanvas {
+ DECLARE_DYNAMIC_CLASS(wxPyShapeCanvas);
public:
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxBORDER)
- : wxShapeCanvas(parent, id, pos, size, style) {}
+ long style = wxBORDER,
+ const wxString& name = wxT("shapeCanvas"))
+ : wxShapeCanvas(parent, id, pos, size, style, name) {}
DEC_PYCALLBACK__2DBLINT(OnBeginDragLeft);
DEC_PYCALLBACK__2DBLINT(OnBeginDragRight);
class wxPyShapeEvtHandler : public wxShapeEvtHandler {
+ DECLARE_DYNAMIC_CLASS(wxPyShapeEvtHandler);
public:
wxPyShapeEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL)
: wxShapeEvtHandler(prev, shape) {}
class wxPyShape : public wxShape {
+ DECLARE_ABSTRACT_CLASS(wxPyShape);
public:
wxPyShape(wxPyShapeCanvas *can = NULL)
: wxShape(can) {}
+ virtual void GetBoundingBoxMin(double *width, double *height)
+ {
+ if (width) *width = 0.0;
+ if (height) *height = 0.0;
+ }
+
WXSHAPE_DEC_CALLBACKS();
};
class wxPyRectangleShape : public wxRectangleShape {
+ DECLARE_DYNAMIC_CLASS(wxPyRectangleShape);
public:
wxPyRectangleShape(double width = 0.0, double height = 0.0)
: wxRectangleShape(width, height) {}
};
class wxPyControlPoint : public wxControlPoint {
+ DECLARE_DYNAMIC_CLASS(wxPyControlPoint);
public:
wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
wxPyShape *object = NULL,
class wxPyBitmapShape : public wxBitmapShape {
+ DECLARE_DYNAMIC_CLASS(wxPyBitmapShape);
public:
wxPyBitmapShape() : wxBitmapShape() {}
class wxPyDrawnShape : public wxDrawnShape {
+ DECLARE_DYNAMIC_CLASS(wxPyDrawnShape);
public:
wxPyDrawnShape() : wxDrawnShape() {}
class wxPyCompositeShape : public wxCompositeShape {
+ DECLARE_DYNAMIC_CLASS(wxPyCompositeShape);
public:
wxPyCompositeShape() : wxCompositeShape() {}
class wxPyDividedShape : public wxDividedShape {
+ DECLARE_DYNAMIC_CLASS(wxPyDividedShape);
public:
wxPyDividedShape(double width = 0.0, double height = 0.0)
: wxDividedShape(width, height) {}
class wxPyDivisionShape : public wxDivisionShape {
+ DECLARE_DYNAMIC_CLASS(wxPyDivisionShape);
public:
wxPyDivisionShape() : wxDivisionShape() {}
class wxPyEllipseShape : public wxEllipseShape {
+ DECLARE_DYNAMIC_CLASS(wxPyEllipseShape);
public:
wxPyEllipseShape(double width = 0.0, double height = 0.0)
: wxEllipseShape(width, height) {}
class wxPyCircleShape : public wxCircleShape {
+ DECLARE_DYNAMIC_CLASS(wxPyCircleShape);
public:
wxPyCircleShape(double width = 0.0)
: wxCircleShape(width) {}
class wxPyLineShape : public wxLineShape {
+ DECLARE_DYNAMIC_CLASS(wxPyLineShape);
public:
wxPyLineShape() : wxLineShape() {}
class wxPyPolygonShape : public wxPolygonShape {
+ DECLARE_DYNAMIC_CLASS(wxPyPolygonShape);
public:
wxPyPolygonShape() : wxPolygonShape() {}
class wxPyTextShape : public wxTextShape {
+ DECLARE_DYNAMIC_CLASS(wxPyTextShape);
public:
wxPyTextShape(double width = 0.0, double height = 0.0)
: wxTextShape(width, height) {}
//---------------------------------------------------------------------------
#endif
+