Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
clipboard.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
/*
5 * Authors: see git history
6 * Krzysztof KosiƄski <tweenk@o2.pl>
7 * Jon A. Cruz <jon@joncruz.org>
8 *
9 *
10 * Copyright (C) 2018 Authors
11 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
12 */
13
14#ifndef INKSCAPE_UI_CLIPBOARD_H
15#define INKSCAPE_UI_CLIPBOARD_H
16
17#include <glibmm/ustring.h>
18#include <vector>
19#include <2geom/point.h>
20#include <2geom/rect.h>
21
22class SPDesktop;
23class SPDocument;
24
25namespace Inkscape {
26
27class ObjectSet;
28namespace XML { class Node; }
29namespace LivePathEffect { class PathParam; }
30
31namespace UI {
32
44{
45public:
46 virtual void copy(ObjectSet *set) = 0;
48 virtual bool copyString(Glib::ustring str) = 0;
49 virtual void copySymbol(Inkscape::XML::Node* symbol, gchar const* style, SPDocument *source, const char* symbol_set, Geom::Rect const &bbox, bool set_clipboard) = 0;
50 virtual void insertSymbol(SPDesktop *desktop, Geom::Point const &shift_dt, bool read_clipboard) = 0;
51 virtual bool paste(SPDesktop *desktop, bool in_place = false, bool on_page = false) = 0;
52 virtual bool pasteStyle(ObjectSet *set) = 0;
53 virtual bool pasteSize(ObjectSet *set, bool separately, bool apply_x, bool apply_y) = 0;
54 virtual bool pastePathEffect(ObjectSet *set) = 0;
55 virtual Glib::ustring getPathParameter(SPDesktop* desktop) = 0;
56 virtual Glib::ustring getShapeOrTextObjectId(SPDesktop *desktop) = 0;
57 virtual std::vector<Glib::ustring> getElementsOfType(SPDesktop *desktop, gchar const* type = "*", gint maxdepth = -1) = 0;
58 virtual Glib::ustring getFirstObjectID() = 0;
59
60 static ClipboardManager *get();
61
62protected:
63 ClipboardManager() = default;
66};
67
68} // namespace UI
69} // namespace Inkscape
70
71#endif // INKSCAPE_UI_CLIPBOARD_H
72/*
73 Local Variables:
74 mode:c++
75 c-file-style:"stroustrup"
76 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
77 indent-tabs-mode:nil
78 fill-column:99
79 End:
80*/
81// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Cartesian point / 2D vector and related operations.
Two-dimensional point that doubles as a vector.
Definition point.h:66
Axis aligned, non-empty rectangle.
Definition rect.h:92
System-wide clipboard manager.
Definition clipboard.h:44
virtual std::vector< Glib::ustring > getElementsOfType(SPDesktop *desktop, gchar const *type="*", gint maxdepth=-1)=0
virtual void copyPathParameter(Inkscape::LivePathEffect::PathParam *)=0
static ClipboardManager * get()
virtual Glib::ustring getShapeOrTextObjectId(SPDesktop *desktop)=0
ClipboardManager & operator=(ClipboardManager const &)=delete
virtual void copySymbol(Inkscape::XML::Node *symbol, gchar const *style, SPDocument *source, const char *symbol_set, Geom::Rect const &bbox, bool set_clipboard)=0
virtual bool pasteSize(ObjectSet *set, bool separately, bool apply_x, bool apply_y)=0
virtual Glib::ustring getPathParameter(SPDesktop *desktop)=0
virtual bool pastePathEffect(ObjectSet *set)=0
virtual void copy(ObjectSet *set)=0
virtual Glib::ustring getFirstObjectID()=0
virtual void insertSymbol(SPDesktop *desktop, Geom::Point const &shift_dt, bool read_clipboard)=0
virtual bool copyString(Glib::ustring str)=0
ClipboardManager(ClipboardManager const &)=delete
virtual bool paste(SPDesktop *desktop, bool in_place=false, bool on_page=false)=0
virtual bool pasteStyle(ObjectSet *set)=0
Interface for refcounted XML nodes.
Definition node.h:80
To do: update description of desktop.
Definition desktop.h:149
Typed SVG document implementation.
Definition document.h:101
Helper class to stream background task notifications as a series of messages.
Axis-aligned rectangle.
SPDesktop * desktop