// 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
// titlebars
virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const;
virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const;
+ virtual wxSize GetFrameMinSize(int flags) const;
virtual wxSize GetFrameIconSize() const;
virtual int HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const;
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 )
case HIGHLIGHT: return wxColour(0x9c0000);
case HIGHLIGHT_TEXT: return wxColour(0xffffff);
+ case GAUGE: return Get(CONTROL_CURRENT);
+
case MAX:
default:
wxFAIL_MSG(_T("invalid standard colour"));
wxCoord *extraSpaceBeyond)
{
wxRect rectText = rect;
- rectText.Inflate(-2*BORDER_THICKNESS);
+ rectText.Deflate(2*BORDER_THICKNESS);
if ( text->WrapLines() )
{
size->y += 4;
}
} else
-#endif wxUSE_BUTTON
+#endif //wxUSE_BUTTON
if ( wxDynamicCast(window, wxScrollBar) )
{
// we only set the width of vert scrollbars and height of the
return clientSize;
}
+wxSize wxGTKRenderer::GetFrameMinSize(int flags) const
+{
+ return wxSize(0,0);
+}
+
wxSize wxGTKRenderer::GetFrameIconSize() const
{
return wxSize(-1, -1);