dolphin/Externals/wxWidgets/src/common/clipcmn.cpp
2008-12-08 05:17:03 +00:00

63 lines
1.7 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: src/common/clipcmn.cpp
// Purpose: common (to all ports) wxClipboard functions
// Author: Robert Roebling
// Modified by:
// Created: 28.06.99
// RCS-ID: $Id: clipcmn.cpp 40943 2006-08-31 19:31:43Z ABX $
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_CLIPBOARD
#include "wx/clipbrd.h"
#ifndef WX_PRECOMP
#include "wx/module.h"
#endif
static wxClipboard *gs_clipboard = NULL;
/*static*/ wxClipboard *wxClipboardBase::Get()
{
if ( !gs_clipboard )
{
gs_clipboard = new wxClipboard;
}
return gs_clipboard;
}
// ----------------------------------------------------------------------------
// wxClipboardModule: module responsible for destroying the global clipboard
// object
// ----------------------------------------------------------------------------
class wxClipboardModule : public wxModule
{
public:
bool OnInit() { return true; }
void OnExit() { wxDELETE(gs_clipboard); }
private:
DECLARE_DYNAMIC_CLASS(wxClipboardModule)
};
IMPLEMENT_DYNAMIC_CLASS(wxClipboardModule, wxModule)
#endif // wxUSE_CLIPBOARD