Use getter methods to get access to wxPGProperty member variables.
Use GetValueImage() getter to get access to m_valueBitmap data member. Use GetMaxLength() getter to get access to m_maxLen data member. Use GetAttributes() getter to get access to m_attributes data member. Use GetChoices() to get access to m_choices data member. Use GetDepth() to get access to m_depth member variable. Use GetBaseName() method to get access to m_name data member Use GetLabel() method to get access to m_label member variable. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
@@ -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 )
|
||||
|
@@ -478,7 +478,7 @@ wxPGProperty* wxPropertyGridPageState::BaseGetPropertyByLabel
|
||||
for ( size_t i=0; i<parent->GetChildCount(); 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();
|
||||
|
||||
|
Reference in New Issue
Block a user