]> git.lyx.org Git - lyx.git/blob - src/frontends/Clipboard.h
5ebde162daa695483134974e3bde1c4bf84765e5
[lyx.git] / src / frontends / Clipboard.h
1 // -*- C++ -*-
2 /**
3  * \file Clipboard.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  * \author Abdelrazak Younes
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef BASE_CLIPBOARD_H
15 #define BASE_CLIPBOARD_H
16
17 #include "support/docstring.h"
18
19 namespace lyx {
20 namespace frontend {
21
22 /**
23  * A Clipboard class manages the clipboard.
24  */
25 class Clipboard
26 {
27 public:
28         virtual ~Clipboard() {}
29
30         /**
31          * Get the window system clipboard contents.
32          * This should be called when the user requests to paste from the
33          * clipboard.
34          */
35         virtual docstring const get() const = 0;
36         /**
37          * Fill the window system clipboard.
38          * This should be called when the user requests to cut or copy to
39          * the clipboard.
40          */
41         virtual void put(docstring const &) = 0;
42
43         /// state of clipboard.
44         /// \retval true if the system clipboard has been set within LyX.
45         virtual bool isInternal() const = 0;
46         /// Is the clipboard empty?
47         virtual bool empty() const = 0;
48 };
49
50 } // namespace frontend
51
52 /// Implementation is in Application.C
53 extern frontend::Clipboard & theClipboard();
54
55 } // namespace lyx
56
57
58 #endif // BASE_CLIPBOARD_H