///////////////////////////////////////////////////////////////////////////////
-// Name: univ/ctrlrend.cpp
+// Name: src/univ/ctrlrend.cpp
// Purpose: wxControlRenderer implementation
// Author: Vadim Zeitlin
// Modified by:
// 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"
#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
// ============================================================================
// wxRenderer: scrollbar geometry
// ----------------------------------------------------------------------------
+#if wxUSE_SCROLLBAR
+
/* static */
void wxRenderer::StandardScrollBarThumbSize(wxCoord length,
int thumbPos,
}
wxSize sizeTotal = scrollbar->GetClientSize();
- wxCoord *start, *width, length, arrow;
+ wxCoord *start, *width;
+ wxCoord length, arrow;
wxRect rect;
if ( scrollbar->IsVertical() )
{
}
}
+#endif // wxUSE_SCROLLBAR
+
wxRenderer::~wxRenderer()
{
}
}
}
}
+#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 )
dc.DrawBitmap(bmp, x, y, true /* use mask */);
}
+#if wxUSE_SCROLLBAR
+
void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar,
int WXUNUSED(thumbPosOld))
{
}
}
+#endif // wxUSE_SCROLLBAR
+
void wxControlRenderer::DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
{
wxASSERT_MSG( x1 == x2 || y1 == y2,
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
}
#endif // wxUSE_GAUGE
-