///////////////////////////////////////////////////////////////////////////////
-// Name: common/rendcmn.cpp
+// Name: src/common/rendcmn.cpp
// Purpose: wxRendererNative common functions
// Author: Vadim Zeitlin
// Modified by:
// Created: 28.07.03
// RCS-ID: $Id$
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
-// License: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/apptrait.h"
#include "wx/renderer.h"
-#include "wx/ptr_scpd.h"
+#include "wx/scopedptr.h"
#if wxUSE_DYNLIB_CLASS
#include "wx/dynlib.h"
// wxRendererPtr: auto pointer holding the global renderer
// ----------------------------------------------------------------------------
-wxDECLARE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase);
-wxDEFINE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase);
+typedef wxScopedPtr<wxRendererNative> wxRendererPtrBase;
class wxRendererPtr : public wxRendererPtrBase
{
}
// return the global and unique wxRendererPtr
- static wxRendererPtr& Get()
- {
- static wxRendererPtr s_renderer;
-
- return s_renderer;
- }
+ static wxRendererPtr& Get();
private:
wxRendererPtr() : wxRendererPtrBase(NULL) { m_initialized = false; }
// just to suppress a gcc warning
friend class wxRendererPtrDummyFriend;
- DECLARE_NO_COPY_CLASS(wxRendererPtr)
+ wxDECLARE_NO_COPY_CLASS(wxRendererPtr);
};
+// return the global and unique wxRendererPtr
+/*static*/ wxRendererPtr& wxRendererPtr::Get()
+{
+ static wxRendererPtr s_renderer;
+
+ return s_renderer;
+}
+
#if wxUSE_DYNLIB_CLASS
// ----------------------------------------------------------------------------
}
#endif // wxUSE_DYNLIB_CLASS
-