// -----------------------------------------------------------------------
+bool wxPropertyGridManager::Reparent( wxWindowBase *newParent )
+{
+ if ( m_pPropGrid )
+ m_pPropGrid->OnTLPChanging((wxWindow*)newParent);
+
+ bool res = wxPanel::Reparent(newParent);
+
+ return res;
+}
+
+// -----------------------------------------------------------------------
+
// Actually shows given page.
bool wxPropertyGridManager::DoSelectPage( int index )
{
void wxPropertyGridManager::Clear()
{
+ m_pPropGrid->ClearSelection(false);
+
m_pPropGrid->Freeze();
int i;
// -----------------------------------------------------------------------
-void wxPropertyGridManager::RepaintSplitter( wxDC& dc, int new_splittery, int new_width,
- int new_height, bool desc_too )
+void wxPropertyGridManager::RepaintDescBoxDecorations( wxDC& dc,
+ int newSplitterY,
+ int newWidth,
+ int newHeight )
{
- int use_hei = new_height;
-
// Draw background
wxColour bgcol = GetBackgroundColour();
- dc.SetBrush( bgcol );
- dc.SetPen( bgcol );
- int rect_hei = use_hei-new_splittery;
- if ( !desc_too )
- rect_hei = m_splitterHeight;
- dc.DrawRectangle(0,new_splittery,new_width,rect_hei);
- dc.SetPen ( wxSystemSettings::GetColour ( wxSYS_COLOUR_3DDKSHADOW ) );
- int splitter_bottom = new_splittery+m_splitterHeight - 1;
- int box_height = use_hei-splitter_bottom;
- if ( box_height > 1 )
- dc.DrawRectangle(0,splitter_bottom,new_width,box_height);
+ dc.SetBrush(bgcol);
+ dc.SetPen(bgcol);
+ int rectHeight = m_splitterHeight;
+ dc.DrawRectangle(0, newSplitterY, newWidth, rectHeight);
+ dc.SetPen( wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW) );
+ int splitterBottom = newSplitterY + m_splitterHeight - 1;
+ int boxHeight = newHeight - splitterBottom;
+ if ( boxHeight > 1 )
+ dc.DrawRectangle(0, splitterBottom, newWidth, boxHeight);
else
- dc.DrawLine(0,splitter_bottom,new_width,splitter_bottom);
+ dc.DrawLine(0, splitterBottom, newWidth, splitterBottom);
}
// -----------------------------------------------------------------------
// Update everything inside the box
wxRect r = GetUpdateRegion().GetBox();
- // Repaint splitter?
- int r_bottom = r.y + r.height;
- int splitter_bottom = m_splitterY + m_splitterHeight;
- if ( r.y < splitter_bottom && r_bottom >= m_splitterY )
- RepaintSplitter( dc, m_splitterY, m_width, m_height, false );
+ // Repaint splitter and any other description box decorations
+ if ( (r.y + r.height) >= m_splitterY )
+ RepaintDescBoxDecorations( dc, m_splitterY, m_width, m_height );
}
// -----------------------------------------------------------------------
wxDefaultPosition,wxDefaultSize,
((GetExtraStyle()&wxPG_EX_NO_FLAT_TOOLBAR)?0:wxTB_FLAT)
/*| wxTB_HORIZONTAL | wxNO_BORDER*/ );
+ m_pToolbar->SetToolBitmapSize(wxSize(16, 15));
#if defined(__WXMSW__)
// Eliminate toolbar flicker on XP
else
{
wxClientDC dc(this);
- dc.SetFont(m_pPropGrid->m_font);
+ dc.SetFont(m_pPropGrid->GetFont());
int highest = 0;
unsigned int i;