// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma implementation "splittree.h"
-#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
{
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
- // this condition fixes extsitence of warning but
- wxScrolledWindow* scrolledWindow =
+ // this condition fixes extsitence of warning but
+ wxScrolledWindow* scrolledWindow =
// but GetScrolledWindow is still executed in case internally does something
#endif
GetScrolledWindow();
}
// In case we're using the generic tree control.
-void wxRemotelyScrolledTreeCtrl::PrepareDC(
+void wxRemotelyScrolledTreeCtrl::PrepareDC(
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
wxDC& dc
#else
#ifdef __WXMSW__
#if USE_GENERIC_TREECTRL
if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
-#endif
+#endif // USE_GENERIC_TREECTRL
{
UINT sbCode = SB_THUMBPOSITION;
HWND vertScrollBar = 0;
}
#if USE_GENERIC_TREECTRL
else
-#endif
-#endif
+#endif // USE_GENERIC_TREECTRL
+#endif // __WXMSW__
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
{
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
}
*/
}
-#endif
+#endif // USE_GENERIC_TREECTRL || !defined(__WXMSW__)
+ wxUnusedVar(posVert);
}
void wxRemotelyScrolledTreeCtrl::OnSize(wxSizeEvent& event)
wxSize clientSize = GetClientSize();
wxRect itemRect;
wxTreeItemId h, lastH;
- for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
+ for (h=GetFirstVisibleItem();
+ h.IsOk();
+ h=GetNextVisible(h))
{
if (GetBoundingRect(h, itemRect))
{
dc.DrawLine(0, cy, clientSize.x, cy);
lastH = h;
}
+ if (! IsVisible(h))
+ break;
}
if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
{
wxSize clientSize = GetClientSize();
wxRect itemRect;
wxTreeItemId h, lastH;
- for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
+ for (h=m_treeCtrl->GetFirstVisibleItem();
+ h.IsOk();
+ h=m_treeCtrl->GetNextVisible(h))
{
if (m_treeCtrl->GetBoundingRect(h, itemRect))
{
DrawItem(dc, h, drawItemRect);
dc.DrawLine(0, cy, clientSize.x, cy);
}
+ if (! m_treeCtrl->IsVisible(h))
+ break;
}
if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
{
inOnScroll = false;
}
-