Applied patch [ 791398 ] unused variables in gizmos contrib

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-09-11 09:50:15 +00:00
parent ee0d4b469a
commit c3f815fa63
5 changed files with 53 additions and 25 deletions

View File

@@ -1052,12 +1052,12 @@ wxScrollBar *wxDynamicSashWindowLeaf::FindScrollBar(const wxWindow *child, int v
return NULL; return NULL;
} }
void wxDynamicSashWindowLeaf::OnSize(wxSizeEvent &event) { void wxDynamicSashWindowLeaf::OnSize(wxSizeEvent &WXUNUSED(event)) {
m_impl->m_container->Refresh(); m_impl->m_container->Refresh();
ResizeChild(m_viewport->GetSize()); ResizeChild(m_viewport->GetSize());
} }
void wxDynamicSashWindowLeaf::OnPaint(wxPaintEvent &event) { void wxDynamicSashWindowLeaf::OnPaint(wxPaintEvent &WXUNUSED(event)) {
wxPaintDC dc(m_impl->m_container); wxPaintDC dc(m_impl->m_container);
dc.SetBackground(wxBrush(m_impl->m_container->GetBackgroundColour(), wxSOLID)); dc.SetBackground(wxBrush(m_impl->m_container->GetBackgroundColour(), wxSOLID));
dc.Clear(); dc.Clear();
@@ -1128,7 +1128,7 @@ void wxDynamicSashWindowLeaf::OnPaint(wxPaintEvent &event) {
} }
} }
void wxDynamicSashWindowLeaf::OnScroll(wxScrollEvent &event) { void wxDynamicSashWindowLeaf::OnScroll(wxScrollEvent &WXUNUSED(event)) {
int nx = -m_hscroll->GetThumbPosition(); int nx = -m_hscroll->GetThumbPosition();
int ny = -m_vscroll->GetThumbPosition(); int ny = -m_vscroll->GetThumbPosition();
@@ -1175,7 +1175,7 @@ void wxDynamicSashWindowLeaf::OnMouseMove(wxMouseEvent &event) {
m_impl->m_container->SetCursor(cursor); m_impl->m_container->SetCursor(cursor);
} }
void wxDynamicSashWindowLeaf::OnLeave(wxMouseEvent &event) { void wxDynamicSashWindowLeaf::OnLeave(wxMouseEvent &WXUNUSED(event)) {
wxCursor cursor(wxCURSOR_ARROW); wxCursor cursor(wxCURSOR_ARROW);
m_impl->m_container->SetCursor(cursor); m_impl->m_container->SetCursor(cursor);
} }
@@ -1213,10 +1213,10 @@ void wxDynamicSashWindowLeaf::OnPress(wxMouseEvent &event) {
} }
} }
void wxDynamicSashWindowLeaf::OnRelease(wxMouseEvent &event) { void wxDynamicSashWindowLeaf::OnRelease(wxMouseEvent &WXUNUSED(event)) {
} }
void wxDynamicSashWindowLeaf::OnReparent(wxEvent &event) { void wxDynamicSashWindowLeaf::OnReparent(wxEvent &WXUNUSED(event)) {
if (m_child) { if (m_child) {
m_child->Reparent(m_viewport); m_child->Reparent(m_viewport);
} }

View File

@@ -217,7 +217,7 @@ void wxEditableListBox::OnItemSelected(wxListEvent& event)
m_bDel->Enable(m_selection < m_listCtrl->GetItemCount()-1); m_bDel->Enable(m_selection < m_listCtrl->GetItemCount()-1);
} }
void wxEditableListBox::OnNewItem(wxCommandEvent& event) void wxEditableListBox::OnNewItem(wxCommandEvent& WXUNUSED(event))
{ {
m_listCtrl->SetItemState(m_listCtrl->GetItemCount()-1, m_listCtrl->SetItemState(m_listCtrl->GetItemCount()-1,
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
@@ -236,19 +236,19 @@ void wxEditableListBox::OnEndLabelEdit(wxListEvent& event)
} }
} }
void wxEditableListBox::OnDelItem(wxCommandEvent& event) void wxEditableListBox::OnDelItem(wxCommandEvent& WXUNUSED(event))
{ {
m_listCtrl->DeleteItem(m_selection); m_listCtrl->DeleteItem(m_selection);
m_listCtrl->SetItemState(m_selection, m_listCtrl->SetItemState(m_selection,
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
} }
void wxEditableListBox::OnEditItem(wxCommandEvent& event) void wxEditableListBox::OnEditItem(wxCommandEvent& WXUNUSED(event))
{ {
m_listCtrl->EditLabel(m_selection); m_listCtrl->EditLabel(m_selection);
} }
void wxEditableListBox::OnUpItem(wxCommandEvent& event) void wxEditableListBox::OnUpItem(wxCommandEvent& WXUNUSED(event))
{ {
wxString t1, t2; wxString t1, t2;
@@ -260,7 +260,7 @@ void wxEditableListBox::OnUpItem(wxCommandEvent& event)
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
} }
void wxEditableListBox::OnDownItem(wxCommandEvent& event) void wxEditableListBox::OnDownItem(wxCommandEvent& WXUNUSED(event))
{ {
wxString t1, t2; wxString t1, t2;

View File

@@ -161,12 +161,12 @@ BEGIN_EVENT_TABLE(wxLEDNumberCtrl, wxControl)
END_EVENT_TABLE() END_EVENT_TABLE()
void wxLEDNumberCtrl::OnEraseBackground(wxEraseEvent &Event) void wxLEDNumberCtrl::OnEraseBackground(wxEraseEvent &WXUNUSED(event))
{ {
} }
void wxLEDNumberCtrl::OnPaint(wxPaintEvent &Event) void wxLEDNumberCtrl::OnPaint(wxPaintEvent &WXUNUSED(event))
{ {
wxPaintDC Dc(this); wxPaintDC Dc(this);

View File

@@ -634,9 +634,10 @@ wxMultiCellCanvas :: wxMultiCellCanvas(wxWindow *par, int numRows, int numCols)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void wxMultiCellCanvas :: Add(wxWindow *win, unsigned int row, unsigned int col) void wxMultiCellCanvas :: Add(wxWindow *win, unsigned int row, unsigned int col)
{ {
wxASSERT_MSG(row >= 0 && row < m_maxRows, // thanks to unsigned data row and col are always >= 0
wxASSERT_MSG( /* row >= 0 && */ row < m_maxRows,
wxString::Format(_T("Row %d out of bounds (0..%d)"), row, m_maxRows) ); wxString::Format(_T("Row %d out of bounds (0..%d)"), row, m_maxRows) );
wxASSERT_MSG(col >= 0 && col < m_maxCols, wxASSERT_MSG( /* col >= 0 && */ col < m_maxCols,
wxString::Format(_T("Column %d out of bounds (0..%d)"), col, m_maxCols) ); wxString::Format(_T("Column %d out of bounds (0..%d)"), col, m_maxCols) );
wxASSERT_MSG(m_cells[CELL_LOC(row, col)] == NULL, wxT("Cell already occupied")); wxASSERT_MSG(m_cells[CELL_LOC(row, col)] == NULL, wxT("Cell already occupied"));

View File

@@ -104,10 +104,19 @@ void wxRemotelyScrolledTreeCtrl::HideVScrollbar()
// Number of pixels per user unit (0 or -1 for no scrollbar) // Number of pixels per user unit (0 or -1 for no scrollbar)
// Length of virtual canvas in user units // Length of virtual canvas in user units
// Length of page in user units // Length of page in user units
void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, void wxRemotelyScrolledTreeCtrl::SetScrollbars(
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY, int noUnitsX, int noUnitsY,
int xPos, int yPos, int xPos, int yPos,
bool noRefresh) bool noRefresh
#else
int WXUNUSED(pixelsPerUnitX), int WXUNUSED(pixelsPerUnitY),
int WXUNUSED(noUnitsX), int WXUNUSED(noUnitsY),
int WXUNUSED(xPos), int WXUNUSED(yPos),
bool WXUNUSED(noRefresh)
#endif
)
{ {
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__) #if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
@@ -125,9 +134,21 @@ void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPer
} }
// In case we're using the generic tree control. // In case we're using the generic tree control.
int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const int wxRemotelyScrolledTreeCtrl::GetScrollPos(
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
int orient
#else
int WXUNUSED(orient)
#endif
) const
{ {
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
// this condition fixes extsitence of warning but
wxScrolledWindow* scrolledWindow =
// but GetScrolledWindow is still executed in case internally does something
#endif
GetScrolledWindow();
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__) #if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
@@ -176,7 +197,13 @@ void wxRemotelyScrolledTreeCtrl::GetViewStart(int *x, int *y) const
} }
// In case we're using the generic tree control. // In case we're using the generic tree control.
void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc) void wxRemotelyScrolledTreeCtrl::PrepareDC(
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
wxDC& dc
#else
wxDC& WXUNUSED(dc)
#endif
)
{ {
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__) #if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
@@ -200,7 +227,7 @@ void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
// Scroll to the given line (in scroll units where each unit is // Scroll to the given line (in scroll units where each unit is
// the height of an item) // the height of an item)
void wxRemotelyScrolledTreeCtrl::ScrollToLine(int posHoriz, int posVert) void wxRemotelyScrolledTreeCtrl::ScrollToLine(int WXUNUSED(posHoriz), int posVert)
{ {
#ifdef __WXMSW__ #ifdef __WXMSW__
#if USE_GENERIC_TREECTRL #if USE_GENERIC_TREECTRL
@@ -466,7 +493,7 @@ void wxTreeCompanionWindow::DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& re
#endif #endif
} }
void wxTreeCompanionWindow::OnPaint(wxPaintEvent& event) void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
{ {
wxPaintDC dc(this); wxPaintDC dc(this);
@@ -519,7 +546,7 @@ void wxTreeCompanionWindow::OnScroll(wxScrollWinEvent& event)
Refresh(TRUE); Refresh(TRUE);
} }
void wxTreeCompanionWindow::OnExpand(wxTreeEvent& event) void wxTreeCompanionWindow::OnExpand(wxTreeEvent& WXUNUSED(event))
{ {
// TODO: something more optimized than simply refresh the whole // TODO: something more optimized than simply refresh the whole
// window when the tree is expanded/collapsed. Tricky. // window when the tree is expanded/collapsed. Tricky.
@@ -564,7 +591,7 @@ void wxThinSplitterWindow::SizeWindows()
} }
// Tests for x, y over sash // 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); return wxSplitterWindow::SashHitTest(x, y, 4);
} }
@@ -636,7 +663,7 @@ wxSplitterScrolledWindow::wxSplitterScrolledWindow(wxWindow* parent, wxWindowID
{ {
} }
void wxSplitterScrolledWindow::OnSize(wxSizeEvent& event) void wxSplitterScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event))
{ {
wxSize sz = GetClientSize(); wxSize sz = GetClientSize();
if (GetChildren().GetFirst()) if (GetChildren().GetFirst())