wxWin32Theme();
virtual ~wxWin32Theme();
- virtual wxRenderer *GetRenderer() { return m_renderer; }
+ virtual wxRenderer *GetRenderer();
virtual wxInputHandler *GetInputHandler(const wxString& control);
virtual wxColourScheme *GetColourScheme();
wxWin32Theme::wxWin32Theme()
{
- m_scheme = new wxWin32ColourScheme;
- m_renderer = new wxWin32Renderer(m_scheme);
+ m_scheme = NULL;
+ m_renderer = NULL;
m_handlerDefault = NULL;
}
delete m_scheme;
}
+wxRenderer *wxWin32Theme::GetRenderer()
+{
+ if ( !m_renderer )
+ {
+ m_renderer = new wxWin32Renderer(GetColourScheme());
+ }
+
+ return m_renderer;
+}
+
wxInputHandler *wxWin32Theme::GetDefaultInputHandler()
{
if ( !m_handlerDefault )
wxColourScheme *wxWin32Theme::GetColourScheme()
{
+ if ( !m_scheme )
+ {
+ m_scheme = new wxWin32ColourScheme;
+ }
return m_scheme;
}
case TITLEBAR: return wxColour(GetSysColor(COLOR_INACTIVECAPTION));
case TITLEBAR_ACTIVE: return wxColour(GetSysColor(COLOR_ACTIVECAPTION));
- case TITLEBAR_TEXT: return wxColour(GetSysColor(COLOR_CAPTIONTEXT));
+ case TITLEBAR_TEXT: return wxColour(GetSysColor(COLOR_INACTIVECAPTIONTEXT));
+ case TITLEBAR_ACTIVE_TEXT: return wxColour(GetSysColor(COLOR_CAPTIONTEXT));
+
+ case DESKTOP: return wxColour(0x808000);
#else // !__WXMSW__
// use the standard Windows colours elsewhere
case WINDOW: return *wxWHITE;
case TITLEBAR: return wxColour(0xaeaaae);
case TITLEBAR_ACTIVE: return wxColour(0x820300);
- case TITLEBAR_TEXT: return *wxWHITE;
+ case TITLEBAR_TEXT: return wxColour(0xc0c0c0);
+ case TITLEBAR_ACTIVE_TEXT:return *wxWHITE;
+
+ case DESKTOP: return wxColour(0x808000);
#endif // __WXMSW__
case MAX:
: IndicatorStatus_Unchecked;
const char **xpm = bmpIndicators[indType][indState][indStatus];
- return xpm ? wxBitmap(xpm) : wxNullBitmap;
+ if (xpm)
+ {
+ wxBitmap bmp(xpm);
+ return bmp;
+ }
+ else
+ return wxNullBitmap;
}
void wxWin32Renderer::DrawCheckOrRadioButton(wxDC& dc,
rectLabel.SetRight(rect.GetRight());
}
+ // THIS IS THE CULPRIT -- JACS
dc.DrawBitmap(bitmap, xBmp, yBmp, TRUE /* use mask */);
DoDrawLabel(
wxAlignment align,
int indexAccel)
{
- DrawCheckOrRadioButton(dc, label,
- bitmap.Ok() ? bitmap : GetRadioBitmap(flags),
+ if (bitmap.Ok())
+ DrawCheckOrRadioButton(dc, label,
+ bitmap,
rect, flags, align, indexAccel,
- FOCUS_RECT_OFFSET_Y); // default focus rect offset
+ FOCUS_RECT_OFFSET_Y); // default focus rect offset
+ else
+ {
+ wxBitmap rbitmap(GetRadioBitmap(flags));
+ DrawCheckOrRadioButton(dc, label,
+ rbitmap,
+ rect, flags, align, indexAccel,
+ FOCUS_RECT_OFFSET_Y); // default focus rect offset
+ }
}
void wxWin32Renderer::DrawCheckButton(wxDC& dc,
wxAlignment align,
int indexAccel)
{
- DrawCheckOrRadioButton(dc, label,
- bitmap.Ok() ? bitmap : GetCheckBitmap(flags),
- rect, flags, align, indexAccel,
- 0); // no focus rect offset for checkboxes
+ if (bitmap.Ok())
+ DrawCheckOrRadioButton(dc, label,
+ bitmap,
+ rect, flags, align, indexAccel,
+ 0); // no focus rect offset for checkboxes
+ else
+ {
+ wxBitmap cbitmap(GetCheckBitmap(flags));
+#if 1
+ DrawCheckOrRadioButton(dc, label,
+ cbitmap,
+ rect, flags, align, indexAccel,
+ 0); // no focus rect offset for checkboxes
+#endif
+ }
}
// ----------------------------------------------------------------------------
const wxString& title,
int flags)
{
+ wxColour col = (flags & wxTOPLEVEL_ACTIVE) ?
+ wxSCHEME_COLOUR(m_scheme, TITLEBAR_ACTIVE_TEXT) :
+ wxSCHEME_COLOUR(m_scheme, TITLEBAR_TEXT);
+
wxRect r = GetFrameClientArea(rect, flags & ~wxTOPLEVEL_TITLEBAR);
r.height = FRAME_TITLEBAR_HEIGHT;
if ( flags & wxTOPLEVEL_ICON )
r.x += 1;
dc.SetFont(m_titlebarFont);
- dc.SetTextForeground(wxSCHEME_COLOUR(m_scheme, TITLEBAR_TEXT));
+ dc.SetTextForeground(col);
dc.DrawLabel(title, wxNullBitmap, r, wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
}
{
wxSize sizeSbar = statbar->GetSize();
- return (sizeSbar.x - pt.x) < STATUSBAR_GRIP_SIZE &&
- (sizeSbar.y - pt.y) < STATUSBAR_GRIP_SIZE;
+ return (sizeSbar.x - pt.x) < (wxCoord)STATUSBAR_GRIP_SIZE &&
+ (sizeSbar.y - pt.y) < (wxCoord)STATUSBAR_GRIP_SIZE;
}
return FALSE;