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);
#ifdef __X__
// X seems to require a forced resize
int x, y;
- frame->GetSize(&x, &y);
- frame->SetSize(wxDefaultCoord, wxDefaultCoord, x, y);
+ m_frame->GetSize(&x, &y);
+ m_frame->SetSize(wxDefaultCoord, wxDefaultCoord, x, y);
#endif
m_frame->Show(true);
if (deleteWindow)
{
- wxDELETE(m_frame)
- return true;
+ wxDELETE(m_frame);
}
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
*/