// constants (to be removed, for testing only)
// ----------------------------------------------------------------------------
-static const wxCoord BORDER_THICKNESS = 1;
+static const size_t BORDER_THICKNESS = 1;
// ----------------------------------------------------------------------------
// wxGTKRenderer: draw the GUI elements in GTK style
wxGTKTheme();
virtual ~wxGTKTheme();
- virtual wxRenderer *GetRenderer() { return m_renderer; }
+ virtual wxRenderer *GetRenderer();
virtual wxInputHandler *GetInputHandler(const wxString& control);
- virtual wxColourScheme *GetColourScheme() { return m_scheme; }
+ virtual wxColourScheme *GetColourScheme();
private:
// get the default input handler
wxGTKTheme::wxGTKTheme()
{
- m_scheme = new wxGTKColourScheme;
- m_renderer = new wxGTKRenderer(m_scheme);
+ m_scheme = NULL;
+ m_renderer = NULL;
m_handlerDefault = NULL;
}
delete m_scheme;
}
+wxRenderer *wxGTKTheme::GetRenderer()
+{
+ if ( !m_renderer )
+ {
+ m_renderer = new wxGTKRenderer(GetColourScheme());
+ }
+
+ return m_renderer;
+}
+
+wxColourScheme *wxGTKTheme::GetColourScheme()
+{
+ if ( !m_scheme )
+ {
+ m_scheme = new wxGTKColourScheme;
+ }
+ return m_scheme;
+}
+
wxInputHandler *wxGTKTheme::GetDefaultInputHandler()
{
if ( !m_handlerDefault )