Use getter functions to get access to some properties of wxPropertyGrid.
Use existing GetFontHeight(), GetRowHeight(), GetCaptionFont(), GetMarginWidth(), HasFlag(), GetParent() functions instead of getting direct access to corresponding member variables.
This commit is contained in:
@@ -764,7 +764,7 @@ wxPGProperty* wxPropertyGridPageState::DoGetItemAtY( int y ) const
|
||||
return NULL;
|
||||
|
||||
unsigned int a = 0;
|
||||
return m_properties->GetItemAtY(y, GetGrid()->m_lineHeight, &a);
|
||||
return m_properties->GetItemAtY(y, GetGrid()->GetRowHeight(), &a);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -849,7 +849,7 @@ int wxPropertyGridPageState::GetColumnFullWidth( wxClientDC &dc, wxPGProperty *p
|
||||
|
||||
int wxPropertyGridPageState::DoGetSplitterPosition( int splitterColumn ) const
|
||||
{
|
||||
int n = GetGrid()->m_marginWidth;
|
||||
int n = GetGrid()->GetMarginWidth();
|
||||
int i;
|
||||
for ( i=0; i<=splitterColumn; i++ )
|
||||
n += m_colWidths[i];
|
||||
@@ -961,7 +961,7 @@ void wxPropertyGridPageState::SetSplitterLeft( bool subProps )
|
||||
|
||||
if ( maxW > 0 )
|
||||
{
|
||||
maxW += pg->m_marginWidth;
|
||||
maxW += pg->GetMarginWidth();
|
||||
DoSetSplitterPosition( maxW );
|
||||
}
|
||||
|
||||
@@ -974,7 +974,7 @@ wxSize wxPropertyGridPageState::DoFitColumns( bool WXUNUSED(allowGridResize) )
|
||||
wxClientDC dc(pg);
|
||||
dc.SetFont(pg->GetFont());
|
||||
|
||||
int marginWidth = pg->m_marginWidth;
|
||||
int marginWidth = pg->GetMarginWidth();
|
||||
int accWid = marginWidth;
|
||||
int maxColWidth = 500;
|
||||
|
||||
@@ -1051,7 +1051,7 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
|
||||
}
|
||||
}
|
||||
|
||||
int colsWidth = pg->m_marginWidth;
|
||||
int colsWidth = pg->GetMarginWidth();
|
||||
for ( i=0; i<m_colWidths.size(); i++ )
|
||||
colsWidth += m_colWidths[i];
|
||||
|
||||
@@ -1224,7 +1224,7 @@ void wxPropertyGridPageState::DoSetColumnProportion( unsigned int column,
|
||||
// Returns column index, -1 for margin
|
||||
int wxPropertyGridPageState::HitTestH( int x, int* pSplitterHit, int* pSplitterHitOffset ) const
|
||||
{
|
||||
int cx = GetGrid()->m_marginWidth;
|
||||
int cx = GetGrid()->GetMarginWidth();
|
||||
int col = -1;
|
||||
int prevSplitter = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user