text-node.h revision cb9f00490c21d085087d6db4fe89294e3890ed2d
70N/A/** @file
70N/A * @brief Text node implementation
70N/A */
70N/A/* Copyright 2004-2005 MenTaLguY <mental@rydia.net>
911N/A *
761N/A * This program is free software; you can redistribute it and/or
70N/A * modify it under the terms of the GNU General Public License
70N/A * as published by the Free Software Foundation; either version 2
70N/A * of the License, or (at your option) any later version.
70N/A *
70N/A * See the file COPYING for details.
70N/A *
70N/A */
70N/A
70N/A#ifndef SEEN_INKSCAPE_XML_TEXT_NODE_H
70N/A#define SEEN_INKSCAPE_XML_TEXT_NODE_H
70N/A
70N/A#include <glib/gquark.h>
70N/A#include "xml/simple-node.h"
70N/A
70N/Anamespace Inkscape {
70N/A
70N/Anamespace XML {
70N/A
70N/A/**
70N/A * @brief Text node, e.g. "Some text" in &lt;group&gt;Some text&lt;/group&gt;
70N/A */
70N/Astruct TextNode : public SimpleNode {
70N/A TextNode(Util::ptr_shared<char> content, Document *doc)
70N/A : SimpleNode(g_quark_from_static_string("string"), doc)
70N/A {
70N/A setContent(content);
70N/A }
70N/A TextNode(TextNode const &other, Document *doc)
70N/A : SimpleNode(other, doc) {}
493N/A
70N/A Inkscape::XML::NodeType type() const { return Inkscape::XML::TEXT_NODE; }
70N/A
851N/Aprotected:
70N/A SimpleNode *_duplicate(Document* doc) const { return new TextNode(*this, doc); }
911N/A};
911N/A
911N/A}
911N/A
70N/A}
70N/A
70N/A#endif
70N/A/*
70N/A Local Variables:
70N/A mode:c++
70N/A c-file-style:"stroustrup"
70N/A c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
70N/A indent-tabs-mode:nil
493N/A fill-column:99
70N/A End:
70N/A*/
493N/A// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
70N/A