git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57338
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#include "gdiplus.h"
using namespace Gdiplus;
#include "gdiplus.h"
using namespace Gdiplus;
+#endif // wxUSE_GRAPHICS_CONTEXT
// tmschema.h is in Win32 Platform SDK and might not be available with earlier
// compilers
// tmschema.h is in Win32 Platform SDK and might not be available with earlier
// compilers
m_graphics->ReleaseHDC(m_hdc);
#endif
}
m_graphics->ReleaseHDC(m_hdc);
#endif
}
operator HDC() const { return m_hdc; }
private:
operator HDC() const { return m_hdc; }
private:
const wxRect& rect,
int flags = 0);
const wxRect& rect,
int flags = 0);
- virtual void DrawChoice(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawChoice(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
- virtual void DrawComboBox(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawComboBox(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
- virtual void DrawTextCtrl(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawTextCtrl(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
- virtual void DrawRadioButton(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawRadioButton(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
int flags=0);
virtual wxSize GetCheckBoxSize(wxWindow *win);
int flags=0);
virtual wxSize GetCheckBoxSize(wxWindow *win);
wxColour fill;
wxColour bdr;
COLORREF cref;
wxColour fill;
wxColour bdr;
COLORREF cref;
#if wxUSE_UXTHEME
wxUxThemeHandle hTheme(win, L"EDIT");
if (hTheme)
#if wxUSE_UXTHEME
wxUxThemeHandle hTheme(win, L"EDIT");
if (hTheme)
etsState = ETS_DISABLED;
else
etsState = ETS_NORMAL;
etsState = ETS_DISABLED;
else
etsState = ETS_NORMAL;
wxUxThemeEngine::Get()->GetThemeColor(hTheme, EP_EDITTEXT,
etsState, TMT_BORDERCOLOR, &cref);
wxUxThemeEngine::Get()->GetThemeColor(hTheme, EP_EDITTEXT,
etsState, TMT_BORDERCOLOR, &cref);
- bdr = wxRGBToColour(cref);
+ bdr = wxRGBToColour(cref);
fill = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
bdr = *wxBLACK;
}
fill = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
bdr = *wxBLACK;
}
dc.SetPen( bdr );
dc.SetBrush( fill );
dc.DrawRectangle(rect);
dc.SetPen( bdr );
dc.SetBrush( fill );
dc.DrawRectangle(rect);
void wxRendererMSW::DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
// Draw the main part of the control same as TextCtrl
void wxRendererMSW::DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
// Draw the main part of the control same as TextCtrl
- DrawTextCtrl(win, dc, rect, flags);
-
+ DrawTextCtrl(win, dc, rect, flags);
+
// Draw the button inside the border, on the right side
wxRect br(rect);
br.height -= 2;
// Draw the button inside the border, on the right side
wxRect br(rect);
br.height -= 2;
DrawComboBox(win, dc, rect, flags);
}
DrawComboBox(win, dc, rect, flags);
}
// Draw a themed radio button
void wxRendererMSW::DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
// Draw a themed radio button
void wxRendererMSW::DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{