]> git.saurik.com Git - wxWidgets.git/blame - src/common/clipcmn.cpp
Compare and assign wxChars to wxChar instead char local variable.
[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
14f355c2 20#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
b068c4e8
RR
21 #pragma implementation "clipboardbase.h"
22#endif
23
24// For compilers that support precompilation, includes "wx.h".
25#include "wx/wxprec.h"
26
27#ifdef __BORLANDC__
28 #pragma hdrstop
29#endif
30
31#include "wx/clipbrd.h"
12db77ca 32#include "wx/module.h"
b068c4e8 33
41b1047d
VS
34#if wxUSE_CLIPBOARD
35
5dc43d1f
VS
36static wxClipboard *gs_clipboard = NULL;
37
38/*static*/ wxClipboard *wxClipboardBase::Get()
39{
40 if ( !gs_clipboard )
41 {
42 gs_clipboard = new wxClipboard;
43 }
44 return gs_clipboard;
45}
46
b068c4e8 47// ----------------------------------------------------------------------------
5dc43d1f 48// wxClipboardModule: module responsible for destroying the global clipboard
b068c4e8 49// object
b068c4e8
RR
50// ----------------------------------------------------------------------------
51
52class wxClipboardModule : public wxModule
53{
54public:
5dc43d1f
VS
55 bool OnInit() { return true; }
56 void OnExit() { wxDELETE(gs_clipboard); }
b068c4e8
RR
57
58private:
59 DECLARE_DYNAMIC_CLASS(wxClipboardModule)
60};
61
d54598dd 62IMPLEMENT_DYNAMIC_CLASS(wxClipboardModule, wxModule)
8ee9d618 63
41b1047d 64#endif // wxUSE_CLIPBOARD