if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
{
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
- win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, 0, noUnitsX, 0, xPos, 0, noRefresh);
+ win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, 0, xPos, 0, /* noRefresh */ TRUE);
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
if (scrolledWindow)
// Reset the device origin since it may have been set
dc.SetDeviceOrigin(0, 0);
- wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+ wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
dc.SetPen(pen);
dc.SetBrush(* wxTRANSPARENT_BRUSH);
lastH = h;
}
}
- if (GetBoundingRect(lastH, itemRect))
+ if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
{
cy = itemRect.GetBottom();
dc.DrawLine(0, cy, clientSize.x, cy);
if (scrolledWindow)
{
wxRect itemRect;
- if (GetBoundingRect(GetRootItem(), itemRect))
+ if (GetBoundingRect(GetFirstVisibleItem(), itemRect))
{
// Actually, the real height seems to be 1 less than reported
// (e.g. 16 instead of 16)
rect = CombineRectangles(rect, itemSize);
}
- long cookie;
+ wxTreeItemIdValue cookie;
wxTreeItemId childId = GetFirstChild(id, cookie);
- while (childId != 0)
+ while (childId)
{
CalcTreeSize(childId, rect);
childId = GetNextChild(childId, cookie);
if (!m_treeCtrl)
return;
- wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+ wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
dc.SetPen(pen);
dc.SetBrush(* wxTRANSPARENT_BRUSH);
- wxFont font(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+ wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
dc.SetFont(font);
wxSize clientSize = GetClientSize();
long style):
wxSplitterWindow(parent, id, pos, sz, style)
{
+ wxColour faceColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+ m_facePen = new wxPen(faceColour, 1, wxSOLID);
+ m_faceBrush = new wxBrush(faceColour, wxSOLID);
}
+wxThinSplitterWindow::~wxThinSplitterWindow()
+{
+ delete m_facePen;
+ delete m_faceBrush;
+}
+
+
void wxThinSplitterWindow::SizeWindows()
{
// The client size may have changed inbetween
{
y1 = 2; h1 -= 3;
}
- dc.DrawRectangle(m_sashPosition, y1, m_sashSize, h1);
+ dc.DrawRectangle(m_sashPosition, y1, GetSashSize(), h1);
}
else
{
{
x1 = 2; w1 -= 3;
}
- dc.DrawRectangle(x1, m_sashPosition, w1, m_sashSize);
+ dc.DrawRectangle(x1, m_sashPosition, w1, GetSashSize());
}
dc.SetPen(wxNullPen);
void wxSplitterScrolledWindow::OnSize(wxSizeEvent& event)
{
wxSize sz = GetClientSize();
- if (GetChildren().First())
+ if (GetChildren().GetFirst())
{
- ((wxWindow*) GetChildren().First()->Data())->SetSize(0, 0, sz.x, sz.y);
+ ((wxWindow*) GetChildren().GetFirst()->GetData())->SetSize(0, 0, sz.x, sz.y);
}
}
}
// Find targets in splitter window and send the event to them
- wxNode* node = GetChildren().First();
+ wxWindowListNode* node = GetChildren().GetFirst();
while (node)
{
- wxWindow* child = (wxWindow*) node->Data();
+ wxWindow* child = (wxWindow*) node->GetData();
if (child->IsKindOf(CLASSINFO(wxSplitterWindow)))
{
wxSplitterWindow* splitter = (wxSplitterWindow*) child;
splitter->GetWindow2()->ProcessEvent(event);
break;
}
- node = node->Next();
+ node = node->GetNext();
}
#ifdef __WXMAC__