diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 68c4c4cbae..4c6b0b3873 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -845,8 +845,8 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb, } // If not drawing a selected popup item, then give property's - // m_valueBitmap a chance. - if ( p->m_valueBitmap && item != pCb->GetSelection() ) + // value image a chance. + if ( p->GetValueImage() && item != pCb->GetSelection() ) useCustomPaintProcedure = false; // If current choice had a bitmap set by the application, then // use it instead of any custom paint procedure @@ -2073,7 +2073,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrlAndButton( const wxPoint& pos, if ( !property->IsValueUnspecified() ) text = property->GetValueAsString(property->HasFlag(wxPG_PROP_READONLY)?0:wxPG_EDITABLE_VALUE); - return GenerateEditorTextCtrl(pos,sz,text,but,property->m_maxLen); + return GenerateEditorTextCtrl(pos,sz,text,but,property->GetMaxLength()); } // ----------------------------------------------------------------------- diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index b01f2f82b1..4dfc0cc707 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -2205,7 +2205,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc, // Use basic depth if in non-categoric mode and parent is base array. if ( !(windowStyle & wxPG_HIDE_CATEGORIES) || p->GetParent() != m_pState->m_properties ) { - textMarginHere += ((unsigned int)((p->m_depth-1)*m_subgroup_extramargin)); + textMarginHere += ((p->GetDepth()-1)*m_subgroup_extramargin); } // Paint margin area @@ -2332,7 +2332,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc, bool fontChanged = false; // Expander button rectangle - wxRect butRect( ((p->m_depth - 1) * m_subgroup_extramargin) - xRelMod, + wxRect butRect( ((p->GetDepth() - 1) * m_subgroup_extramargin) - xRelMod, y, m_marginWidth, lh ); @@ -3747,7 +3747,7 @@ wxRect wxPropertyGrid::GetEditorWidgetRect( wxPGProperty* p, int column ) const } else if ( column == 0 ) { - splitterX += (p->m_depth - 1) * m_subgroup_extramargin; + splitterX += (p->GetDepth() - 1) * m_subgroup_extramargin; } return wxRect @@ -3780,7 +3780,7 @@ wxSize wxPropertyGrid::GetImageSize( wxPGProperty* p, int item ) const wxSize cis = p->OnMeasureImage(item); - int choiceCount = p->m_choices.GetCount(); + int choiceCount = p->GetChoices().GetCount(); int comVals = p->GetDisplayedCommonValueCount(); if ( item >= choiceCount && comVals > 0 ) { @@ -4017,8 +4017,8 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) /* if (p) { - wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->m_label.c_str(), - p->m_parent->m_label.c_str(),p->GetIndexInParent()); + wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->GetLabel().c_str(), + p->m_parent->GetLabel().c_str(),p->GetIndexInParent()); } else { @@ -4781,7 +4781,7 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even // This is category. wxPropertyCategory* pwc = (wxPropertyCategory*)p; - int textX = m_marginWidth + ((unsigned int)((pwc->m_depth-1)*m_subgroup_extramargin)); + int textX = m_marginWidth + ((pwc->GetDepth()-1)*m_subgroup_extramargin); // Expand, collapse, activate etc. if click on text or left of splitter. if ( x >= textX @@ -5081,7 +5081,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y, if ( m_mouseSide == 1 ) { - tipString = m_propHover->m_label; + tipString = m_propHover->GetLabel(); space = splitterX-m_marginWidth-3; } else if ( m_mouseSide == 2 ) diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index cec59c2a4f..3f002e9323 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -478,7 +478,7 @@ wxPGProperty* wxPropertyGridPageState::BaseGetPropertyByLabel for ( size_t i=0; iGetChildCount(); i++ ) { wxPGProperty* p = parent->Item(i); - if ( p->m_label == label ) + if ( p->GetLabel() == label ) return p; // Check children recursively. if ( p->GetChildCount() ) @@ -813,7 +813,7 @@ int wxPropertyGridPageState::GetColumnFitWidth(wxClientDC& dc, p->GetDisplayInfo(col, -1, 0, &text, (wxPGCell*)NULL); dc.GetTextExtent(text, &w, &h); if ( col == 0 ) - w += ( ((int)p->m_depth-1) * pg->m_subgroup_extramargin ); + w += ( (p->GetDepth()-1) * pg->m_subgroup_extramargin ); // account for the bitmap if ( col == 1 ) @@ -849,7 +849,7 @@ int wxPropertyGridPageState::GetColumnFullWidth( wxClientDC &dc, wxPGProperty *p int w = dc.GetTextExtent(text).x; if ( col == 0 ) - w += (int)p->m_depth * m_pPropGrid->m_subgroup_extramargin; + w += p->GetDepth() * m_pPropGrid->m_subgroup_extramargin; // account for the bitmap if ( col == 1 ) @@ -1507,9 +1507,9 @@ wxVariant wxPropertyGridPageState::DoGetPropertyValues( const wxString& listname } else { - v.Append( DoGetPropertyValues(p->m_name,p,flags|wxPG_KEEP_STRUCTURE) ); + v.Append( DoGetPropertyValues(p->GetBaseName(),p,flags|wxPG_KEEP_STRUCTURE) ); } - if ( (flags & wxPG_INC_ATTRIBUTES) && p->m_attributes.GetCount() ) + if ( (flags & wxPG_INC_ATTRIBUTES) && p->GetAttributes().GetCount() ) v.Append( p->GetAttributesAsList() ); } } @@ -1528,7 +1528,7 @@ wxVariant wxPropertyGridPageState::DoGetPropertyValues( const wxString& listname wxVariant variant = p->GetValue(); variant.SetName( p->GetName() ); v.Append( variant ); - if ( (flags & wxPG_INC_ATTRIBUTES) && p->m_attributes.GetCount() ) + if ( (flags & wxPG_INC_ATTRIBUTES) && p->GetAttributes().GetCount() ) v.Append( p->GetAttributesAsList() ); } } @@ -1854,9 +1854,9 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index } // Only add name to hashmap if parent is root or category - if ( !property->m_name.empty() && + if ( !property->GetBaseName().empty() && (parentIsCategory || parentIsRoot) ) - m_dictName[property->m_name] = (void*) property; + m_dictName[property->GetBaseName()] = (void*) property; VirtualHeightChanged();