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:
Robin Dunn
2002-07-06 04:14:52 +00:00
parent e2e02194a9
commit 4fcf77bc06
5 changed files with 45 additions and 12 deletions

View File

@@ -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);

View File

@@ -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;