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 * Jon A. Cruz <jon@joncruz.org>
10 *
11 * Copyright (C) 2008 authors
12 * Copyright (C) 2010 Jon A. Cruz
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * See the file COPYING for details.
20 */
22 #include <glibmm/ustring.h>
24 // forward declarations
25 class SPDesktop;
26 namespace Inkscape {
27 class Selection;
28 namespace LivePathEffect { class PathParam; }
30 namespace UI {
32 /**
33 * @brief System-wide clipboard manager
34 *
35 * ClipboardManager takes care of manipulating the system clipboard in response
36 * to user actions. It holds a complete SPDocument as the contents. This document
37 * is exported using output extensions when other applications request data.
38 * Copying to another instance of Inkscape is special-cased, because of the extra
39 * data required (i.e. style, size, Live Path Effects parameters, etc.)
40 */
42 class ClipboardManager {
43 public:
44 virtual void copy(SPDesktop *desktop) = 0;
45 virtual void copyPathParameter(Inkscape::LivePathEffect::PathParam *) = 0;
46 virtual bool paste(SPDesktop *desktop, bool in_place = false) = 0;
47 virtual bool pasteStyle(SPDesktop *desktop) = 0;
48 virtual bool pasteSize(SPDesktop *desktop, bool separately, bool apply_x, bool apply_y) = 0;
49 virtual bool pastePathEffect(SPDesktop *desktop) = 0;
50 virtual Glib::ustring getPathParameter(SPDesktop* desktop) = 0;
51 virtual Glib::ustring getShapeOrTextObjectId(SPDesktop *desktop) = 0;
52 virtual const gchar *getFirstObjectID() = 0;
54 static ClipboardManager *get();
55 protected:
56 ClipboardManager(); // singleton
57 virtual ~ClipboardManager();
58 private:
59 ClipboardManager(const ClipboardManager &); ///< no copy
60 ClipboardManager &operator=(const ClipboardManager &); ///< no assign
62 static ClipboardManager *_instance;
63 };
65 } // namespace IO
66 } // namespace Inkscape
68 #endif
69 /*
70 Local Variables:
71 mode:c++
72 c-file-style:"stroustrup"
73 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
74 indent-tabs-mode:nil
75 fill-column:99
76 End:
77 */
78 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :