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:
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;