]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/docview/view.cpp
compilation fix for newest DirectFB versions (patch #1939443 by Anders Larsen)
[wxWidgets.git] / samples / docview / view.cpp
index d2a02dccdb24319ef7770dedb9f3cf6fcffc919d..5a4d9e63bc619406218d7d1497c9b9d7e942332b 100644 (file)
@@ -156,6 +156,12 @@ void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) )
 
 IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView)
 
+BEGIN_EVENT_TABLE(TextEditView, wxView)
+    EVT_MENU(wxID_COPY, TextEditView::OnCopy)
+    EVT_MENU(wxID_PASTE, TextEditView::OnPaste)
+    EVT_MENU(wxID_SELECTALL, TextEditView::OnSelectAll)
+END_EVENT_TABLE()
+
 bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
 {
     m_frame = wxGetApp().CreateChildFrame(doc, this, false);
@@ -201,21 +207,6 @@ bool TextEditView::OnClose(bool deleteWindow)
     return true;
 }
 
-bool TextEditView::ProcessEvent(wxEvent& event)
-{
-    bool processed = false;
-    if (!processed) switch (event.GetId())
-    {
-        case wxID_COPY:
-        case wxID_PASTE:
-        case wxID_SELECTALL:
-            processed = m_textsw->ProcessEvent(event);
-            break;
-    }
-    if (!processed) processed = wxView::ProcessEvent(event);
-    return processed;
-}
-
 /*
 * Window implementations
 */