idle time. Also remove the double buffering of the header window so
the DrawHeaderButton will work on wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40442
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// implementation helpers
void SendDeleteEvent(wxTreeListItem *itemBeingDeleted);
// implementation helpers
void SendDeleteEvent(wxTreeListItem *itemBeingDeleted);
+ void DoDirtyProcessing();
+
void DrawBorder(const wxTreeItemId& item);
void DrawLine(const wxTreeItemId& item, bool below);
void DrawBorder(const wxTreeItemId& item);
void DrawLine(const wxTreeItemId& item, bool below);
void wxTreeListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
#ifdef __WXGTK__
void wxTreeListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
#ifdef __WXGTK__
- wxClientDC real_dc( this );
- wxPaintDC real_dc( this );
// width and height of the entire header window
int w, h;
GetClientSize( &w, &h );
m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
// width and height of the entire header window
int w, h;
GetClientSize( &w, &h );
m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
- // Setup double buffering to eliminate the flicker
- wxMemoryDC dc;
- wxBitmap buffer(w, h);
- dc.SelectObject(buffer);
dc.SetBackground(wxBrush(GetBackgroundColour()));
dc.Clear();
dc.SetBackground(wxBrush(GetBackgroundColour()));
dc.Clear();
this, dc, wxRect(x, HEADER_OFFSET_Y, more_w, h-2),
m_parent->IsEnabled() ? 0 : wxCONTROL_DISABLED);
}
this, dc, wxRect(x, HEADER_OFFSET_Y, more_w, h-2),
m_parent->IsEnabled() ? 0 : wxCONTROL_DISABLED);
}
-
- // Finish up by drawing the buffer to the real dc
- dc.SelectObject(wxNullBitmap);
- real_dc.DrawBitmap(buffer, 0, 0, false);
}
void wxTreeListHeaderWindow::DrawCurrent()
}
void wxTreeListHeaderWindow::DrawCurrent()
// We have to call this here because the label in
// question might just have been added and no screen
// update taken place.
// We have to call this here because the label in
// question might just have been added and no screen
// update taken place.
- if (m_dirty) wxYieldIfNeeded();
+ if (m_dirty)
+ DoDirtyProcessing();
wxTreeListItem *gitem = (wxTreeListItem*) item.m_pItem;
wxTreeListItem *gitem = (wxTreeListItem*) item.m_pItem;
// We have to call this here because the label in
// question might just have been added and no screen
// update taken place.
// We have to call this here because the label in
// question might just have been added and no screen
// update taken place.
- if (m_dirty) wxYieldIfNeeded();
+ if (m_dirty)
+ DoDirtyProcessing();
wxString s = m_currentEdit->GetText(/*ALB*/m_main_column);
int x = m_currentEdit->GetX() + m_imgWidth2;
wxString s = m_currentEdit->GetText(/*ALB*/m_main_column);
int x = m_currentEdit->GetX() + m_imgWidth2;
// highlight the current drop target if any
DrawDropEffect(m_dropTarget);
// highlight the current drop target if any
DrawDropEffect(m_dropTarget);
}
}
else if ( (event.LeftUp() || event.RightUp()) && m_isDragging )
}
}
else if ( (event.LeftUp() || event.RightUp()) && m_isDragging )
}
void wxTreeListMainWindow::OnIdle( wxIdleEvent &WXUNUSED(event) )
}
void wxTreeListMainWindow::OnIdle( wxIdleEvent &WXUNUSED(event) )
+{
+ DoDirtyProcessing();
+}
+
+void wxTreeListMainWindow::DoDirtyProcessing()
{
/* after all changes have been done to the tree control,
* we actually redraw the tree when everything is over */
{
/* after all changes have been done to the tree control,
* we actually redraw the tree when everything is over */