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;
}
{
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;