#pragma hdrstop
#endif
+#include "wx/univ/theme.h"
+
+#if wxUSE_THEME_METAL
+
#ifndef WX_PRECOMP
#include "wx/timer.h"
#include "wx/intl.h"
#include "wx/textctrl.h"
#include "wx/toolbar.h"
- #ifdef __WXMSW__
- // for COLOR_* constants
- #include "wx/msw/private.h"
- #endif
#include "wx/menu.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
#include "wx/univ/scrtimer.h"
#include "wx/univ/renderer.h"
+#include "wx/univ/inpcons.h"
#include "wx/univ/inphand.h"
#include "wx/univ/colschem.h"
-#include "wx/univ/theme.h"
// wxMetalRenderer: draw the GUI elements in Metal style
// ----------------------------------------------------------------------------
// wxMetalTheme
// ----------------------------------------------------------------------------
-WX_DEFINE_ARRAY_PTR(wxInputHandler *, wxArrayHandlers);
-
class wxMetalTheme : public wxTheme
{
public:
virtual wxRenderer *GetRenderer();
virtual wxArtProvider *GetArtProvider();
- virtual wxInputHandler *GetInputHandler(const wxString& control);
+ virtual wxInputHandler *GetInputHandler(const wxString& control,
+ wxInputConsumer *consumer);
virtual wxColourScheme *GetColourScheme();
+
private:
bool GetOrCreateTheme()
{
m_win32Theme = wxTheme::Create( wxT("win32") );
return m_win32Theme != NULL;
}
-private:
+
wxTheme *m_win32Theme;
wxMetalRenderer *m_renderer;
return m_win32Theme->GetArtProvider();
}
-wxInputHandler *wxMetalTheme::GetInputHandler(const wxString& control)
+wxInputHandler *wxMetalTheme::GetInputHandler(const wxString& control,
+ wxInputConsumer *consumer)
{
if ( !GetOrCreateTheme() )
return 0;
- return m_win32Theme->GetInputHandler(control);
+ return m_win32Theme->GetInputHandler(control, consumer);
}
wxColourScheme *wxMetalTheme::GetColourScheme()
// ----------------------------------------------------------------------------
wxMetalRenderer::wxMetalRenderer(wxRenderer *renderer, wxColourScheme *scheme)
- : wxDelegateRenderer(renderer)
+ : wxDelegateRenderer(renderer)
{
// init colours and pens
m_penBlack = wxPen(wxSCHEME_COLOUR(scheme, SHADOW_DARK), 0, wxSOLID);
dc.DrawRectangle( rect.x, y, rect.width, 1 );
}
}
+
+#endif // wxUSE_THEME_METAL