]>
Commit | Line | Data |
---|---|---|
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 | |
55d99c7a | 9 | // Licence: wxWindows licence |
b068c4e8 RR |
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" | |
12db77ca | 32 | #include "wx/module.h" |
b068c4e8 | 33 | |
41b1047d VS |
34 | #if wxUSE_CLIPBOARD |
35 | ||
b068c4e8 RR |
36 | // ---------------------------------------------------------------------------- |
37 | // wxClipboardModule: module responsible for initializing the global clipboard | |
38 | // object | |
b068c4e8 RR |
39 | // ---------------------------------------------------------------------------- |
40 | ||
41 | class wxClipboardModule : public wxModule | |
42 | { | |
43 | public: | |
8ee9d618 VZ |
44 | bool OnInit(); |
45 | void OnExit(); | |
b068c4e8 RR |
46 | |
47 | private: | |
48 | DECLARE_DYNAMIC_CLASS(wxClipboardModule) | |
49 | }; | |
50 | ||
d54598dd VZ |
51 | // ---------------------------------------------------------------------------- |
52 | // global data defined here | |
53 | // ---------------------------------------------------------------------------- | |
97c79de2 | 54 | |
d54598dd | 55 | IMPLEMENT_DYNAMIC_CLASS(wxClipboardModule, wxModule) |
8ee9d618 VZ |
56 | |
57 | wxClipboard* wxTheClipboard = (wxClipboard *)NULL; | |
58 | ||
59 | // ---------------------------------------------------------------------------- | |
60 | // implementation | |
61 | // ---------------------------------------------------------------------------- | |
62 | ||
63 | wxClipboardBase::wxClipboardBase() | |
64 | { | |
65 | } | |
66 | ||
67 | bool wxClipboardModule::OnInit() | |
68 | { | |
69 | wxTheClipboard = new wxClipboard; | |
70 | ||
71 | return TRUE; | |
72 | } | |
73 | ||
74 | void wxClipboardModule::OnExit() | |
75 | { | |
76 | delete wxTheClipboard; | |
77 | ||
78 | wxTheClipboard = (wxClipboard *)NULL; | |
79 | } | |
41b1047d VS |
80 | |
81 | #endif // wxUSE_CLIPBOARD |