-bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
-{
- frame = wxGetApp().CreateChildFrame(doc, this, FALSE);
-
- int width, height;
- frame->GetClientSize(&width, &height);
- textsw = new MyTextWindow(this, frame, wxPoint(0, 0), wxSize(width, height), wxTE_MULTILINE);
- frame->SetTitle(_T("TextEditView"));
-
-#ifdef __X__
- // X seems to require a forced resize
- int x, y;
- frame->GetSize(&x, &y);
- frame->SetSize(-1, -1, x, y);
-#endif
-
- frame->Show(TRUE);
- Activate(TRUE);
-
- return TRUE;
-}
+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()