diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2018-01-30 08:33:01 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2018-01-30 08:33:01 +0000 |
| commit | 267299811df952d08324a39008f52c19641de9e0 (patch) | |
| tree | 28fef736a52cb7a72119d119be8eb663ad20a77f /src/sp-script.cpp | |
| parent | Translations: update inkscape.pot (diff) | |
| download | inkscape-267299811df952d08324a39008f52c19641de9e0.tar.gz inkscape-267299811df952d08324a39008f52c19641de9e0.zip | |
Move classes derived from SPObject to own directory.
A lot of header clean-up.
Diffstat (limited to 'src/sp-script.cpp')
| -rw-r--r-- | src/sp-script.cpp | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/src/sp-script.cpp b/src/sp-script.cpp deleted file mode 100644 index 144c8d76a..000000000 --- a/src/sp-script.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * SVG <script> implementation - * - * Authors: - * Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> - * Jon A. Cruz <jon@joncruz.org> - * Abhishek Sharma - * - * Copyright (C) 2008 authors - * - * Released under GNU GPL version 2 or later, read the file 'COPYING' for more information - */ - -#include "sp-script.h" -#include "attributes.h" - -SPScript::SPScript() : SPObject() { - this->xlinkhref = NULL; -} - -SPScript::~SPScript() { -} - -void SPScript::build(SPDocument* doc, Inkscape::XML::Node* repr) { - SPObject::build(doc, repr); - - //Read values of key attributes from XML nodes into object. - this->readAttr( "xlink:href" ); - - doc->addResource("script", this); -} - -/** - * Reads the Inkscape::XML::Node, and initializes SPScript variables. For this to get called, - * our name must be associated with a repr via "sp_object_type_register". Best done through - * sp-object-repr.cpp's repr_name_entries array. - */ - -void SPScript::release() { - if (this->document) { - // Unregister ourselves - this->document->removeResource("script", this); - } - - SPObject::release(); -} - -void SPScript::update(SPCtx* /*ctx*/, unsigned int /*flags*/) { -} - - -void SPScript::modified(unsigned int /*flags*/) { -} - - -void SPScript::set(unsigned int key, const gchar* value) { - switch (key) { - case SP_ATTR_XLINK_HREF: - if (this->xlinkhref) { - g_free(this->xlinkhref); - } - - this->xlinkhref = g_strdup(value); - this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); - break; - default: - SPObject::set(key, value); - break; - } -} - -Inkscape::XML::Node* SPScript::write(Inkscape::XML::Document* /*doc*/, Inkscape::XML::Node* repr, guint /*flags*/) { - return repr; -} - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |
