Applied patch [ 807366 ] fixes for wxrcedit contrib util
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,12 +92,12 @@ void wxRemotelyScrolledTreeCtrl::HideVScrollbar()
|
||||
// Number of pixels per user unit (0 or -1 for no scrollbar)
|
||||
// Length of virtual canvas in user units
|
||||
// Length of page in user units
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos, int yPos,
|
||||
bool noRefresh)
|
||||
{
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
||||
@@ -109,15 +109,21 @@ void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPer
|
||||
scrolledWindow->SetScrollbars(0, pixelsPerUnitY, 0, noUnitsY, 0, yPos, noRefresh);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void wxRemotelyScrolledTreeCtrl::SetScrollbars(int WXUNUSED(pixelsPerUnitX), int WXUNUSED(pixelsPerUnitY),
|
||||
int WXUNUSED(noUnitsX), int WXUNUSED(noUnitsY),
|
||||
int WXUNUSED(xPos), int WXUNUSED(yPos),
|
||||
bool WXUNUSED(noRefresh))
|
||||
{
|
||||
#endif
|
||||
}
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const
|
||||
{
|
||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
||||
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
||||
@@ -129,6 +135,9 @@ int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const
|
||||
return scrolledWindow->GetScrollPos(orient);
|
||||
}
|
||||
}
|
||||
#else
|
||||
int wxRemotelyScrolledTreeCtrl::GetScrollPos(int WXUNUSED(orient)) const
|
||||
{
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -164,9 +173,9 @@ void wxRemotelyScrolledTreeCtrl::GetViewStart(int *x, int *y) const
|
||||
}
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
||||
{
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
||||
@@ -183,12 +192,15 @@ void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
||||
dc.SetDeviceOrigin( -startX * xppu1, -startY * yppu2 );
|
||||
// dc.SetUserScale( win->GetScaleX(), win->GetScaleY() );
|
||||
}
|
||||
#else
|
||||
void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& WXUNUSED(dc))
|
||||
{
|
||||
#endif
|
||||
}
|
||||
|
||||
// Scroll to the given line (in scroll units where each unit is
|
||||
// the height of an item)
|
||||
void wxRemotelyScrolledTreeCtrl::ScrollToLine(int posHoriz, int posVert)
|
||||
void wxRemotelyScrolledTreeCtrl::ScrollToLine(int WXUNUSED(posHoriz), int posVert)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
#if USE_GENERIC_TREECTRL
|
||||
@@ -417,7 +429,7 @@ void wxTreeCompanionWindow::DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& re
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxTreeCompanionWindow::OnPaint(wxPaintEvent& event)
|
||||
void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
|
||||
@@ -470,7 +482,7 @@ void wxTreeCompanionWindow::OnScroll(wxScrollWinEvent& event)
|
||||
Refresh(TRUE);
|
||||
}
|
||||
|
||||
void wxTreeCompanionWindow::OnExpand(wxTreeEvent& event)
|
||||
void wxTreeCompanionWindow::OnExpand(wxTreeEvent& WXUNUSED(event))
|
||||
{
|
||||
// TODO: something more optimized than simply refresh the whole
|
||||
// window when the tree is expanded/collapsed. Tricky.
|
||||
@@ -509,7 +521,7 @@ void wxThinSplitterWindow::SizeWindows()
|
||||
}
|
||||
|
||||
// Tests for x, y over sash
|
||||
bool wxThinSplitterWindow::SashHitTest(int x, int y, int tolerance)
|
||||
bool wxThinSplitterWindow::SashHitTest(int x, int y, int WXUNUSED(tolerance))
|
||||
{
|
||||
return wxSplitterWindow::SashHitTest(x, y, 4);
|
||||
}
|
||||
@@ -581,12 +593,12 @@ wxSplitterScrolledWindow::wxSplitterScrolledWindow(wxWindow* parent, wxWindowID
|
||||
{
|
||||
}
|
||||
|
||||
void wxSplitterScrolledWindow::OnSize(wxSizeEvent& event)
|
||||
void wxSplitterScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -637,10 +649,10 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
||||
}
|
||||
|
||||
// Find targets in splitter window and send the event to them
|
||||
wxNode* node = GetChildren().First();
|
||||
wxNode* node = (wxNode *)GetChildren().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxWindow* child = (wxWindow*) node->Data();
|
||||
wxWindow* child = (wxWindow*) node->GetData();
|
||||
if (child->IsKindOf(CLASSINFO(wxSplitterWindow)))
|
||||
{
|
||||
wxSplitterWindow* splitter = (wxSplitterWindow*) child;
|
||||
@@ -650,7 +662,7 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
||||
splitter->GetWindow2()->ProcessEvent(event);
|
||||
break;
|
||||
}
|
||||
node = node->Next();
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
#ifdef __WXMAC__
|
||||
|
Reference in New Issue
Block a user