X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/345c78ca5fa57ea6c7dc7e6a05496a8e82aa2b50..af4168e2cfbeffbe3b53380471aa31e9ab63a598:/src/propgrid/editors.cpp diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index ca996be935..3b0d7973fe 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: 2007-04-14 -// RCS-ID: $Id$ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -406,14 +405,14 @@ bool wxPGTextCtrlEditor::OnTextCtrlEvent( wxPropertyGrid* propGrid, if ( !ctrl ) return false; - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER ) + if ( event.GetEventType() == wxEVT_TEXT_ENTER ) { if ( propGrid->IsEditorsValueModified() ) { return true; } } - else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED ) + else if ( event.GetEventType() == wxEVT_TEXT ) { // // Pass this event outside wxPropertyGrid so that, @@ -497,7 +496,7 @@ void wxPGTextCtrlEditor_OnFocus( wxPGProperty* property, tc->SetValue(correctText); } - tc->SetSelection(-1,-1); + tc->SelectAll(); } void wxPGTextCtrlEditor::OnFocus( wxPGProperty* property, @@ -882,7 +881,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb, if ( comValIndex >= 0 ) { const wxPGCommonValue* cv = GetCommonValue(comValIndex); - wxPGCellRenderer* renderer = cv->GetRenderer(); + renderer = cv->GetRenderer(); r.width = rect.width; renderer->Render( dc, r, this, p, m_selColumn, comValIndex, renderFlags ); return; @@ -1129,7 +1128,7 @@ void wxPGChoiceEditor::DeleteItem( wxWindow* ctrl, int index ) const bool wxPGChoiceEditor::OnEvent( wxPropertyGrid* propGrid, wxPGProperty* property, wxWindow* ctrl, wxEvent& event ) const { - if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED ) + if ( event.GetEventType() == wxEVT_COMBOBOX ) { wxPGComboBox* cb = (wxPGComboBox*)ctrl; int index = cb->GetSelection(); @@ -1587,7 +1586,7 @@ void wxSimpleCheckBox::SetValue( int value ) } Refresh(); - wxCommandEvent evt(wxEVT_COMMAND_CHECKBOX_CLICKED,GetParent()->GetId()); + wxCommandEvent evt(wxEVT_CHECKBOX,GetParent()->GetId()); wxPropertyGrid* propGrid = (wxPropertyGrid*) GetParent(); wxASSERT( wxDynamicCast(propGrid, wxPropertyGrid) ); @@ -1619,8 +1618,8 @@ wxPGWindowList wxPGCheckBoxEditor::CreateControls( wxPropertyGrid* propGrid, // If mouse cursor was on the item, toggle the value now. if ( propGrid->GetInternalFlags() & wxPG_FL_ACTIVATION_BY_CLICK ) { - wxPoint pt = cb->ScreenToClient(::wxGetMousePosition()); - if ( pt.x <= (wxPG_XBEFORETEXT-2+cb->m_boxHeight) ) + wxPoint point = cb->ScreenToClient(::wxGetMousePosition()); + if ( point.x <= (wxPG_XBEFORETEXT-2+cb->m_boxHeight) ) { if ( cb->m_state & wxSCB_STATE_CHECKED ) cb->m_state &= ~wxSCB_STATE_CHECKED; @@ -1680,7 +1679,7 @@ void wxPGCheckBoxEditor::UpdateControl( wxPGProperty* property, bool wxPGCheckBoxEditor::OnEvent( wxPropertyGrid* WXUNUSED(propGrid), wxPGProperty* WXUNUSED(property), wxWindow* WXUNUSED(ctrl), wxEvent& event ) const { - if ( event.GetEventType() == wxEVT_COMMAND_CHECKBOX_CLICKED ) + if ( event.GetEventType() == wxEVT_CHECKBOX ) { return true; }