X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cfeafba1328a39299e17a710675d2597f6ef4bf2..e19ac18a71c1e791ab3d0268ee43db8bd64dbd6d:/src/univ/ctrlrend.cpp?ds=sidebyside diff --git a/src/univ/ctrlrend.cpp b/src/univ/ctrlrend.cpp index a693d45657..5a803f20a0 100644 --- a/src/univ/ctrlrend.cpp +++ b/src/univ/ctrlrend.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: univ/ctrlrend.cpp +// Name: src/univ/ctrlrend.cpp // Purpose: wxControlRenderer implementation // Author: Vadim Zeitlin // Modified by: @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "renderer.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -35,17 +31,17 @@ #include "wx/listbox.h" #include "wx/scrolbar.h" #include "wx/dc.h" + #include "wx/log.h" #endif // WX_PRECOMP #include "wx/image.h" -#include "wx/log.h" #include "wx/univ/theme.h" #include "wx/univ/renderer.h" #include "wx/univ/colschem.h" #if wxUSE_GAUGE -#include "wx/gauge.h" + #include "wx/gauge.h" #endif // ============================================================================ @@ -177,7 +173,8 @@ wxRect wxRenderer::StandardGetScrollbarRect(const wxScrollBar *scrollbar, } wxSize sizeTotal = scrollbar->GetClientSize(); - wxCoord *start, *width, length, arrow; + wxCoord *start, *width; + wxCoord length, arrow; wxRect rect; if ( scrollbar->IsVertical() ) { @@ -541,11 +538,11 @@ void wxControlRenderer::DrawBitmap(wxDC &dc, } // do draw it - dc.DrawBitmap(bmp, x, y, TRUE /* use mask */); + dc.DrawBitmap(bmp, x, y, true /* use mask */); } void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar, - int thumbPosOld) + int WXUNUSED(thumbPosOld)) { // we will only redraw the parts which must be redrawn and not everything wxRegion rgnUpdate = scrollbar->GetUpdateRegion(); @@ -561,7 +558,7 @@ void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar, rectUpdate.GetBottom()); #if 0 //def WXDEBUG_SCROLLBAR - static bool s_refreshDebug = FALSE; + static bool s_refreshDebug = false; if ( s_refreshDebug ) { wxClientDC dc(wxConstCast(scrollbar, wxScrollBar)); @@ -628,7 +625,7 @@ void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar, (wxScrollArrows::Arrow)nArrow, m_dc, rectArrow, - TRUE // draw a scrollbar arrow, not just an arrow + true // draw a scrollbar arrow, not just an arrow ); } } @@ -675,7 +672,11 @@ void wxControlRenderer::DrawItems(const wxListBox *lbox, void wxControlRenderer::DoDrawItems(const wxListBox *lbox, size_t itemFirst, size_t itemLast, +#if wxUSE_CHECKLISTBOX bool isCheckLbox) +#else + bool WXUNUSED(isCheckLbox)) +#endif { // prepare for the drawing: calc the initial position wxCoord lineHeight = lbox->GetLineHeight(); @@ -746,7 +747,7 @@ void wxControlRenderer::DoDrawItems(const wxListBox *lbox, void wxControlRenderer::DrawCheckItems(const wxCheckListBox *lbox, size_t itemFirst, size_t itemLast) { - DoDrawItems(lbox, itemFirst, itemLast, TRUE); + DoDrawItems(lbox, itemFirst, itemLast, true); } #endif // wxUSE_CHECKLISTBOX @@ -809,7 +810,8 @@ void wxControlRenderer::DrawProgressBar(const wxGauge *gauge) int steps = ((lenTotal + step - 1) * pos) / (max * step); // calc the coords of one small rect - wxCoord *px, dx, dy; + wxCoord *px; + wxCoord dx, dy; if ( gauge->IsVertical() ) { // draw from bottom to top: so first set y to the bottom