+ m_contextMenu = new wxMenu;
+ m_contextMenu->Append(wxID_UNDO, _("&Undo"));
+ m_contextMenu->Append(wxID_REDO, _("&Redo"));
+ m_contextMenu->AppendSeparator();
+ m_contextMenu->Append(wxID_CUT, _("Cu&t"));
+ m_contextMenu->Append(wxID_COPY, _("&Copy"));
+ m_contextMenu->Append(wxID_PASTE, _("&Paste"));
+ m_contextMenu->Append(wxID_CLEAR, _("&Delete"));
+ m_contextMenu->AppendSeparator();
+ m_contextMenu->Append(wxID_SELECTALL, _("Select &All"));
+
+ long ids = wxWindow::NewControlId();
+ m_contextMenu->AppendSeparator();
+ m_contextMenu->Append(ids, _("&Properties"));
+
+ Connect(ids, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxRichTextCtrl::OnUpdateImage));
+ Connect(ids, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxRichTextCtrl::OnImage));
+ m_imagePropertyId = ids;