]> git.saurik.com Git - wxWidgets.git/blame - src/common/clipcmn.cpp
Ambiguous overload fix for gcc
[wxWidgets.git] / src / common / clipcmn.cpp
CommitLineData
b068c4e8
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: common/clipcmn.cpp
3// Purpose: common (to all ports) wxClipboard functions
4// Author: Robert Roebling
5// Modified by:
6// Created: 28.06.99
7// RCS-ID: $Id$
8// Copyright: (c) Robert Roebling
65571936 9// Licence: wxWindows licence
b068c4e8
RR
10/////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
b068c4e8
RR
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#include "wx/clipbrd.h"
12db77ca 28#include "wx/module.h"
b068c4e8 29
41b1047d
VS
30#if wxUSE_CLIPBOARD
31
5dc43d1f
VS
32static wxClipboard *gs_clipboard = NULL;
33
34/*static*/ wxClipboard *wxClipboardBase::Get()
35{
36 if ( !gs_clipboard )
37 {
38 gs_clipboard = new wxClipboard;
39 }
40 return gs_clipboard;
41}
42
b068c4e8 43// ----------------------------------------------------------------------------
5dc43d1f 44// wxClipboardModule: module responsible for destroying the global clipboard
b068c4e8 45// object
b068c4e8
RR
46// ----------------------------------------------------------------------------
47
48class wxClipboardModule : public wxModule
49{
50public:
5dc43d1f
VS
51 bool OnInit() { return true; }
52 void OnExit() { wxDELETE(gs_clipboard); }
b068c4e8
RR
53
54private:
55 DECLARE_DYNAMIC_CLASS(wxClipboardModule)
56};
57
d54598dd 58IMPLEMENT_DYNAMIC_CLASS(wxClipboardModule, wxModule)
8ee9d618 59
41b1047d 60#endif // wxUSE_CLIPBOARD