git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63872
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void ShowPosition(long pos);
// overrides so that we can send text updated events
virtual void ShowPosition(long pos);
// overrides so that we can send text updated events
virtual void Cut();
virtual void Paste();
virtual void Cut();
virtual void Paste();
SendTextUpdatedEvent();
}
SendTextUpdatedEvent();
}
+void wxTextCtrl::Copy()
+{
+ if (CanCopy())
+ {
+ wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_COPY, GetId());
+ evt.SetEventObject(this);
+ if (!GetEventHandler()->ProcessEvent(evt))
+ {
+ wxTextEntry::Copy();
+ }
+ }
+}
+
void wxTextCtrl::Cut()
{
if (CanCut())
{
void wxTextCtrl::Cut()
{
if (CanCut())
{
+ wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_CUT, GetId());
+ evt.SetEventObject(this);
+ if (!GetEventHandler()->ProcessEvent(evt))
+ {
+ wxTextEntry::Cut();
- SendTextUpdatedEvent();
+ SendTextUpdatedEvent();
+ }
+ wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_PASTE, GetId());
+ evt.SetEventObject(this);
+ if (!GetEventHandler()->ProcessEvent(evt))
+ {
+ wxTextEntry::Paste();
- // TODO: eventually we should add setting the default style again
- SendTextUpdatedEvent();
+ // TODO: eventually we should add setting the default style again
+ SendTextUpdatedEvent();
+ }