summaryrefslogtreecommitdiffstats
path: root/src/sp-string.h
blob: 9e12f8429ffbcec50c7b86f805178d45498b8498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef __SP_STRING_H__
#define __SP_STRING_H__

/*
 * string elements
 * extracted from sp-text
 */

#include <glibmm/ustring.h>

#include "sp-object.h"

#define SP_TYPE_STRING (sp_string_get_type ())
#define SP_STRING(obj) ((SPString*)obj)
#define SP_IS_STRING(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPString)))

class CString;

class SPString : public SPObject {
public:
	CString* cstring;

    Glib::ustring  string;
};

struct SPStringClass {
	SPObjectClass parent_class;
};


class CString : public CObject {
public:
	CString(SPString* str);
	virtual ~CString();

	virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
	virtual void release();

	virtual void read_content();

	virtual void update(SPCtx* ctx, unsigned int flags);

protected:
	SPString* spstring;
};


GType sp_string_get_type ();

#endif