Code

Revert recent refactoring changes by johnce because they break the build, which canno...
[inkscape.git] / src / ui / clipboard.h
1 #ifndef SEEN_INKSCAPE_CLIPBOARD_H
2 #define SEEN_INKSCAPE_CLIPBOARD_H
4 /** @file
5  * @brief System-wide clipboard management - class declaration
6  */
7 /* Authors:
8  *   Krzysztof KosiƄski <tweenk@o2.pl>
9  *
10  * Copyright (C) 2008 authors
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * See the file COPYING for details.
18  */
20 #include <glibmm/ustring.h>
22 // forward declarations
23 class SPDesktop;
24 namespace Inkscape {
25 class Selection;
26 namespace LivePathEffect { class PathParam; }
28 namespace UI {
30 /**
31  * @brief System-wide clipboard manager
32  *
33  * ClipboardManager takes care of manipulating the system clipboard in response
34  * to user actions. It holds a complete SPDocument as the contents. This document
35  * is exported using output extensions when other applications request data.
36  * Copying to another instance of Inkscape is special-cased, because of the extra
37  * data required (i.e. style, size, Live Path Effects parameters, etc.)
38  */
40 class ClipboardManager {
41 public:
42     virtual void copy() = 0;
43     virtual void copyPathParameter(Inkscape::LivePathEffect::PathParam *) = 0;
44     virtual bool paste(bool in_place = false) = 0;
45     virtual bool pasteStyle() = 0;
46     virtual bool pasteSize(bool separately, bool apply_x, bool apply_y) = 0;
47     virtual bool pastePathEffect() = 0;
48     virtual Glib::ustring getPathParameter() = 0;
49     virtual Glib::ustring getShapeOrTextObjectId() = 0;
50     virtual const gchar *getFirstObjectID() = 0;
51     
52     static ClipboardManager *get();
53 protected:
54     ClipboardManager(); // singleton
55     virtual ~ClipboardManager();
56 private:
57     ClipboardManager(const ClipboardManager &); ///< no copy
58     ClipboardManager &operator=(const ClipboardManager &); ///< no assign
59     
60     static ClipboardManager *_instance;
61 };
63 } // namespace IO
64 } // namespace Inkscape
66 #endif
67 /*
68   Local Variables:
69   mode:c++
70   c-file-style:"stroustrup"
71   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
72   indent-tabs-mode:nil
73   fill-column:99
74   End:
75 */
76 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :