X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b068c4e8a1f4919360329c345eae36ff95ab5a10..e4315700228573d42a9afb1498fec4ee7b95ccb0:/src/common/clipcmn.cpp?ds=inline diff --git a/src/common/clipcmn.cpp b/src/common/clipcmn.cpp index 7dc2ef2030..9507ed416b 100644 --- a/src/common/clipcmn.cpp +++ b/src/common/clipcmn.cpp @@ -29,31 +29,53 @@ #endif #include "wx/clipbrd.h" +#include "wx/module.h" -//-------------------------------------------------------------------------- -// wxClipboardBase -//-------------------------------------------------------------------------- - -wxClipboardBase::wxClipboardBase() -{ -} +#if wxUSE_CLIPBOARD // ---------------------------------------------------------------------------- // wxClipboardModule: module responsible for initializing the global clipboard // object -// -// NB: IMPLEMENT_DYNAMIC_CLASS() for it is in common/appcmn.cpp // ---------------------------------------------------------------------------- class wxClipboardModule : public wxModule { public: - bool OnInit() - { wxTheClipboard = new wxClipboard; return TRUE; } - void OnExit() - { delete wxTheClipboard; wxTheClipboard = (wxClipboard *)NULL; } + bool OnInit(); + void OnExit(); private: DECLARE_DYNAMIC_CLASS(wxClipboardModule) }; +// ---------------------------------------------------------------------------- +// global data defined here +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxClipboardModule, wxModule) + +wxClipboard* wxTheClipboard = (wxClipboard *)NULL; + +// ---------------------------------------------------------------------------- +// implementation +// ---------------------------------------------------------------------------- + +wxClipboardBase::wxClipboardBase() +{ +} + +bool wxClipboardModule::OnInit() +{ + wxTheClipboard = new wxClipboard; + + return TRUE; +} + +void wxClipboardModule::OnExit() +{ + delete wxTheClipboard; + + wxTheClipboard = (wxClipboard *)NULL; +} + +#endif // wxUSE_CLIPBOARD