]> git.saurik.com Git - wxWidgets.git/blob - src/common/clipcmn.cpp
Catching up to latest thread changes
[wxWidgets.git] / src / common / clipcmn.cpp
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
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 #ifdef __GNUG__
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"
32 #include "wx/module.h"
33
34 // ----------------------------------------------------------------------------
35 // wxClipboardModule: module responsible for initializing the global clipboard
36 // object
37 // ----------------------------------------------------------------------------
38
39 class wxClipboardModule : public wxModule
40 {
41 public:
42 bool OnInit();
43 void OnExit();
44
45 private:
46 DECLARE_DYNAMIC_CLASS(wxClipboardModule)
47 };
48
49 // ----------------------------------------------------------------------------
50 // global data defined here
51 // ----------------------------------------------------------------------------
52
53 IMPLEMENT_DYNAMIC_CLASS(wxClipboardModule, wxModule)
54
55 wxClipboard* wxTheClipboard = (wxClipboard *)NULL;
56
57 // ----------------------------------------------------------------------------
58 // implementation
59 // ----------------------------------------------------------------------------
60
61 wxClipboardBase::wxClipboardBase()
62 {
63 }
64
65 bool wxClipboardModule::OnInit()
66 {
67 wxTheClipboard = new wxClipboard;
68
69 return TRUE;
70 }
71
72 void wxClipboardModule::OnExit()
73 {
74 delete wxTheClipboard;
75
76 wxTheClipboard = (wxClipboard *)NULL;
77 }