fix wxSashEvent, wxFindDialogEvent, wxSplitterEvent to implement Clone() correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -142,6 +142,8 @@ class WXDLLIMPEXP_CORE wxFindDialogEvent : public wxCommandEvent
|
|||||||
public:
|
public:
|
||||||
wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
||||||
: wxCommandEvent(commandType, id) { }
|
: wxCommandEvent(commandType, id) { }
|
||||||
|
wxFindDialogEvent(const wxFindDialogEvent& event)
|
||||||
|
: wxCommandEvent(event), m_strReplace(event.m_strReplace) { }
|
||||||
|
|
||||||
int GetFlags() const { return GetInt(); }
|
int GetFlags() const { return GetInt(); }
|
||||||
wxString GetFindString() const { return GetString(); }
|
wxString GetFindString() const { return GetString(); }
|
||||||
@@ -155,10 +157,12 @@ public:
|
|||||||
void SetFindString(const wxString& str) { SetString(str); }
|
void SetFindString(const wxString& str) { SetString(str); }
|
||||||
void SetReplaceString(const wxString& str) { m_strReplace = str; }
|
void SetReplaceString(const wxString& str) { m_strReplace = str; }
|
||||||
|
|
||||||
|
virtual wxEvent *Clone() const { return new wxFindDialogEvent(*this); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxString m_strReplace;
|
wxString m_strReplace;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxFindDialogEvent)
|
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFindDialogEvent)
|
||||||
};
|
};
|
||||||
|
|
||||||
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_FIND;
|
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_FIND;
|
||||||
|
@@ -221,6 +221,12 @@ public:
|
|||||||
m_edge = edge;
|
m_edge = edge;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxSashEvent(const wxSashEvent& event)
|
||||||
|
: wxCommandEvent(event),
|
||||||
|
m_edge(event.m_edge),
|
||||||
|
m_dragRect(event.m_dragRect),
|
||||||
|
m_dragStatus(event.m_dragStatus) { }
|
||||||
|
|
||||||
void SetEdge(wxSashEdgePosition edge) { m_edge = edge; }
|
void SetEdge(wxSashEdgePosition edge) { m_edge = edge; }
|
||||||
wxSashEdgePosition GetEdge() const { return m_edge; }
|
wxSashEdgePosition GetEdge() const { return m_edge; }
|
||||||
|
|
||||||
@@ -233,13 +239,15 @@ public:
|
|||||||
void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
|
void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
|
||||||
wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
|
wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
|
||||||
|
|
||||||
|
virtual wxEvent *Clone() const { return new wxSashEvent(*this); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxSashEdgePosition m_edge;
|
wxSashEdgePosition m_edge;
|
||||||
wxRect m_dragRect;
|
wxRect m_dragRect;
|
||||||
wxSashDragStatus m_dragStatus;
|
wxSashDragStatus m_dragStatus;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxSashEvent)
|
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSashEvent)
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
|
typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
|
||||||
|
@@ -322,6 +322,8 @@ public:
|
|||||||
SetEventObject(splitter);
|
SetEventObject(splitter);
|
||||||
if (splitter) m_id = splitter->GetId();
|
if (splitter) m_id = splitter->GetId();
|
||||||
}
|
}
|
||||||
|
wxSplitterEvent(const wxSplitterEvent& event)
|
||||||
|
: wxNotifyEvent(event), m_data(event.m_data) { }
|
||||||
|
|
||||||
// SASH_POS_CHANGED methods
|
// SASH_POS_CHANGED methods
|
||||||
|
|
||||||
@@ -366,6 +368,8 @@ public:
|
|||||||
return m_data.pt.y;
|
return m_data.pt.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual wxEvent *Clone() const { return new wxSplitterEvent(*this); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class WXDLLIMPEXP_FWD_CORE wxSplitterWindow;
|
friend class WXDLLIMPEXP_FWD_CORE wxSplitterWindow;
|
||||||
|
|
||||||
@@ -380,7 +384,7 @@ private:
|
|||||||
} pt; // position of double click for DCLICK event
|
} pt; // position of double click for DCLICK event
|
||||||
} m_data;
|
} m_data;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxSplitterEvent)
|
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSplitterEvent)
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
|
typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
|
||||||
|
Reference in New Issue
Block a user