X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b1391332e67af96856865ded257aacd6e1e956..31a8bf3fbfaefbdfdf96dfec3dbd6b06ca85fdf5:/src/univ/ctrlrend.cpp diff --git a/src/univ/ctrlrend.cpp b/src/univ/ctrlrend.cpp index ba9b951050..56e99ae7dd 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 // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "renderer.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -35,19 +31,15 @@ #include "wx/listbox.h" #include "wx/scrolbar.h" #include "wx/dc.h" + #include "wx/log.h" + #include "wx/gauge.h" + #include "wx/image.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" -#endif - // ============================================================================ // implementation // ============================================================================ @@ -134,6 +126,8 @@ void wxRenderer::StandardDrawTextLine(wxDC& dc, // wxRenderer: scrollbar geometry // ---------------------------------------------------------------------------- +#if wxUSE_SCROLLBAR + /* static */ void wxRenderer::StandardScrollBarThumbSize(wxCoord length, int thumbPos, @@ -393,6 +387,8 @@ wxHitTest wxRenderer::StandardHitTestScrollbar(const wxScrollBar *scrollbar, } } +#endif // wxUSE_SCROLLBAR + wxRenderer::~wxRenderer() { } @@ -507,11 +503,13 @@ void wxControlRenderer::DrawBitmap(wxDC &dc, } } } +#if wxUSE_IMAGE else if ( stretch & wxEXPAND ) { // stretch bitmap to fill the entire control bmp = wxBitmap(wxImage(bmp.ConvertToImage()).Scale(rect.width, rect.height)); } +#endif // wxUSE_IMAGE else // not stretched, not tiled { if ( alignment & wxALIGN_RIGHT ) @@ -545,6 +543,8 @@ void wxControlRenderer::DrawBitmap(wxDC &dc, dc.DrawBitmap(bmp, x, y, true /* use mask */); } +#if wxUSE_SCROLLBAR + void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar, int WXUNUSED(thumbPosOld)) { @@ -655,6 +655,8 @@ void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar, } } +#endif // wxUSE_SCROLLBAR + void wxControlRenderer::DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) { wxASSERT_MSG( x1 == x2 || y1 == y2, @@ -872,4 +874,3 @@ void wxControlRenderer::DrawProgressBar(const wxGauge *gauge) } #endif // wxUSE_GAUGE -