Added name to wxShapeCanvas ctor for consistency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e2e02194a9
commit
4fcf77bc06
@ -23,6 +23,8 @@
|
||||
#define StartDraggingRight 3
|
||||
#define ContinueDraggingRight 4
|
||||
|
||||
extern wxChar* wxShapeCanvasNameStr;
|
||||
|
||||
// When drag_count reaches 0, process drag message
|
||||
|
||||
class wxDiagram;
|
||||
@ -31,8 +33,11 @@ class wxShapeCanvas: public wxScrolledWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxShapeCanvas)
|
||||
public:
|
||||
wxShapeCanvas(wxWindow *parent = NULL, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER | wxRETAINED);
|
||||
wxShapeCanvas(wxWindow *parent = NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER | wxRETAINED,
|
||||
const wxString& name = wxShapeCanvasNameStr);
|
||||
~wxShapeCanvas();
|
||||
|
||||
inline void SetDiagram(wxDiagram *diag) { m_shapeDiagram = diag; }
|
||||
@ -54,7 +59,7 @@ class wxShapeCanvas: public wxScrolledWindow
|
||||
virtual wxShape *FindShape(double x, double y, int *attachment, wxClassInfo *info = NULL, wxShape *notImage = NULL);
|
||||
wxShape *FindFirstSensitiveShape(double x, double y, int *new_attachment, int op);
|
||||
wxShape *FindFirstSensitiveShape1(wxShape *image, int op);
|
||||
|
||||
|
||||
// Redirect to wxDiagram object
|
||||
virtual void AddShape(wxShape *object, wxShape *addAfter = NULL);
|
||||
virtual void InsertShape(wxShape *object);
|
||||
|
@ -68,9 +68,15 @@ BEGIN_EVENT_TABLE(wxShapeCanvas, wxScrolledWindow)
|
||||
EVT_MOUSE_EVENTS(wxShapeCanvas::OnMouseEvent)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxChar* wxShapeCanvasNameStr = wxT("shapeCanvas");
|
||||
|
||||
// Object canvas
|
||||
wxShapeCanvas::wxShapeCanvas(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style):
|
||||
wxScrolledWindow(parent, id, pos, size, style)
|
||||
wxShapeCanvas::wxShapeCanvas(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name):
|
||||
wxScrolledWindow(parent, id, pos, size, style, name)
|
||||
{
|
||||
m_shapeDiagram = NULL;
|
||||
m_dragState = NoDragging;
|
||||
|
@ -85,6 +85,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
return target;
|
||||
}
|
||||
|
||||
// Put some wx default wxChar* values into wxStrings.
|
||||
DECLARE_DEF_STRING(ShapeCanvasNameStr);
|
||||
|
||||
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragLeft);
|
||||
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragRight);
|
||||
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnEndDragLeft);
|
||||
@ -1157,7 +1160,7 @@ static void *SwigwxPyShapeCanvasTowxObject(void *ptr) {
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxPyShapeCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxPyShapeCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
|
||||
#define new_wxPyShapeCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPyShapeCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
|
||||
static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxPyShapeCanvas * _result;
|
||||
@ -1166,16 +1169,18 @@ static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObj
|
||||
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
|
||||
long _arg4 = (long ) wxBORDER;
|
||||
wxString * _arg5 = (wxString *) &wxPyShapeCanvasNameStr;
|
||||
PyObject * _argo0 = 0;
|
||||
wxPoint temp;
|
||||
PyObject * _obj2 = 0;
|
||||
wxSize temp0;
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "parent","id","pos","size","style", NULL };
|
||||
PyObject * _obj5 = 0;
|
||||
char *_kwnames[] = { "parent","id","pos","size","style","name", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OiOOl:new_wxPyShapeCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OiOOlO:new_wxPyShapeCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@ -1195,10 +1200,16 @@ static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObj
|
||||
_arg3 = &temp0;
|
||||
if (! wxSize_helper(_obj3, &_arg3))
|
||||
return NULL;
|
||||
}
|
||||
if (_obj5)
|
||||
{
|
||||
_arg5 = wxString_in_helper(_obj5);
|
||||
if (_arg5 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxPyShapeCanvas *)new_wxPyShapeCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4);
|
||||
_result = (wxPyShapeCanvas *)new_wxPyShapeCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@ -1209,6 +1220,10 @@ static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObj
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
{
|
||||
if (_obj5)
|
||||
delete _arg5;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,11 @@
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
%{
|
||||
// Put some wx default wxChar* values into wxStrings.
|
||||
DECLARE_DEF_STRING(ShapeCanvasNameStr);
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@ -114,7 +119,8 @@ public:
|
||||
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER);
|
||||
long style = wxBORDER,
|
||||
const wxString& name = wxPyShapeCanvasNameStr);
|
||||
|
||||
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeCanvas)"
|
||||
|
@ -115,8 +115,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);
|
||||
|
Loading…
Reference in New Issue
Block a user