~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/xml/text-node.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Inkscape::XML::TextNode - simple text node implementation
 
3
 *
 
4
 * Copyright 2004-2005 MenTaLguY <mental@rydia.net>
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License
 
8
 * as published by the Free Software Foundation; either version 2
 
9
 * of the License, or (at your option) any later version.
 
10
 *
 
11
 * See the file COPYING for details.
 
12
 *
 
13
 */
 
14
 
 
15
#ifndef SEEN_INKSCAPE_XML_TEXT_NODE_H
 
16
#define SEEN_INKSCAPE_XML_TEXT_NODE_H
 
17
 
 
18
#include <glib/gquark.h>
 
19
#include "xml/simple-node.h"
 
20
 
 
21
namespace Inkscape {
 
22
 
 
23
namespace XML {
 
24
 
 
25
struct TextNode : public SimpleNode {
 
26
    TextNode(Util::SharedCStringPtr content)
 
27
    : SimpleNode(g_quark_from_static_string("string"))
 
28
    {
 
29
        setContent(content);
 
30
    }
 
31
 
 
32
    Inkscape::XML::NodeType type() const { return Inkscape::XML::TEXT_NODE; }
 
33
 
 
34
protected:
 
35
    SimpleNode *_duplicate() const { return new TextNode(*this); }
 
36
};
 
37
 
 
38
}
 
39
 
 
40
}
 
41
 
 
42
#endif
 
43
/*
 
44
  Local Variables:
 
45
  mode:c++
 
46
  c-file-style:"stroustrup"
 
47
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
48
  indent-tabs-mode:nil
 
49
  fill-column:99
 
50
  End:
 
51
*/
 
52
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :