+ Refresh(TRUE, &rect);
+}
+
+void wxGenericTreeCtrl::RefreshSelected()
+{
+ if (m_freezeCount) return;
+
+ // TODO: this is awfully inefficient, we should keep the list of all
+ // selected items internally, should be much faster
+ if ( m_anchor )
+ RefreshSelectedUnder(m_anchor);
+}
+
+void wxGenericTreeCtrl::RefreshSelectedUnder(wxGenericTreeItem *item)
+{
+ if (m_freezeCount) return;
+
+ if ( item->IsSelected() )
+ RefreshLine(item);
+
+ const wxArrayGenericTreeItems& children = item->GetChildren();
+ size_t count = children.GetCount();
+ for ( size_t n = 0; n < count; n++ )
+ {
+ RefreshSelectedUnder(children[n]);
+ }
+}
+
+void wxGenericTreeCtrl::Freeze()
+{
+ m_freezeCount++;
+}
+
+void wxGenericTreeCtrl::Thaw()
+{
+ wxCHECK_RET( m_freezeCount > 0, _T("thawing unfrozen tree control?") );
+
+ if ( !--m_freezeCount )
+ {
+ Refresh();
+ }
+}
+
+// ----------------------------------------------------------------------------
+// changing colours: we need to refresh the tree control
+// ----------------------------------------------------------------------------
+
+bool wxGenericTreeCtrl::SetBackgroundColour(const wxColour& colour)
+{
+ if ( !wxWindow::SetBackgroundColour(colour) )
+ return FALSE;
+
+ if (m_freezeCount) return TRUE;
+
+ Refresh();
+
+ return TRUE;
+}
+
+bool wxGenericTreeCtrl::SetForegroundColour(const wxColour& colour)
+{
+ if ( !wxWindow::SetForegroundColour(colour) )
+ return FALSE;
+
+ if (m_freezeCount) return TRUE;
+
+ Refresh();
+
+ return TRUE;
+}
+
+// Process the tooltip event, to speed up event processing.
+// Doesn't actually get a tooltip.
+void wxGenericTreeCtrl::OnGetToolTip( wxTreeEvent &event )
+{
+ event.Veto();