summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a9b81a)
raw | patch | inline | side by side (parent: 6a9b81a)
author | johnce <johnce@users.sourceforge.net> | |
Wed, 5 Aug 2009 19:46:20 +0000 (19:46 +0000) | ||
committer | johnce <johnce@users.sourceforge.net> | |
Wed, 5 Aug 2009 19:46:20 +0000 (19:46 +0000) |
src/box3d.cpp | patch | blob | history | |
src/forward.h | patch | blob | history | |
src/sp-object.h | patch | blob | history | |
src/verbs.h | patch | blob | history | |
src/xml/node.h | patch | blob | history | |
src/xml/xml-forward.h | patch | blob | history |
diff --git a/src/box3d.cpp b/src/box3d.cpp
index 9ec0625aaf1323d477e4a92f3ad58237164feb41..0caf7b1eff40a3f294fa14c69e2aea22bdde1eed 100644 (file)
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
static void box3d_class_init(SPBox3DClass *klass);
static void box3d_init(SPBox3D *box3d);
-static void box3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void box3d_build(SPObject *object, Inkscape::XML::Document *document, Inkscape::XML::Node *repr);
static void box3d_release(SPObject *object);
static void box3d_set(SPObject *object, unsigned int key, const gchar *value);
static void box3d_update(SPObject *object, SPCtx *ctx, guint flags);
-static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
+static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::DocumentTree *doc, Inkscape::XML::Node *repr, guint flags);
static gchar *box3d_description(SPItem *item);
static Geom::Matrix box3d_set_transform(SPItem *item, Geom::Matrix const &xform);
}
static void
-box3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+box3d_build(SPObject *object, Inkscape::XML::Document *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
// TODO: Create/link to the correct perspective
- Document *doc = SP_OBJECT_DOCUMENT(box);
+ Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(box);
if (!doc) {
g_print ("No document for the box!!!!\n");
return;
}
-static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::DocumentTree *xml_doc, Inkscape::XML::Node *repr, guint flags)
{
SPBox3D *box = SP_BOX3D(object);
@@ -272,13 +272,13 @@ static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Documen
repr->setAttribute("inkscape:perspectiveID", box->persp_href);
} else {
/* box is not yet linked to a perspective; use the document's current perspective */
- Document *doc = SP_OBJECT_DOCUMENT(object);
+ Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(object);
if (box->persp_ref->getURI()) {
gchar *uri_string = box->persp_ref->getURI()->toString();
repr->setAttribute("inkscape:perspectiveID", uri_string);
g_free(uri_string);
} else {
- Inkscape::XML::Node *persp_repr = SP_OBJECT_REPR(doc->current_persp3d);
+ Inkscape::XML::Node *persp_repr = SP_OBJECT_REPR(doc->current_persp3d);//NOTE1
const gchar *persp_id = persp_repr->attribute("id");
gchar *href = g_strdup_printf("#%s", persp_id);
repr->setAttribute("inkscape:perspectiveID", href);
@@ -1378,7 +1378,7 @@ box3d_switch_perspectives(SPBox3D *box, Persp3D *old_persp, Persp3D *new_persp,
the original box and deletes the latter */
SPGroup *
box3d_convert_to_group(SPBox3D *box) {
- Document *doc = SP_OBJECT_DOCUMENT(box);
+ Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(box);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
// remember position of the box
diff --git a/src/forward.h b/src/forward.h
index 852934e96dddd4b920819e71b22b1f0b4cf330bb..4ac08c12689f69c9ebdadb68373ad2300d60cba1 100644 (file)
--- a/src/forward.h
+++ b/src/forward.h
namespace Inkscape {
struct Application;
struct ApplicationClass;
+namespace XML {
+class Document;
+class DocumentTree;
+}
}
/* Editing window */
/* Document tree */
-class Document;
class SPDocumentClass;
#define SP_TYPE_DOCUMENT (sp_document_get_type ())
diff --git a/src/sp-object.h b/src/sp-object.h
index 2932da728583d4e491d63edeb14ebdab34931856..9a4f8fd4d29397d7a574fff354ccba94404373c0 100644 (file)
--- a/src/sp-object.h
+++ b/src/sp-object.h
SPIXmlSpace xml_space;
unsigned int hrefcount; /* number of xlink:href references */
unsigned int _total_hrefcount; /* our hrefcount + total descendants */
- Document *document; /* Document we are part of */
+ Inkscape::XML::Document *document; /* Document we are part of */
SPObject *parent; /* Our parent (only one allowed) */
SPObject *children; /* Our children */
SPObject *_last_child; /* Remembered last child */
struct SPObjectClass {
GObjectClass parent_class;
- void (* build) (SPObject *object, Document *doc, Inkscape::XML::Node *repr);
+ void (* build) (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr);
void (* release) (SPObject *object);
/* Virtual handlers of repr signals */
/* Modification handler */
void (* modified) (SPObject *object, unsigned int flags);
- Inkscape::XML::Node * (* write) (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags);
+ Inkscape::XML::Node * (* write) (SPObject *object, Inkscape::XML::DocumentTree *doc, Inkscape::XML::Node *repr, unsigned int flags);
};
}
SPObject *sp_object_get_child_by_repr(SPObject *object, Inkscape::XML::Node *repr);
-void sp_object_invoke_build(SPObject *object, Document *document, Inkscape::XML::Node *repr, unsigned int cloned);
+void sp_object_invoke_build(SPObject *object, Inkscape::XML::Document *document, Inkscape::XML::Node *repr, unsigned int cloned);
void sp_object_set(SPObject *object, unsigned int key, gchar const *value);
diff --git a/src/verbs.h b/src/verbs.h
index 51bf0e34b4b5a02ff4d7c7c1f4c982ec963ad1d3..de9eae68ab338e47bef8a13548d77f4e825b189c 100644 (file)
--- a/src/verbs.h
+++ b/src/verbs.h
static void delete_all_view (Inkscape::UI::View::View * view);
void delete_view (Inkscape::UI::View::View * view);
- void sensitive (Document * in_doc = NULL, bool in_sensitive = true);
- void name (Document * in_doc = NULL, Glib::ustring in_name = "");
+ void sensitive (Inkscape::XML::DocumentTree * in_doc = NULL, bool in_sensitive = true);
+ void name (Inkscape::XML::DocumentTree * in_doc = NULL, Glib::ustring in_name = "");
// Yes, multiple public, protected and private sections are bad. We'll clean that up later
protected:
diff --git a/src/xml/node.h b/src/xml/node.h
index abcccdb9a68483123cbc293fb2d366b8d6c572bf..38f006d5c1acb379ae47c12c43374c9d1e77cd64 100644 (file)
--- a/src/xml/node.h
+++ b/src/xml/node.h
* @{
*/
+
+
/**
* @brief Get the type of the node
* @return NodeType enumeration member corresponding to the type of the node.
diff --git a/src/xml/xml-forward.h b/src/xml/xml-forward.h
index 33218c8ae2378131c88559fca59125d9af1f1066..e3ebad1838fab22fcfd582dee0147a42fe0a6d9f 100644 (file)
--- a/src/xml/xml-forward.h
+++ b/src/xml/xml-forward.h
struct AttributeRecord;
struct CommentNode;
class CompositeNodeObserver;
-struct Document;
+class Document;
class ElementNode;
class Event;
class EventAdd;