For efficiency reasons, text controls no longer set the string for each text updated event, but rather query for the string value only when GetString is called from an event handler

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Hock 2005-01-18 15:17:05 +00:00
parent ab1931f98e
commit 72e430cd97
7 changed files with 0 additions and 11 deletions

View File

@ -202,7 +202,6 @@ gtk_text_changed_callback( GtkWidget *widget, wxTextCtrl *win )
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() );
event.SetEventObject( win );
event.SetString( win->GetValue() );
win->GetEventHandler()->ProcessEvent( event );
}

View File

@ -202,7 +202,6 @@ gtk_text_changed_callback( GtkWidget *widget, wxTextCtrl *win )
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() );
event.SetEventObject( win );
event.SetString( win->GetValue() );
win->GetEventHandler()->ProcessEvent( event );
}

View File

@ -484,7 +484,6 @@ void wxTextCtrl::Cut()
GetPeer()->Cut() ;
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
event.SetString( GetValue() ) ;
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
}
@ -498,7 +497,6 @@ void wxTextCtrl::Paste()
// eventually we should add setting the default style again
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
event.SetString( GetValue() ) ;
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
}
@ -907,7 +905,6 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
key == WXK_BACK)
{
wxCommandEvent event1(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
event1.SetString( GetValue() ) ;
event1.SetEventObject( this );
wxPostEvent(GetEventHandler(),event1);
}

View File

@ -1039,7 +1039,6 @@ void wxTextCtrl::Cut()
TXNConvertToPublicScrap();
}
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
event.SetString( GetValue() ) ;
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
}
@ -1062,7 +1061,6 @@ void wxTextCtrl::Paste()
SetStyle( kTXNUseCurrentSelection , kTXNUseCurrentSelection , GetDefaultStyle() ) ;
}
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
event.SetString( GetValue() ) ;
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
}
@ -1704,7 +1702,6 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
key == WXK_BACK)
{
wxCommandEvent event1(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
event1.SetString( GetValue() ) ;
event1.SetEventObject( this );
wxPostEvent(GetEventHandler(),event1);
}

View File

@ -1836,7 +1836,6 @@ bool wxTextCtrl::SendUpdateEvent()
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());
InitCommandEvent(event);
event.SetString(GetValue());
return ProcessCommand(event);
}

View File

@ -1103,7 +1103,6 @@ bool wxTextCtrl::OS2Command(
);
InitCommandEvent(vEvent);
vEvent.SetString((char*)GetValue().c_str());
ProcessCommand(vEvent);
}
break;

View File

@ -4680,7 +4680,6 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());
InitCommandEvent(event);
event.SetString(GetValue());
GetEventHandler()->ProcessEvent(event);
// as the text changed...