Code

add linking to other paths to lpe-PathParam
[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     
51     static ClipboardManager *get();
52 protected:
53     ClipboardManager(); // singleton
54     virtual ~ClipboardManager();
55 private:
56     ClipboardManager(const ClipboardManager &); ///< no copy
57     ClipboardManager &operator=(const ClipboardManager &); ///< no assign
58     
59     static ClipboardManager *_instance;
60 };
62 } // namespace IO
63 } // namespace Inkscape
65 #endif
66 /*
67   Local Variables:
68   mode:c++
69   c-file-style:"stroustrup"
70   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
71   indent-tabs-mode:nil
72   fill-column:99
73   End:
74 */
75 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :