X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f4e928794167715f19a3021d62b7c4f77611694..969d9b6fa963c0f14298e0ec8aa88b6d6292a6f8:/wxPython/contrib/ogl/oglhelpers.h diff --git a/wxPython/contrib/ogl/oglhelpers.h b/wxPython/contrib/ogl/oglhelpers.h index ef4be52d3d..a4c12d68ff 100644 --- a/wxPython/contrib/ogl/oglhelpers.h +++ b/wxPython/contrib/ogl/oglhelpers.h @@ -54,8 +54,7 @@ DEC_PYCALLBACK__WXCP2DBL2INT (OnSizingEndDragLeft); \ DEC_PYCALLBACK__2DBL (OnBeginSize); \ DEC_PYCALLBACK__2DBL (OnEndSize); \ - \ - PYPRIVATE; + PYPRIVATE #define WXSHAPE_IMP_CALLBACKS(CLASS, PARENT) \ @@ -87,7 +86,7 @@ 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... @@ -98,10 +97,11 @@ //--------------------------------------------------------------------------- // 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); //--------------------------------------------------------------------------- @@ -114,8 +114,9 @@ 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); @@ -147,6 +148,12 @@ 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(); };