]> git.lyx.org Git - features.git/blob - src/frontends/gtk/GuiClipboard.h
This is the merging of the GUI API cleanup branch that was developed in svn+ssh:...
[features.git] / src / frontends / gtk / GuiClipboard.h
1 // -*- C++ -*-
2 /**
3  * \file gtk/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 Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CLIPBOARD_H
13 #define CLIPBOARD_H
14
15 #include "frontends/Clipboard.h"
16
17 #include "GWorkArea.h"
18
19 namespace lyx {
20 namespace frontend {
21
22 typedef GWorkArea FWorkArea;
23
24 /**
25  * The GTK version of the Clipboard.
26  */
27 class GuiClipboard: public lyx::frontend::Clipboard
28 {
29 public:
30         GuiClipboard(FWorkArea * work_area)
31                 : old_work_area_(work_area)
32         {
33         }
34
35         virtual ~GuiClipboard() {}
36
37         /** ClipBoard overloaded methods
38          */
39         //@{
40         void haveSelection(bool own)
41         {
42                 old_work_area_->haveSelection(own);
43         }
44
45         std::string const get() const
46         {
47                 return old_work_area_->getClipboard();
48         }
49
50         void put(std::string const & str)
51         {
52                 old_work_area_->putClipboard(str);
53         }
54         //@}
55
56 private:
57         FWorkArea * old_work_area_;
58 };
59
60 } // namespace frontend
61 } // namespace lyx
62
63 #endif // CLIPBOARD_H