summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 68578c4)
raw | patch | inline | side by side (parent: 68578c4)
author | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 6 Aug 2009 14:17:17 +0000 (14:17 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 6 Aug 2009 14:17:17 +0000 (14:17 +0000) |
333 files changed:
diff --git a/src/Makefile_insert b/src/Makefile_insert
index 5967c7cfca0bd8134ea87f8754a18ceec41be12b..de986ca16e3a19fec2f3f1943ede0926a82c766e 100644 (file)
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
star-context.cpp star-context.h \
streq.h \
strneq.h \
- streams-handles.h streams-handles.cpp \
- streams-ftp.h streams-ftp.cpp \
- streams-http.h streams-http.cpp \
style.cpp style.h \
svg-profile.h \
svg-view.cpp svg-view.h \
index 730188bdd0859966d3143946283a34a952ce1fd6..49010efdc50dae1291859edfd523471bf9736811 100644 (file)
#endif
/*
- TODO: Replace Document with the new Inkscape::Document
+ TODO: Replace SPDocument with the new Inkscape::Document
TODO: Change 'desktop's to 'view*'s
TODO: Add derivation from Inkscape::Application::RunMode
*/
//
gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL);
bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR);
- Document *doc = sp_document_new (have_default? tmpl:0, true, true);
+ SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true);
g_return_val_if_fail (doc != 0, false);
Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc);
sp_document_unref (doc);
}
/// Returns the active document
-Document*
+SPDocument*
Editor::getActiveDocument()
{
if (getActiveDesktop()) {
}
void
-Editor::addDocument (Document *doc)
+Editor::addDocument (SPDocument *doc)
{
if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
_instance->_documents = g_slist_append (_instance->_documents, doc);
}
void
-Editor::removeDocument (Document *doc)
+Editor::removeDocument (SPDocument *doc)
{
_instance->_document_set.erase(doc);
if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
}
SPDesktop*
-Editor::createDesktop (Document* doc)
+Editor::createDesktop (SPDocument* doc)
{
g_assert (doc != 0);
(new Inkscape::UI::View::EditWidget (doc))->present();
bool
Editor::isDuplicatedView (SPDesktop* dt)
{
- Document const* document = dt->doc();
+ SPDocument const* document = dt->doc();
if (!document) {
return false;
}
for ( GSList *iter = _instance->_desktops ; iter ; iter = iter->next ) {
SPDesktop *other_desktop=(SPDesktop *)iter->data;
- Document *other_document=other_desktop->doc();
+ SPDocument *other_document=other_desktop->doc();
if ( other_document == document && other_desktop != dt ) {
return true;
}
index 0886555e93e7242ed97c5c8c106c1387c510bd7e..4545022b88cc7ce1a9437c6f689f6de808dc2e39 100644 (file)
--- a/src/application/editor.h
+++ b/src/application/editor.h
#include "app-prototype.h"
class SPDesktop;
-class Document;
+class SPDocument;
class SPEventContext;
namespace Inkscape {
void refreshDisplay();
void exit();
- bool lastViewOfDocument(Document* doc, SPDesktop* view) const;
+ bool lastViewOfDocument(SPDocument* doc, SPDesktop* view) const;
bool addView(SPDesktop* view);
bool deleteView(SPDesktop* view);
static Inkscape::XML::Document *getPreferences();
static SPDesktop* getActiveDesktop();
static bool isDesktopActive (SPDesktop* dt) { return getActiveDesktop()==dt; }
- static SPDesktop* createDesktop (Document* doc);
+ static SPDesktop* createDesktop (SPDocument* doc);
static void addDesktop (SPDesktop* dt);
static void removeDesktop (SPDesktop* dt);
static void activateDesktop (SPDesktop* dt);
static void reactivateDesktop (SPDesktop* dt);
static bool isDuplicatedView (SPDesktop* dt);
- static Document* getActiveDocument();
- static void addDocument (Document* doc);
- static void removeDocument (Document* doc);
+ static SPDocument* getActiveDocument();
+ static void addDocument (SPDocument* doc);
+ static void removeDocument (SPDocument* doc);
static void selectionModified (Inkscape::Selection*, guint);
static void selectionChanged (Inkscape::Selection*);
Editor(Editor const &);
Editor& operator=(Editor const &);
- std::multiset<Document *> _document_set;
+ std::multiset<SPDocument *> _document_set;
GSList *_documents;
GSList *_desktops;
gchar *_argv0;
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index 835e43a2664c32508514f86fe6fee4c1399c253a..e689c93db186669b3768243e8d755cb40536aa6a 100644 (file)
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
#include "display/sp-canvas.h"
#include "sp-ellipse.h"
#include "document.h"
-#include "xml/document.h"
#include "sp-namedview.h"
#include "selection.h"
#include "desktop-handles.h"
}
/* Create object */
- Inkscape::XML::DocumentTree *xml_doc = sp_document_repr_doc(desktop->doc());
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc());
Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
repr->setAttribute("sodipodi:type", "arc");
diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp
index 02648694894456ae9d3789ec88246b52fff19093..f7022584f73624bfa6a28a9603369856afd9632d 100644 (file)
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
#include <errno.h>
#endif
-//--tullarisc #if HAVE_SYS_STAT_H
+#if HAVE_SYS_STAT_H
#include <sys/stat.h>
-//#endif
+#endif
#include "javabind.h"
#include "javabind-private.h"
@@ -742,7 +742,7 @@ jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, js
/*
JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr;
String s = getString(env, jstr);
- Document *doc = sp_document_new_from_mem(s.c_str(), s.size(), true);
+ SPDocument *doc = sp_document_new_from_mem(s.c_str(), s.size(), true);
*/
return JNI_TRUE;
}
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 4146ec30df4e2afcca52c28a0c800ba6c1bfb3fc..128b5f2ff187bd27f882963d59180c587e857e87 100644 (file)
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -185,7 +185,7 @@ static void sp_box3d_context_selection_changed(Inkscape::Selection *selection, g
/* create a default perspective in document defs if none is present
(can happen after 'vacuum defs' or when a pre-0.46 file is opened) */
-static void sp_box3d_context_check_for_persp_in_defs(Document *document) {
+static void sp_box3d_context_check_for_persp_in_defs(SPDocument *document) {
SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document);
bool has_persp = false;
}
/* Create object */
- Inkscape::XML::DocumentTree *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DOCUMENT(&bc));
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DOCUMENT(&bc));
Inkscape::XML::Node *repr = xml_doc->createElement("svg:g");
repr->setAttribute("sodipodi:type", "inkscape:box3d");
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index f09a2f9f6eb369620da9a63a354d6e0e401efe86..241279100a8bee0e7b6bfc8033d5275cd3c1b904 100644 (file)
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
static void box3d_side_class_init (Box3DSideClass *klass);
static void box3d_side_init (Box3DSide *side);
-static void box3d_side_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void box3d_side_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *box3d_side_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void box3d_side_set (SPObject *object, unsigned int key, const gchar *value);
static void box3d_side_update (SPObject *object, SPCtx *ctx, guint flags);
}
static void
-box3d_side_build (SPObject * object, Document * document, Inkscape::XML::Node * repr)
+box3d_side_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr)
{
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
Inkscape::XML::Node *
box3d_side_convert_to_path(Box3DSide *side) {
// TODO: Copy over all important attributes (see sp_selected_item_to_curved_repr() for an example)
- Document *doc = SP_OBJECT_DOCUMENT(side);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(side);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
diff --git a/src/box3d.cpp b/src/box3d.cpp
index 0caf7b1eff40a3f294fa14c69e2aea22bdde1eed..5cffa66d954bcfdcd4ef7e8a110c338c5a31f5b1 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, Inkscape::XML::Document *document, Inkscape::XML::Node *repr);
+static void box3d_build(SPObject *object, SPDocument *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::DocumentTree *doc, Inkscape::XML::Node *repr, guint flags);
+static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Document *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, Inkscape::XML::Document *document, Inkscape::XML::Node *repr)
+box3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
@@ -126,7 +126,7 @@ box3d_build(SPObject *object, Inkscape::XML::Document *document, Inkscape::XML::
// TODO: Create/link to the correct perspective
- Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(box);
+ SPDocument *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::DocumentTree *xml_doc, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Document *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 */
- Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(object);
+ SPDocument *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);//NOTE1
+ Inkscape::XML::Node *persp_repr = SP_OBJECT_REPR(doc->current_persp3d);
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) {
- Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(box);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(box);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
// remember position of the box
index 62e4c865f03ee3089a896c3f2559e37001d32713..c8c51b5510f4ae5c69e90bcb7f62f2478f1da6c7 100644 (file)
--- a/src/color-profile-fns.h
+++ b/src/color-profile-fns.h
#include <lcms.h>
#endif // ENABLE_LCMS
-class Document;
+class SPDocument;
namespace Inkscape {
#if ENABLE_LCMS
-cmsHPROFILE colorprofile_get_handle( Document* document, guint* intent, gchar const* name );
+cmsHPROFILE colorprofile_get_handle( SPDocument* document, guint* intent, gchar const* name );
cmsHTRANSFORM colorprofile_get_display_transform();
Glib::ustring colorprofile_get_display_id( int screen, int monitor );
index d7b361c5087c90e73772784ebeb29c84d5bed1dc..cdbf76b446721bcd2f4799ed08442ab8eeb6a8fc 100644 (file)
--- a/src/color-profile-test.h
+++ b/src/color-profile-test.h
class ColorProfileTest : public CxxTest::TestSuite
{
public:
- Document* _doc;
+ SPDocument* _doc;
ColorProfileTest() :
_doc(0)
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index b2487a6a9ec28eb787b07dd6370b9738189fb13e..5868a958294f23234d2c1b9ecfedd066fd93a5f8 100644 (file)
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
void ColorProfile::release( SPObject *object )
{
// Unregister ourselves
- Document* document = SP_OBJECT_DOCUMENT(object);
+ SPDocument* document = SP_OBJECT_DOCUMENT(object);
if ( document ) {
sp_document_remove_resource (SP_OBJECT_DOCUMENT (object), "iccprofile", SP_OBJECT (object));
}
/**
* Callback: set attributes from associated repr.
*/
-void ColorProfile::build( SPObject *object, Document *document, Inkscape::XML::Node *repr )
+void ColorProfile::build( SPObject *object, SPDocument *document, Inkscape::XML::Node *repr )
{
ColorProfile *cprof = COLORPROFILE(object);
g_assert(cprof->href == 0);
//LCMSAPI cmsHPROFILE LCMSEXPORT cmsOpenProfileFromMem(LPVOID MemPtr, DWORD dwSize);
// Try to open relative
- Document *doc = SP_OBJECT_DOCUMENT(object);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(object);
if (!doc) {
doc = SP_ACTIVE_DOCUMENT;
g_warning("object has no document. using active");
return intent;
}
-static SPObject* bruteFind( Document* document, gchar const* name )
+static SPObject* bruteFind( SPDocument* document, gchar const* name )
{
SPObject* result = 0;
const GSList * current = sp_document_get_resource_list(document, "iccprofile");
return result;
}
-cmsHPROFILE Inkscape::colorprofile_get_handle( Document* document, guint* intent, gchar const* name )
+cmsHPROFILE Inkscape::colorprofile_get_handle( SPDocument* document, guint* intent, gchar const* name )
{
cmsHPROFILE prof = 0;
diff --git a/src/color-profile.h b/src/color-profile.h
index 2d8ac5b6d0214cf729ca976401b2b118e582379e..2e57e7ef0221b3b813b00dca270d4df2dbabf84a 100644 (file)
--- a/src/color-profile.h
+++ b/src/color-profile.h
static void init( ColorProfile *cprof );
static void release( SPObject *object );
- static void build( SPObject *object, Document *document, Inkscape::XML::Node *repr );
+ static void build( SPObject *object, SPDocument *document, Inkscape::XML::Node *repr );
static void set( SPObject *object, unsigned key, gchar const *value );
static Inkscape::XML::Node *write( SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags );
#if ENABLE_LCMS
index 89ffdc65e52cc0d3761aa7aec00b663bb52b2a82..03e4796bd4526be23a3448d42f471d3dd8de3a88 100644 (file)
/**
- * Aggregates undo stack observers for convenient management and triggering in Document
+ * Aggregates undo stack observers for convenient management and triggering in SPDocument
*
* Heavily inspired by Inkscape::XML::CompositeNodeObserver.
*
index 01c64f4fdc101da3cd14310dcbe0d76b0ad8da3b..cd00d421115f8274b2861699d2957e281dfc3b8f 100644 (file)
/**
- * Aggregates undo stack observers for management and triggering in Document
+ * Aggregates undo stack observers for management and triggering in SPDocument
*
* Heavily inspired by Inkscape::XML::CompositeNodeObserver.
*
class Event;
/**
- * Aggregates UndoStackObservers for management and triggering in an Document's undo/redo
+ * Aggregates UndoStackObservers for management and triggering in an SPDocument's undo/redo
* system.
*/
class CompositeUndoStackObserver : public UndoStackObserver {
diff --git a/src/conditions.cpp b/src/conditions.cpp
index c431600f361d095cf8294c5fe6c2102feff6d143..4a18a6913be5ddebf2bae19315a599260f279f39 100644 (file)
--- a/src/conditions.cpp
+++ b/src/conditions.cpp
if (language_codes.empty())
return false;
- Document *document = SP_OBJECT_DOCUMENT(item);
+ SPDocument *document = SP_OBJECT_DOCUMENT(item);
Glib::ustring document_language = document->getLanguage();
if (document_language.size() == 0)
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index 0bc961e5d3360199e0604c9b089067c80451da3d..43c9c0b66cb652c5fa906f50d7d1f5e1c5ca20b2 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
{
// Don't count this as changes to the document,
// it is basically just late initialisation.
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
bool saved = sp_document_get_undo_sensitive(document);
sp_document_set_undo_sensitive(document, false);
index 17e5f6f32a462d6ed4943558eca8f4c425cade58..2131bdced797be78964e0e798c769ba9535f06d7 100644 (file)
@@ -686,7 +686,7 @@ connector_handle_button_release(SPConnectorContext *const cc, GdkEventButton con
if ( revent.button == 1 && !event_context->space_panning ) {
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
if (cc->state == SP_CONNECTOR_CONTEXT_REROUTING) {
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
cc_connector_rerouting_finish(cc, NULL);
cc_connector_rerouting_finish(SPConnectorContext *const cc, Geom::Point *const p)
{
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
// Clear the temporary path:
cc->red_curve->reset();
c->transform(SP_EVENT_CONTEXT_DESKTOP(cc)->dt2doc());
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
if ( c && !c->is_empty() ) {
return;
}
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index 41b7ab4da1fba639b4dffc5fe4a66e5473ed233e..cea478f85847c35d149ef913d8e6d63b32b26856 100644 (file)
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
case GDK_KP_Delete:
case GDK_BackSpace:
{
- Document *doc = SP_OBJECT_DOCUMENT(guide);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(guide);
sp_guide_remove(guide);
sp_document_done(doc, SP_VERB_NONE, _("Delete guide"));
ret = TRUE;
index b0ca4b84a620b3110adb3005635f792db337df04..481bf35ea56ab3cabfbd8b0f30b6b35c6fb9b2be 100644 (file)
--- a/src/desktop-handles.cpp
+++ b/src/desktop-handles.cpp
return desktop->selection;
}
-Document *
+SPDocument *
sp_desktop_document (SPDesktop const * desktop)
{
g_return_val_if_fail (desktop != NULL, NULL);
diff --git a/src/desktop-handles.h b/src/desktop-handles.h
index 8c48d0bbd7a0a46b891c66c6e7538160e76807a3..a8d0a3d1e9bae4672434edb7c895c4e658692f40 100644 (file)
--- a/src/desktop-handles.h
+++ b/src/desktop-handles.h
SPEventContext * sp_desktop_event_context (SPDesktop const * desktop);
Inkscape::Selection * sp_desktop_selection (SPDesktop const * desktop);
-Document * sp_desktop_document (SPDesktop const * desktop);
+SPDocument * sp_desktop_document (SPDesktop const * desktop);
SPCanvas * sp_desktop_canvas (SPDesktop const * desktop);
SPCanvasItem * sp_desktop_acetate (SPDesktop const * desktop);
SPCanvasGroup * sp_desktop_main (SPDesktop const * desktop);
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 4f832682d9586cc5ea8e59acf35549b8f87fa30e..6b7c20094766f35cf582a995900ac2f1a9aaa3e5 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
namedview = nv;
canvas = aCanvas;
- Document *document = SP_OBJECT_DOCUMENT (namedview);
+ SPDocument *document = SP_OBJECT_DOCUMENT (namedview);
/* Kill flicker */
sp_document_ensure_up_to_date (document);
* Make desktop switch documents.
*/
void
-SPDesktop::change_document (Document *theDocument)
+SPDesktop::change_document (SPDocument *theDocument)
{
g_return_if_fail (theDocument != NULL);
* Associate document with desktop.
*/
void
-SPDesktop::setDocument (Document *doc)
+SPDesktop::setDocument (SPDocument *doc)
{
if (this->doc() && doc) {
namedview->hide(this);
diff --git a/src/desktop.h b/src/desktop.h
index f9e7f6a17eeb1347e5e3cc50ccc18d38b476cb83..73b9262ddd01d6dfcd93aadc7c8c06d3030e11ab 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
sigc::signal<void, SPObject *> _layer_changed_signal;
sigc::signal<bool, const SPCSSAttr *>::accumulated<StopOnTrue> _set_style_signal;
sigc::signal<int, SPStyle *, int>::accumulated<StopOnNonZero> _query_style_signal;
- sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,Document*> & slot)
+ sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,SPDocument*> & slot)
{
return _document_replaced_signal.connect (slot);
}
bool itemIsHidden(SPItem const *item) const;
void activate_guides (bool activate);
- void change_document (Document *document);
+ void change_document (SPDocument *document);
void set_event_context (GtkType type, const gchar *config);
void push_event_context (GtkType type, const gchar *config, unsigned int key);
Geom::Point doc2dt(Geom::Point const &p) const;
Geom::Point dt2doc(Geom::Point const &p) const;
- virtual void setDocument (Document* doc);
+ virtual void setDocument (SPDocument* doc);
virtual bool shutdown();
virtual void mouseover() {}
virtual void mouseout() {}
void push_current_zoom (GList**);
- sigc::signal<void,SPDesktop*,Document*> _document_replaced_signal;
+ sigc::signal<void,SPDesktop*,SPDocument*> _document_replaced_signal;
sigc::signal<void> _activate_signal;
sigc::signal<void> _deactivate_signal;
sigc::signal<void,SPDesktop*,SPEventContext*> _event_context_changed_signal;
index cd690a0d43a06e33b6c7dedd908e898c29f402e6..55884fe4af10b87f5182a9b0ce5fe47490714179 100644 (file)
static unsigned trace_visionkey;
static NRArenaItem *trace_root;
static gdouble trace_zoom;
-static Document *trace_doc;
+static SPDocument *trace_doc;
static void
clonetiler_trace_hide_tiled_clones_recursively (SPObject *from)
}
static void
-clonetiler_trace_setup (Document *doc, gdouble zoom, SPItem *original)
+clonetiler_trace_setup (SPDocument *doc, gdouble zoom, SPItem *original)
{
trace_arena = NRArena::create();
/* Create ArenaItem and set transform */
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp
index 56d50596ce57b9835fcc34a242676eb01cbcb86d..0cde76657c99fd1a861f9034693744d39fac3061 100644 (file)
--- a/src/dialogs/export.cpp
+++ b/src/dialogs/export.cpp
if (SP_ACTIVE_DOCUMENT && SP_DOCUMENT_URI (SP_ACTIVE_DOCUMENT))
{
gchar *name;
- Document * doc = SP_ACTIVE_DOCUMENT;
+ SPDocument * doc = SP_ACTIVE_DOCUMENT;
const gchar *uri = SP_DOCUMENT_URI (doc);
Inkscape::XML::Node * repr = sp_document_repr_root(doc);
const gchar * text_extension = repr->attribute("inkscape:output_extension");
switch (current_key) {
case SELECTION_DRAWING:
if ( SP_ACTIVE_DESKTOP ) {
- Document *doc;
+ SPDocument *doc;
doc = sp_desktop_document (SP_ACTIVE_DESKTOP);
Geom::OptRect bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc)));
if (bbox) {
if ( SP_ACTIVE_DESKTOP )
{
- Document *doc;
+ SPDocument *doc;
Geom::OptRect bbox;
doc = sp_desktop_document (SP_ACTIVE_DESKTOP);
switch (key) {
case SELECTION_PAGE:
case SELECTION_DRAWING: {
- Document * doc = SP_ACTIVE_DOCUMENT;
+ SPDocument * doc = SP_ACTIVE_DOCUMENT;
sp_document_get_export_hints (doc, &filename, &xdpi, &ydpi);
if (filename == NULL) {
switch ((selection_type)(GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(base), "selection-type")))) {
case SELECTION_PAGE:
case SELECTION_DRAWING: {
- Document * doc = SP_ACTIVE_DOCUMENT;
+ SPDocument * doc = SP_ACTIVE_DOCUMENT;
Inkscape::XML::Node * repr = sp_document_repr_root(doc);
bool modified = false;
const gchar * temp_string;
}
case SELECTION_SELECTION: {
const GSList * reprlst;
- Document * doc = SP_ACTIVE_DOCUMENT;
+ SPDocument * doc = SP_ACTIVE_DOCUMENT;
bool modified = false;
bool saved = sp_document_get_undo_sensitive(doc);
}
break;
case SELECTION_DRAWING: {
- Document *doc = sp_desktop_document (SP_ACTIVE_DESKTOP);
+ SPDocument *doc = sp_desktop_document (SP_ACTIVE_DESKTOP);
Geom::OptRect bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc)));
}
case SELECTION_PAGE: {
- Document *doc;
+ SPDocument *doc;
doc = sp_desktop_document (SP_ACTIVE_DESKTOP);
index 32dee453ac286fc70c1c5e2f1b55ecd8fd442fe7..c8644fef962ef2b3af6adddb79be4791f2d50f19 100644 (file)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
static gint blocked = 0;
static SPDesktop *current_desktop = NULL;
-static Document *current_document = NULL;
+static SPDocument *current_document = NULL;
static gint selected_attr = 0;
static Inkscape::XML::Node *selected_repr = NULL;
static void sp_xmltree_desktop_deactivate( Inkscape::Application *inkscape, SPDesktop *desktop, GtkWidget *dialog );
static void set_tree_desktop(SPDesktop *desktop);
-static void set_tree_document(Document *document);
+static void set_tree_document(SPDocument *document);
static void set_tree_repr(Inkscape::XML::Node *repr);
static void set_tree_select(Inkscape::XML::Node *repr);
@@ -119,8 +119,8 @@ static void on_attr_unselect_row_clear_text(GtkCList *list, gint row, gint colum
static void on_editable_changed_enable_if_valid_xml_name(GtkEditable *editable, gpointer data);
static void on_desktop_selection_changed(Inkscape::Selection *selection);
-static void on_document_replaced(SPDesktop *dt, Document *document);
-static void on_document_uri_set(gchar const *uri, Document *document);
+static void on_document_replaced(SPDesktop *dt, SPDocument *document);
+static void on_document_uri_set(gchar const *uri, SPDocument *document);
static void on_clicked_get_editable_text(GtkWidget *widget, gpointer data);
-void set_tree_document(Document *document)
+void set_tree_document(SPDocument *document)
{
if (document == current_document) {
return;
blocked--;
}
-static void on_document_replaced(SPDesktop *dt, Document *doc)
+static void on_document_replaced(SPDesktop *dt, SPDocument *doc)
{
if (current_desktop)
sel_changed_connection.disconnect();
set_tree_document(doc);
}
-void on_document_uri_set(gchar const */*uri*/, Document *document)
+void on_document_uri_set(gchar const */*uri*/, SPDocument *document)
{
gchar title[500];
sp_ui_dialog_title_string(Inkscape::Verb::get(SP_VERB_DIALOG_XML_EDITOR), title);
index 90bac605318c08e6ccb72472516e742e6c4a6b72..a92e7cf5bb993f758afd88e609cb3b5b8b211c10 100644 (file)
@@ -190,7 +190,7 @@ attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int
}
}
-CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, Document * in_doc)
+CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument * in_doc)
: CanvasGrid(nv, in_repr, in_doc, GRID_AXONOMETRIC)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
index b4a27c873b02ad841b4c045fa875bbbe5b296891..e36804d7c409d60b125fac8fc99fcc55e17c857b 100644 (file)
class CanvasAxonomGrid : public CanvasGrid {
public:
- CanvasAxonomGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, Document * in_doc);
+ CanvasAxonomGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument * in_doc);
virtual ~CanvasAxonomGrid();
void Update (Geom::Matrix const &affine, unsigned int flags);
index 710074a970c0f6a72f0846da3b35214b59cb4dbf..5037c0375a695e2d093023505a4613cdbe1c27b2 100644 (file)
@@ -155,7 +155,7 @@ grid_canvasitem_update (SPCanvasItem *item, Geom::Matrix const &affine, unsigned
NULL /* order_changed */
};
-CanvasGrid::CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, Document *in_doc, GridType type)
+CanvasGrid::CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument *in_doc, GridType type)
: visible(true), gridtype(type)
{
repr = in_repr;
* writes an <inkscape:grid> child to repr.
*/
void
-CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, Document * doc, GridType gridtype)
+CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, GridType gridtype)
{
if (!repr) return;
if (gridtype > GRID_MAXTYPENR) return;
@@ -262,7 +262,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, Document * doc, GridT
* Creates a new CanvasGrid object of type gridtype
*/
CanvasGrid*
-CanvasGrid::NewGrid(SPNamedView * nv, Inkscape::XML::Node * repr, Document * doc, GridType gridtype)
+CanvasGrid::NewGrid(SPNamedView * nv, Inkscape::XML::Node * repr, SPDocument * doc, GridType gridtype)
{
if (!repr) return NULL;
if (!doc) {
@@ -420,7 +420,7 @@ attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int
}
}
-CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, Document * in_doc)
+CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument * in_doc)
: CanvasGrid(nv, in_repr, in_doc, GRID_RECTANGULAR)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
index 058f88ef8cb6655f33ac2a7556a962ed578ece8f..58cfbf735d63b9a5cdb9a32c9ca987fe02b863fd 100644 (file)
struct SPDesktop;
struct SPNamedView;
-class Document;
+class SPDocument;
namespace Inkscape {
static GridType getGridTypeFromSVGName(const char * typestr);
static GridType getGridTypeFromName(const char * typestr);
- static CanvasGrid* NewGrid(SPNamedView * nv, Inkscape::XML::Node * repr, Document *doc, GridType gridtype);
- static void writeNewGridToRepr(Inkscape::XML::Node * repr, Document * doc, GridType gridtype);
+ static CanvasGrid* NewGrid(SPNamedView * nv, Inkscape::XML::Node * repr, SPDocument *doc, GridType gridtype);
+ static void writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, GridType gridtype);
GridCanvasItem * createCanvasItem(SPDesktop * desktop);
SPUnit const* gridunit;
Inkscape::XML::Node * repr;
- Document *doc;
+ SPDocument *doc;
Inkscape::Snapper* snapper;
bool isEnabled();
protected:
- CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, Document *in_doc, GridType type);
+ CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument *in_doc, GridType type);
virtual Gtk::Widget * newSpecificWidget() = 0;
class CanvasXYGrid : public CanvasGrid {
public:
- CanvasXYGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, Document * in_doc);
+ CanvasXYGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument * in_doc);
virtual ~CanvasXYGrid();
void Update (Geom::Matrix const &affine, unsigned int flags);
index 4430907dab8b98f40a6eeb9cba8aaab66315c6c4..2b799f8d26d3116979f0a47f8ab80179540549d1 100644 (file)
feImageHref = (href) ? g_strdup (href) : NULL;
}
-void FilterImage::set_document(Document *doc){
+void FilterImage::set_document(SPDocument *doc){
document = doc;
}
index 6fbc5d7ebbf0d0048edbe97df420930733681d90..f3565ef9f756899b5455f198f1c236b794434fd7 100644 (file)
virtual int render(FilterSlot &slot, FilterUnits const &units);
virtual FilterTraits get_input_traits();
- void set_document( Document *document );
+ void set_document( SPDocument *document );
void set_href(const gchar *href);
void set_region(SVGLength x, SVGLength y, SVGLength width, SVGLength height);
bool from_element;
SPItem* SVGElem;
private:
- Document *document;
+ SPDocument *document;
gchar *feImageHref;
guint8* image_pixbuf;
Glib::RefPtr<Gdk::Pixbuf> image;
diff --git a/src/document-private.h b/src/document-private.h
index 221cfa17c963f668c2be88af3c23336f413ae1ed..fa4754248f082b84ff2eea883dd0bec593da7977 100644 (file)
--- a/src/document-private.h
+++ b/src/document-private.h
}
-struct DocumentPrivate {
- typedef std::map<GQuark, Document::IDChangedSignal> IDChangedSignalMap;
- typedef std::map<GQuark, Document::ResourcesChangedSignal> ResourcesChangedSignalMap;
+struct SPDocumentPrivate {
+ typedef std::map<GQuark, SPDocument::IDChangedSignal> IDChangedSignalMap;
+ typedef std::map<GQuark, SPDocument::ResourcesChangedSignal> ResourcesChangedSignalMap;
GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */
GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */
GHashTable *resources;
ResourcesChangedSignalMap resources_changed_signals;
- Document::ModifiedSignal modified_signal;
- Document::URISetSignal uri_set_signal;
- Document::ResizedSignal resized_signal;
- Document::ReconstructionStart _reconstruction_start_signal;
- Document::ReconstructionFinish _reconstruction_finish_signal;
- Document::CommitSignal commit_signal;
+ SPDocument::ModifiedSignal modified_signal;
+ SPDocument::URISetSignal uri_set_signal;
+ SPDocument::ResizedSignal resized_signal;
+ SPDocument::ReconstructionStart _reconstruction_start_signal;
+ SPDocument::ReconstructionFinish _reconstruction_finish_signal;
+ SPDocument::CommitSignal commit_signal;
/* Undo/Redo state */
bool sensitive: true; /* If we save actions to undo stack */
diff --git a/src/document-subset.h b/src/document-subset.h
index b7b724162b8ef9ddf77c57cf55b046074b395a7f..e424a289c5ce048829b7b80a36d7c01f1d1611ff 100644 (file)
--- a/src/document-subset.h
+++ b/src/document-subset.h
#include "gc-anchored.h"
class SPObject;
-class Document;
+class SPDocument;
namespace Inkscape {
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index 9dbf5db25b915b127987f2c640ef3e81ab74106f..ae1c82e71f4e4d2e02b4ab2e6e480599ac26096f 100644 (file)
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
* stack. Two methods exist to indicate that the given action is completed:
*
* \verbatim
- void sp_document_done (Document *document);
- void sp_document_maybe_done (Document *document, const unsigned char *key) \endverbatim
+ void sp_document_done (SPDocument *document);
+ void sp_document_maybe_done (SPDocument *document, const unsigned char *key) \endverbatim
*
* Both move the recent action list into the undo stack and clear the
* list afterwards. While the first method does an unconditional push,
sp_document_set_undo_sensitive(document, saved); \endverbatim
*/
void
-sp_document_set_undo_sensitive (Document *doc, bool sensitive)
+sp_document_set_undo_sensitive (SPDocument *doc, bool sensitive)
{
g_assert (doc != NULL);
g_assert (doc->priv != NULL);
* the saved bools in a stack. Perhaps this is why the above solution is better.
*/
-bool sp_document_get_undo_sensitive(Document const *document) {
+bool sp_document_get_undo_sensitive(SPDocument const *document) {
g_assert(document != NULL);
g_assert(document->priv != NULL);
}
void
-sp_document_done (Document *doc, const unsigned int event_type, Glib::ustring event_description)
+sp_document_done (SPDocument *doc, const unsigned int event_type, Glib::ustring event_description)
{
sp_document_maybe_done (doc, NULL, event_type, event_description);
}
@@ -128,7 +128,7 @@ sp_document_done (Document *doc, const unsigned int event_type, Glib::ustring ev
void
sp_document_reset_key (Inkscape::Application */*inkscape*/, SPDesktop */*desktop*/, GtkObject *base)
{
- Document *doc = (Document *) base;
+ SPDocument *doc = (SPDocument *) base;
doc->actionkey = NULL;
}
class CommitEvent : public InteractionEvent {
public:
- CommitEvent(Document *doc, const gchar *key, const unsigned int type)
+ CommitEvent(SPDocument *doc, const gchar *key, const unsigned int type)
: InteractionEvent(share_static_string("commit"))
{
_addProperty(share_static_string("timestamp"), timestamp());
}
void
-sp_document_maybe_done (Document *doc, const gchar *key, const unsigned int event_type,
+sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int event_type,
Glib::ustring event_description)
{
g_assert (doc != NULL);
@@ -209,7 +209,7 @@ sp_document_maybe_done (Document *doc, const gchar *key, const unsigned int even
}
void
-sp_document_cancel (Document *doc)
+sp_document_cancel (SPDocument *doc)
{
g_assert (doc != NULL);
g_assert (doc->priv != NULL);
sp_repr_begin_transaction (doc->rdoc);
}
-static void finish_incomplete_transaction(Document &doc) {
- DocumentPrivate &priv=*doc.priv;
+static void finish_incomplete_transaction(SPDocument &doc) {
+ SPDocumentPrivate &priv=*doc.priv;
Inkscape::XML::Event *log=sp_repr_commit_undoable(doc.rdoc);
if (log || priv.partial) {
g_warning ("Incomplete undo transaction:");
}
gboolean
-sp_document_undo (Document *doc)
+sp_document_undo (SPDocument *doc)
{
using Inkscape::Debug::EventTracker;
using Inkscape::Debug::SimpleEvent;
}
gboolean
-sp_document_redo (Document *doc)
+sp_document_redo (SPDocument *doc)
{
using Inkscape::Debug::EventTracker;
using Inkscape::Debug::SimpleEvent;
}
void
-sp_document_clear_undo (Document *doc)
+sp_document_clear_undo (SPDocument *doc)
{
if (doc->priv->undo)
doc->priv->undoStackObservers.notifyClearUndoEvent();
}
void
-sp_document_clear_redo (Document *doc)
+sp_document_clear_redo (SPDocument *doc)
{
if (doc->priv->redo)
doc->priv->undoStackObservers.notifyClearRedoEvent();
diff --git a/src/document.cpp b/src/document.cpp
index 4289205c121b45d9223c75a4d728983a6e975165..288e52c6d88844244245381ac56986638d40d7e9 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
-#define __DOCUMENT_C__
+#define __SP_DOCUMENT_C__
/** \file
- * Document manipulation
+ * SPDocument manipulation
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-/** \class Document
- * Document serves as the container of both model trees (agnostic XML
+/** \class SPDocument
+ * SPDocument serves as the container of both model trees (agnostic XML
* and typed object tree), and implements all of the document-level
* functionality used by the program. Many document level operations, like
- * load, save, print, export and so on, use Document as their basic datatype.
+ * load, save, print, export and so on, use SPDocument as their basic datatype.
*
- * Document implements undo and redo stacks and an id-based object
+ * SPDocument implements undo and redo stacks and an id-based object
* dictionary. Thanks to unique id attributes, the latter can be used to
* map from the XML tree back to the object tree.
*
- * Document performs the basic operations needed for asynchronous
+ * SPDocument performs the basic operations needed for asynchronous
* update notification (SPObject ::modified virtual method), and implements
* the 'modified' signal, as well.
*/
static unsigned long next_serial = 0;
-Document::Document() :
+SPDocument::SPDocument() :
keepalive(FALSE),
virgin(TRUE),
modified_since_save(FALSE),
// Don't use the Consolidate moves optimisation.
router->ConsolidateMoves = false;
- DocumentPrivate *p = new DocumentPrivate();
+ SPDocumentPrivate *p = new SPDocumentPrivate();
p->serial = next_serial++;
priv->undoStackObservers.add(p->console_output_undo_observer);
}
-Document::~Document() {
+SPDocument::~SPDocument() {
collectOrphans();
// kill/unhook this first
}
-void Document::add_persp3d (Persp3D * const /*persp*/)
+void SPDocument::add_persp3d (Persp3D * const /*persp*/)
{
SPDefs *defs = SP_ROOT(this->root)->defs;
for (SPObject *i = sp_object_first_child(SP_OBJECT(defs)); i != NULL; i = SP_OBJECT_NEXT(i) ) {
persp3d_create_xml_element (this);
}
-void Document::remove_persp3d (Persp3D * const /*persp*/)
+void SPDocument::remove_persp3d (Persp3D * const /*persp*/)
{
// TODO: Delete the repr, maybe perform a check if any boxes are still linked to the perspective.
// Anything else?
g_print ("Please implement deletion of perspectives here.\n");
}
-unsigned long Document::serial() const {
+unsigned long SPDocument::serial() const {
return priv->serial;
}
-void Document::queueForOrphanCollection(SPObject *object) {
+void SPDocument::queueForOrphanCollection(SPObject *object) {
g_return_if_fail(object != NULL);
g_return_if_fail(SP_OBJECT_DOCUMENT(object) == this);
_collection_queue = g_slist_prepend(_collection_queue, object);
}
-void Document::collectOrphans() {
+void SPDocument::collectOrphans() {
while (_collection_queue) {
GSList *objects=_collection_queue;
_collection_queue = NULL;
}
}
-void Document::reset_key (void */*dummy*/)
+void SPDocument::reset_key (void */*dummy*/)
{
actionkey = NULL;
}
-Document *
+SPDocument *
sp_document_create(Inkscape::XML::Document *rdoc,
gchar const *uri,
gchar const *base,
gchar const *name,
unsigned int keepalive)
{
- Document *document;
+ SPDocument *document;
Inkscape::XML::Node *rroot;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
rroot = rdoc->root();
- document = new Document();
+ document = new SPDocument();
document->keepalive = keepalive;
G_CALLBACK(sp_document_reset_key), document);
document->oldSignalsConnected = true;
} else {
- document->_selection_changed_connection = Inkscape::NSApplication::Editor::connectSelectionChanged (sigc::mem_fun (*document, &Document::reset_key));
- document->_desktop_activated_connection = Inkscape::NSApplication::Editor::connectDesktopActivated (sigc::mem_fun (*document, &Document::reset_key));
+ document->_selection_changed_connection = Inkscape::NSApplication::Editor::connectSelectionChanged (sigc::mem_fun (*document, &SPDocument::reset_key));
+ document->_desktop_activated_connection = Inkscape::NSApplication::Editor::connectDesktopActivated (sigc::mem_fun (*document, &SPDocument::reset_key));
document->oldSignalsConnected = false;
}
* Fetches document from URI, or creates new, if NULL; public document
* appears in document list.
*/
-Document *
+SPDocument *
sp_document_new(gchar const *uri, unsigned int keepalive, bool make_new)
{
- Document *doc;
+ SPDocument *doc;
Inkscape::XML::Document *rdoc;
gchar *base = NULL;
gchar *name = NULL;
return doc;
}
-Document *
+SPDocument *
sp_document_new_from_mem(gchar const *buffer, gint length, unsigned int keepalive)
{
- Document *doc;
+ SPDocument *doc;
Inkscape::XML::Document *rdoc;
Inkscape::XML::Node *rroot;
gchar *name;
@@ -477,23 +477,23 @@ sp_document_new_from_mem(gchar const *buffer, gint length, unsigned int keepaliv
return doc;
}
-Document *
-sp_document_ref(Document *doc)
+SPDocument *
+sp_document_ref(SPDocument *doc)
{
g_return_val_if_fail(doc != NULL, NULL);
Inkscape::GC::anchor(doc);
return doc;
}
-Document *
-sp_document_unref(Document *doc)
+SPDocument *
+sp_document_unref(SPDocument *doc)
{
g_return_val_if_fail(doc != NULL, NULL);
Inkscape::GC::release(doc);
return NULL;
}
-gdouble sp_document_width(Document *document)
+gdouble sp_document_width(SPDocument *document)
{
g_return_val_if_fail(document != NULL, 0.0);
g_return_val_if_fail(document->priv != NULL, 0.0);
}
void
-sp_document_set_width (Document *document, gdouble width, const SPUnit *unit)
+sp_document_set_width (SPDocument *document, gdouble width, const SPUnit *unit)
{
SPRoot *root = SP_ROOT(document->root);
SP_OBJECT (root)->updateRepr();
}
-void sp_document_set_height (Document * document, gdouble height, const SPUnit *unit)
+void sp_document_set_height (SPDocument * document, gdouble height, const SPUnit *unit)
{
SPRoot *root = SP_ROOT(document->root);
@@ -559,7 +559,7 @@ void sp_document_set_height (Document * document, gdouble height, const SPUnit *
SP_OBJECT (root)->updateRepr();
}
-gdouble sp_document_height(Document *document)
+gdouble sp_document_height(SPDocument *document)
{
g_return_val_if_fail(document != NULL, 0.0);
g_return_val_if_fail(document->priv != NULL, 0.0);
return root->height.computed;
}
-Geom::Point sp_document_dimensions(Document *doc)
+Geom::Point sp_document_dimensions(SPDocument *doc)
{
return Geom::Point(sp_document_width(doc), sp_document_height(doc));
}
* this function fits the canvas to that rect by resizing the canvas
* and translating the document root into position.
*/
-void Document::fitToRect(Geom::Rect const &rect)
+void SPDocument::fitToRect(Geom::Rect const &rect)
{
double const w = rect.width();
double const h = rect.height();
}
static void
-do_change_uri(Document *const document, gchar const *const filename, bool const rebase)
+do_change_uri(SPDocument *const document, gchar const *const filename, bool const rebase)
{
g_return_if_fail(document != NULL);
sp_document_set_undo_sensitive(document, false);
if (rebase) {
- Inkscape::XML::rebase_hrefs((Inkscape::XML::Document *)document, new_base, true);
+ Inkscape::XML::rebase_hrefs(document, new_base, true);
}
repr->setAttribute("sodipodi:docname", document->name);
*
* \see sp_document_change_uri_and_hrefs
*/
-void sp_document_set_uri(Document *document, gchar const *filename)
+void sp_document_set_uri(SPDocument *document, gchar const *filename)
{
g_return_if_fail(document != NULL);
*
* \see sp_document_set_uri
*/
-void sp_document_change_uri_and_hrefs(Document *document, gchar const *filename)
+void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *filename)
{
g_return_if_fail(document != NULL);
@@ -683,36 +683,36 @@ void sp_document_change_uri_and_hrefs(Document *document, gchar const *filename)
}
void
-sp_document_resized_signal_emit(Document *doc, gdouble width, gdouble height)
+sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height)
{
g_return_if_fail(doc != NULL);
doc->priv->resized_signal.emit(width, height);
}
-sigc::connection Document::connectModified(Document::ModifiedSignal::slot_type slot)
+sigc::connection SPDocument::connectModified(SPDocument::ModifiedSignal::slot_type slot)
{
return priv->modified_signal.connect(slot);
}
-sigc::connection Document::connectURISet(Document::URISetSignal::slot_type slot)
+sigc::connection SPDocument::connectURISet(SPDocument::URISetSignal::slot_type slot)
{
return priv->uri_set_signal.connect(slot);
}
-sigc::connection Document::connectResized(Document::ResizedSignal::slot_type slot)
+sigc::connection SPDocument::connectResized(SPDocument::ResizedSignal::slot_type slot)
{
return priv->resized_signal.connect(slot);
}
sigc::connection
-Document::connectReconstructionStart(Document::ReconstructionStart::slot_type slot)
+SPDocument::connectReconstructionStart(SPDocument::ReconstructionStart::slot_type slot)
{
return priv->_reconstruction_start_signal.connect(slot);
}
void
-Document::emitReconstructionStart(void)
+SPDocument::emitReconstructionStart(void)
{
// printf("Starting Reconstruction\n");
priv->_reconstruction_start_signal.emit();
}
sigc::connection
-Document::connectReconstructionFinish(Document::ReconstructionFinish::slot_type slot)
+SPDocument::connectReconstructionFinish(SPDocument::ReconstructionFinish::slot_type slot)
{
return priv->_reconstruction_finish_signal.connect(slot);
}
void
-Document::emitReconstructionFinish(void)
+SPDocument::emitReconstructionFinish(void)
{
// printf("Finishing Reconstruction\n");
priv->_reconstruction_finish_signal.emit();
return;
}
-sigc::connection Document::connectCommit(Document::CommitSignal::slot_type slot)
+sigc::connection SPDocument::connectCommit(SPDocument::CommitSignal::slot_type slot)
{
return priv->commit_signal.connect(slot);
}
-void Document::_emitModified() {
+void SPDocument::_emitModified() {
static guint const flags = SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG | SP_OBJECT_PARENT_MODIFIED_FLAG;
root->emitModified(0);
priv->modified_signal.emit(flags);
}
-void Document::bindObjectToId(gchar const *id, SPObject *object) {
+void SPDocument::bindObjectToId(gchar const *id, SPObject *object) {
GQuark idq = g_quark_from_string(id);
if (object) {
g_hash_table_remove(priv->iddef, GINT_TO_POINTER(idq));
}
- DocumentPrivate::IDChangedSignalMap::iterator pos;
+ SPDocumentPrivate::IDChangedSignalMap::iterator pos;
pos = priv->id_changed_signals.find(idq);
if ( pos != priv->id_changed_signals.end() ) {
}
void
-Document::addUndoObserver(Inkscape::UndoStackObserver& observer)
+SPDocument::addUndoObserver(Inkscape::UndoStackObserver& observer)
{
this->priv->undoStackObservers.add(observer);
}
void
-Document::removeUndoObserver(Inkscape::UndoStackObserver& observer)
+SPDocument::removeUndoObserver(Inkscape::UndoStackObserver& observer)
{
this->priv->undoStackObservers.remove(observer);
}
-SPObject *Document::getObjectById(gchar const *id) {
+SPObject *SPDocument::getObjectById(gchar const *id) {
g_return_val_if_fail(id != NULL, NULL);
GQuark idq = g_quark_from_string(id);
return (SPObject*)g_hash_table_lookup(priv->iddef, GINT_TO_POINTER(idq));
}
-sigc::connection Document::connectIdChanged(gchar const *id,
- Document::IDChangedSignal::slot_type slot)
+sigc::connection SPDocument::connectIdChanged(gchar const *id,
+ SPDocument::IDChangedSignal::slot_type slot)
{
return priv->id_changed_signals[g_quark_from_string(id)].connect(slot);
}
-void Document::bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object) {
+void SPDocument::bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object) {
if (object) {
g_assert(g_hash_table_lookup(priv->reprdef, repr) == NULL);
g_hash_table_insert(priv->reprdef, repr, object);
@@ -804,12 +804,12 @@ void Document::bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object) {
}
}
-SPObject *Document::getObjectByRepr(Inkscape::XML::Node *repr) {
+SPObject *SPDocument::getObjectByRepr(Inkscape::XML::Node *repr) {
g_return_val_if_fail(repr != NULL, NULL);
return (SPObject*)g_hash_table_lookup(priv->reprdef, repr);
}
-Glib::ustring Document::getLanguage() {
+Glib::ustring SPDocument::getLanguage() {
gchar const *document_language = rdf_get_work_entity(this, rdf_find_entity("language"));
if (document_language) {
while (isspace(*document_language))
/* Object modification root handler */
void
-sp_document_request_modified(Document *doc)
+sp_document_request_modified(SPDocument *doc)
{
if (!doc->modified_id) {
doc->modified_id = gtk_idle_add_priority(SP_DOCUMENT_UPDATE_PRIORITY, sp_document_idle_handler, doc);
}
void
-sp_document_setup_viewport (Document *doc, SPItemCtx *ctx)
+sp_document_setup_viewport (SPDocument *doc, SPItemCtx *ctx)
{
ctx->ctx.flags = 0;
ctx->i2doc = Geom::identity();
* been brought fully up to date.
*/
bool
-Document::_updateDocument()
+SPDocument::_updateDocument()
{
/* Process updates */
if (this->root->uflags || this->root->mflags) {
* since this typically indicates we're stuck in an update loop.
*/
gint
-sp_document_ensure_up_to_date(Document *doc)
+sp_document_ensure_up_to_date(SPDocument *doc)
{
int counter = 32;
while (!doc->_updateDocument()) {
static gint
sp_document_idle_handler(gpointer data)
{
- Document *doc = static_cast<Document *>(data);
+ SPDocument *doc = static_cast<SPDocument *>(data);
if (doc->_updateDocument()) {
doc->modified_id = 0;
return false;
*
*/
-GSList *sp_document_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box)
+GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box)
{
g_return_val_if_fail(document != NULL, NULL);
g_return_val_if_fail(document->priv != NULL, NULL);
@@ -1121,7 +1121,7 @@ GSList *sp_document_items_in_box(Document *document, unsigned int dkey, Geom::Re
*
*/
-GSList *sp_document_partial_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box)
+GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box)
{
g_return_val_if_fail(document != NULL, NULL);
g_return_val_if_fail(document->priv != NULL, NULL);
@@ -1130,7 +1130,7 @@ GSList *sp_document_partial_items_in_box(Document *document, unsigned int dkey,
}
GSList *
-sp_document_items_at_points(Document *document, unsigned const key, std::vector<Geom::Point> points)
+sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector<Geom::Point> points)
{
GSList *items = NULL;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -1155,7 +1155,7 @@ sp_document_items_at_points(Document *document, unsigned const key, std::vector<
}
SPItem *
-sp_document_item_at_point(Document *document, unsigned const key, Geom::Point const p,
+sp_document_item_at_point(SPDocument *document, unsigned const key, Geom::Point const p,
gboolean const into_groups, SPItem *upto)
{
g_return_val_if_fail(document != NULL, NULL);
@@ -1165,7 +1165,7 @@ sp_document_item_at_point(Document *document, unsigned const key, Geom::Point co
}
SPItem*
-sp_document_group_at_point(Document *document, unsigned int key, Geom::Point const p)
+sp_document_group_at_point(SPDocument *document, unsigned int key, Geom::Point const p)
{
g_return_val_if_fail(document != NULL, NULL);
g_return_val_if_fail(document->priv != NULL, NULL);
@@ -1177,7 +1177,7 @@ sp_document_group_at_point(Document *document, unsigned int key, Geom::Point con
/* Resource management */
gboolean
-sp_document_add_resource(Document *document, gchar const *key, SPObject *object)
+sp_document_add_resource(SPDocument *document, gchar const *key, SPObject *object)
{
GSList *rlist;
GQuark q = g_quark_from_string(key);
@@ -1202,7 +1202,7 @@ sp_document_add_resource(Document *document, gchar const *key, SPObject *object)
}
gboolean
-sp_document_remove_resource(Document *document, gchar const *key, SPObject *object)
+sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *object)
{
GSList *rlist;
GQuark q = g_quark_from_string(key);
@@ -1228,7 +1228,7 @@ sp_document_remove_resource(Document *document, gchar const *key, SPObject *obje
}
GSList const *
-sp_document_get_resource_list(Document *document, gchar const *key)
+sp_document_get_resource_list(SPDocument *document, gchar const *key)
{
g_return_val_if_fail(document != NULL, NULL);
g_return_val_if_fail(key != NULL, NULL);
return (GSList*)g_hash_table_lookup(document->priv->resources, key);
}
-sigc::connection sp_document_resources_changed_connect(Document *document,
+sigc::connection sp_document_resources_changed_connect(SPDocument *document,
gchar const *key,
- Document::ResourcesChangedSignal::slot_type slot)
+ SPDocument::ResourcesChangedSignal::slot_type slot)
{
GQuark q = g_quark_from_string(key);
return document->priv->resources_changed_signals[q].connect(slot);
}
unsigned int
-objects_in_document(Document *document)
+objects_in_document(SPDocument *document)
{
return count_objects_recursive(SP_DOCUMENT_ROOT(document), 0);
}
}
unsigned int
-vacuum_document(Document *document)
+vacuum_document(SPDocument *document)
{
unsigned int start = objects_in_document(document);
unsigned int end;
return start - newend;
}
-bool Document::isSeeking() const {
+bool SPDocument::isSeeking() const {
return priv->seeking;
}
diff --git a/src/document.h b/src/document.h
index cb83c4d0d811f79efeaca03672aa8aaacd7a33e3..696e568ad419e01465564e308928197278068ecf 100644 (file)
--- a/src/document.h
+++ b/src/document.h
-#ifndef __DOCUMENT_H__
-#define __DOCUMENT_H__
+#ifndef __SP_DOCUMENT_H__
+#define __SP_DOCUMENT_H__
/** \file
- * Document: Typed SVG document implementation
+ * SPDocument: Typed SVG document implementation
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
#include <vector>
#include <set>
-#include "xml/document.h"
-
namespace Avoid {
class Router;
}
class TransfMat3x4;
}
-class DocumentPrivate;
+class SPDocumentPrivate;
/// Typed SVG document implementation.
-class Document : public Inkscape::GC::Managed<>,
+struct SPDocument : public Inkscape::GC::Managed<>,
public Inkscape::GC::Finalized,
public Inkscape::GC::Anchored
{
-public:
typedef sigc::signal<void, SPObject *> IDChangedSignal;
typedef sigc::signal<void> ResourcesChangedSignal;
typedef sigc::signal<void, guint> ModifiedSignal;
typedef sigc::signal<void> ReconstructionFinish;
typedef sigc::signal<void> CommitSignal;
- Document();
- virtual ~Document();
+ SPDocument();
+ virtual ~SPDocument();
unsigned int keepalive : 1;
unsigned int virgin : 1; ///< Has the document never been touched?
unsigned int modified_since_save : 1;
- Inkscape::XML::DocumentTree *rdoc; ///< Our Inkscape::XML::Document
+ Inkscape::XML::Document *rdoc; ///< Our Inkscape::XML::Document
Inkscape::XML::Node *rroot; ///< Root element of Inkscape::XML::Document
SPObject *root; ///< Our SPRoot
CRCascade *style_cascade;
gchar *base; ///< To be used for resolving relative hrefs.
gchar *name; ///< basename(uri) or other human-readable label for the document.
- DocumentPrivate *priv;
+ SPDocumentPrivate *priv;
/// Last action key
const gchar *actionkey;
}
private:
- Document(Document const &); // no copy
- void operator=(Document const &); // no assign
+ SPDocument(SPDocument const &); // no copy
+ void operator=(SPDocument const &); // no assign
public:
sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot);
void fitToRect(Geom::Rect const &rect);
};
-Document *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false);
-Document *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive);
+SPDocument *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false);
+SPDocument *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive);
-Document *sp_document_ref(Document *doc);
-Document *sp_document_unref(Document *doc);
+SPDocument *sp_document_ref(SPDocument *doc);
+SPDocument *sp_document_unref(SPDocument *doc);
-Document *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive);
+SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive);
/*
* Access methods
@@ -186,14 +183,14 @@ Document *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gc
#define sp_document_root(d) (d->root)
#define SP_DOCUMENT_ROOT(d) (d->root)
-gdouble sp_document_width(Document *document);
-gdouble sp_document_height(Document *document);
-Geom::Point sp_document_dimensions(Document *document);
+gdouble sp_document_width(SPDocument *document);
+gdouble sp_document_height(SPDocument *document);
+Geom::Point sp_document_dimensions(SPDocument *document);
struct SPUnit;
-void sp_document_set_width(Document *document, gdouble width, const SPUnit *unit);
-void sp_document_set_height(Document *document, gdouble height, const SPUnit *unit);
+void sp_document_set_width(SPDocument *document, gdouble width, const SPUnit *unit);
+void sp_document_set_height(SPDocument *document, gdouble height, const SPUnit *unit);
#define SP_DOCUMENT_URI(d) (d->uri)
#define SP_DOCUMENT_NAME(d) (d->name)
@@ -207,39 +204,39 @@ void sp_document_set_height(Document *document, gdouble height, const SPUnit *un
* Undo & redo
*/
-void sp_document_set_undo_sensitive(Document *document, bool sensitive);
-bool sp_document_get_undo_sensitive(Document const *document);
+void sp_document_set_undo_sensitive(SPDocument *document, bool sensitive);
+bool sp_document_get_undo_sensitive(SPDocument const *document);
-void sp_document_clear_undo(Document *document);
-void sp_document_clear_redo(Document *document);
+void sp_document_clear_undo(SPDocument *document);
+void sp_document_clear_redo(SPDocument *document);
-void sp_document_child_added(Document *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
-void sp_document_child_removed(Document *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
-void sp_document_attr_changed(Document *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval);
-void sp_document_content_changed(Document *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent);
-void sp_document_order_changed(Document *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref);
+void sp_document_child_added(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
+void sp_document_child_removed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
+void sp_document_attr_changed(SPDocument *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval);
+void sp_document_content_changed(SPDocument *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent);
+void sp_document_order_changed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref);
/* Object modification root handler */
-void sp_document_request_modified(Document *doc);
-gint sp_document_ensure_up_to_date(Document *doc);
+void sp_document_request_modified(SPDocument *doc);
+gint sp_document_ensure_up_to_date(SPDocument *doc);
/* Save all previous actions to stack, as one undo step */
-void sp_document_done(Document *document, unsigned int event_type, Glib::ustring event_description);
-void sp_document_maybe_done(Document *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description);
+void sp_document_done(SPDocument *document, unsigned int event_type, Glib::ustring event_description);
+void sp_document_maybe_done(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description);
void sp_document_reset_key(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
/* Cancel (and revert) current unsaved actions */
-void sp_document_cancel(Document *document);
+void sp_document_cancel(SPDocument *document);
/* Undo and redo */
-gboolean sp_document_undo(Document *document);
-gboolean sp_document_redo(Document *document);
+gboolean sp_document_undo(SPDocument *document);
+gboolean sp_document_redo(SPDocument *document);
/* Resource management */
-gboolean sp_document_add_resource(Document *document, const gchar *key, SPObject *object);
-gboolean sp_document_remove_resource(Document *document, const gchar *key, SPObject *object);
-const GSList *sp_document_get_resource_list(Document *document, const gchar *key);
-sigc::connection sp_document_resources_changed_connect(Document *document, const gchar *key, Document::ResourcesChangedSignal::slot_type slot);
+gboolean sp_document_add_resource(SPDocument *document, const gchar *key, SPObject *object);
+gboolean sp_document_remove_resource(SPDocument *document, const gchar *key, SPObject *object);
+const GSList *sp_document_get_resource_list(SPDocument *document, const gchar *key);
+sigc::connection sp_document_resources_changed_connect(SPDocument *document, const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot);
/*
@@ -260,19 +257,19 @@ sigc::connection sp_document_resources_changed_connect(Document *document, const
* Misc
*/
-GSList *sp_document_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box);
-GSList *sp_document_partial_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box);
+GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box);
+GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box);
SPItem *sp_document_item_from_list_at_point_bottom(unsigned int dkey, SPGroup *group, const GSList *list, Geom::Point const p, bool take_insensitive = false);
-SPItem *sp_document_item_at_point (Document *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL);
-GSList *sp_document_items_at_points(Document *document, unsigned const key, std::vector<Geom::Point> points);
-SPItem *sp_document_group_at_point (Document *document, unsigned int key, Geom::Point const p);
+SPItem *sp_document_item_at_point (SPDocument *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL);
+GSList *sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector<Geom::Point> points);
+SPItem *sp_document_group_at_point (SPDocument *document, unsigned int key, Geom::Point const p);
-void sp_document_set_uri(Document *document, gchar const *uri);
-void sp_document_change_uri_and_hrefs(Document *document, gchar const *uri);
+void sp_document_set_uri(SPDocument *document, gchar const *uri);
+void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *uri);
-void sp_document_resized_signal_emit(Document *doc, gdouble width, gdouble height);
+void sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height);
-unsigned int vacuum_document(Document *document);
+unsigned int vacuum_document(SPDocument *document);
#endif
diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp
index 47ef14987d6f8f4d7ab27b29ec08ce04ab6683c1..fd8f4bb1a2e5c1abccb75c56bd1856a1d45ecd41 100644 (file)
--- a/src/doxygen-main.cpp
+++ b/src/doxygen-main.cpp
* - SPSVGView [\ref svg-view.cpp, \ref svg-view.h]
*
* SPDesktopWidget [\ref desktop-widget.h] SPSVGSPViewWidget [\ref svg-view.cpp]
- * Document [\ref document.cpp, \ref document.h]
+ * SPDocument [\ref document.cpp, \ref document.h]
*
* SPDrawAnchor [\ref draw-anchor.cpp, \ref draw-anchor.h]
* SPKnot [\ref knot.cpp, \ref knot.h, \ref knot-enums.h]
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 89c2c454e7b7e44f4e273f0e575133365ede4925..d2794f0c2b6f1eed9e7444f01df145d15eb004a7 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
-#define __DRAW_CONTEXT_C__
+#define __SP_DRAW_CONTEXT_C__
/*
* Generic drawing context
: SP_EVENT_CONTEXT_DESKTOP(dc)->dt2doc() );
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
if ( c && !c->is_empty() ) {
diff --git a/src/event-log.cpp b/src/event-log.cpp
index d111c43e16725aa557a878f432a37fc527d3c339..82de44696b7b8b29356fac0fce0d0b22d8a6a219 100644 (file)
--- a/src/event-log.cpp
+++ b/src/event-log.cpp
namespace Inkscape {
-EventLog::EventLog(Document* document) :
+EventLog::EventLog(SPDocument* document) :
UndoStackObserver(),
_connected (false),
_document (document),
diff --git a/src/event-log.h b/src/event-log.h
index bb17a19a45bd6105626ef96575456544b8693891..9fcd01e1c7a2b9c45e4d688a3dcd99e9bd237e70 100644 (file)
--- a/src/event-log.h
+++ b/src/event-log.h
typedef Gtk::TreeModel::iterator iterator;
typedef Gtk::TreeModel::const_iterator const_iterator;
- EventLog(Document* document);
+ EventLog(SPDocument* document);
virtual ~EventLog();
/**
private:
bool _connected; //< connected with dialog
- Document *_document; //< document that is logged
+ SPDocument *_document; //< document that is logged
const EventModelColumns _columns;
index c6b731a848486a46480e65c425efbca9c4761933..afc0668a9eb967eff6dbe7429b2281903a4198b6 100644 (file)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
Effect::EffectVerb::perform( SPAction *action, void * data, void */*pdata*/ )
{
Inkscape::UI::View::View * current_view = sp_action_get_view(action);
-// Document * current_document = current_view->doc;
+// SPDocument * current_document = current_view->doc;
Effect::EffectVerb * ev = reinterpret_cast<Effect::EffectVerb *>(data);
Effect * effect = ev->_effect;
diff --git a/src/extension/effect.h b/src/extension/effect.h
index 637d29c5c3de639b4d7ed2754b8ad43ac5fb2eab..c02ce542b09e7d4de1c3366ad1a6edb3a52bedb6 100644 (file)
--- a/src/extension/effect.h
+++ b/src/extension/effect.h
#include "prefdialog.h"
#include "extension.h"
-struct Document;
+struct SPDocument;
namespace Inkscape {
namespace UI {
index a87cc6b6436e452a61b4bfe83962108bdd2f8145..4a13890d78c4137b8c5aa6dd9e2662d4d5299ded 100644 (file)
void
ExecutionEnv::reselect (void) {
if (_doc == NULL) { return; }
- Document * doc = _doc->doc();
+ SPDocument * doc = _doc->doc();
if (doc == NULL) { return; }
SPDesktop *desktop = (SPDesktop *)_doc;
index c8dc30d8bc1766977b4c6f825a60caf106b08aa9..52d5f5148b540e3915a1bf1f5354ca2764dad108 100644 (file)
found parameter.
*/
const gchar *
-Extension::get_param_string (const gchar * name, const Document * doc, const Inkscape::XML::Node * node)
+Extension::get_param_string (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node)
{
Parameter * param;
@@ -432,7 +432,7 @@ Extension::get_param_string (const gchar * name, const Document * doc, const Ink
}
const gchar *
-Extension::get_param_enum (const gchar * name, const Document * doc, const Inkscape::XML::Node * node)
+Extension::get_param_enum (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node)
{
Parameter* param = param_shared(name, parameters);
return param->get_enum(doc, node);
@@ -450,7 +450,7 @@ Extension::get_param_enum (const gchar * name, const Document * doc, const Inksc
found parameter.
*/
bool
-Extension::get_param_bool (const gchar * name, const Document * doc, const Inkscape::XML::Node * node)
+Extension::get_param_bool (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node)
{
Parameter * param;
@@ -470,7 +470,7 @@ Extension::get_param_bool (const gchar * name, const Document * doc, const Inksc
found parameter.
*/
int
-Extension::get_param_int (const gchar * name, const Document * doc, const Inkscape::XML::Node * node)
+Extension::get_param_int (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node)
{
Parameter * param;
@@ -490,7 +490,7 @@ Extension::get_param_int (const gchar * name, const Document * doc, const Inksca
found parameter.
*/
float
-Extension::get_param_float (const gchar * name, const Document * doc, const Inkscape::XML::Node * node)
+Extension::get_param_float (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node)
{
Parameter * param;
param = param_shared(name, parameters);
@@ -509,7 +509,7 @@ Extension::get_param_float (const gchar * name, const Document * doc, const Inks
found parameter.
*/
guint32
-Extension::get_param_color (const gchar * name, const Document * doc, const Inkscape::XML::Node * node)
+Extension::get_param_color (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node)
{
Parameter* param = param_shared(name, parameters);
return param->get_color(doc, node);
@@ -528,7 +528,7 @@ Extension::get_param_color (const gchar * name, const Document * doc, const Inks
found parameter.
*/
bool
-Extension::set_param_bool (const gchar * name, bool value, Document * doc, Inkscape::XML::Node * node)
+Extension::set_param_bool (const gchar * name, bool value, SPDocument * doc, Inkscape::XML::Node * node)
{
Parameter * param;
param = param_shared(name, parameters);
@@ -548,7 +548,7 @@ Extension::set_param_bool (const gchar * name, bool value, Document * doc, Inksc
found parameter.
*/
int
-Extension::set_param_int (const gchar * name, int value, Document * doc, Inkscape::XML::Node * node)
+Extension::set_param_int (const gchar * name, int value, SPDocument * doc, Inkscape::XML::Node * node)
{
Parameter * param;
param = param_shared(name, parameters);
@@ -568,7 +568,7 @@ Extension::set_param_int (const gchar * name, int value, Document * doc, Inkscap
found parameter.
*/
float
-Extension::set_param_float (const gchar * name, float value, Document * doc, Inkscape::XML::Node * node)
+Extension::set_param_float (const gchar * name, float value, SPDocument * doc, Inkscape::XML::Node * node)
{
Parameter * param;
param = param_shared(name, parameters);
@@ -588,7 +588,7 @@ Extension::set_param_float (const gchar * name, float value, Document * doc, Ink
found parameter.
*/
const gchar *
-Extension::set_param_string (const gchar * name, const gchar * value, Document * doc, Inkscape::XML::Node * node)
+Extension::set_param_string (const gchar * name, const gchar * value, SPDocument * doc, Inkscape::XML::Node * node)
{
Parameter * param;
param = param_shared(name, parameters);
@@ -608,7 +608,7 @@ Extension::set_param_string (const gchar * name, const gchar * value, Document *
found parameter.
*/
guint32
-Extension::set_param_color (const gchar * name, guint32 color, Document * doc, Inkscape::XML::Node * node)
+Extension::set_param_color (const gchar * name, guint32 color, SPDocument * doc, Inkscape::XML::Node * node)
{
Parameter* param = param_shared(name, parameters);
return param->set_color(color, doc, node);
If all parameters are gui_visible = false NULL is returned as well.
*/
Gtk::Widget *
-Extension::autogui (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+Extension::autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (param_visible_count() == 0) return NULL;
index 8dcd1b39311a62d72c8f0af2f7c5c0a3498b8f23..48ca86cf780871c77fdaef8206aabecb21206ff0 100644 (file)
#define INKSCAPE_EXTENSION_NS_NC "extension"
#define INKSCAPE_EXTENSION_NS "extension:"
-struct Document;
+struct SPDocument;
namespace Inkscape {
namespace Extension {
#endif
public:
bool get_param_bool (const gchar * name,
- const Document * doc = NULL,
+ const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
int get_param_int (const gchar * name,
- const Document * doc = NULL,
+ const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
float get_param_float (const gchar * name,
- const Document * doc = NULL,
+ const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
const gchar * get_param_string (const gchar * name,
- const Document * doc = NULL,
+ const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
guint32 get_param_color (const gchar * name,
- const Document * doc = NULL,
+ const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
const gchar * get_param_enum (const gchar * name,
- const Document * doc = NULL,
+ const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
bool set_param_bool (const gchar * name,
bool value,
- Document * doc = NULL,
+ SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
int set_param_int (const gchar * name,
int value,
- Document * doc = NULL,
+ SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
float set_param_float (const gchar * name,
float value,
- Document * doc = NULL,
+ SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
const gchar * set_param_string (const gchar * name,
const gchar * value,
- Document * doc = NULL,
+ SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
guint32 set_param_color (const gchar * name,
guint32 color,
- Document * doc = NULL,
+ SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
/* Error file handling */
static void error_file_close (void);
public:
- Gtk::Widget * autogui (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal = NULL);
+ Gtk::Widget * autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal = NULL);
void paramListString (std::list <std::string> & retlist);
/* Extension editor dialog stuff */
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index e3421b26d3bf9991a20454a0a74bf405457223ad..6090b72d071a747be60a013d8f4291d9fd389a0d 100644 (file)
return module->autogui(NULL, NULL);
} /* Implementation::prefs_input */
-Document *
+SPDocument *
Implementation::open(Inkscape::Extension::Input */*module*/, gchar const */*filename*/) {
/* throw open_failed(); */
return NULL;
} /* Implementation::prefs_output */
void
-Implementation::save(Inkscape::Extension::Output */*module*/, Document */*doc*/, gchar const */*filename*/) {
+Implementation::save(Inkscape::Extension::Output */*module*/, SPDocument */*doc*/, gchar const */*filename*/) {
/* throw save_fail */
return;
} /* Implementation::save */
Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, ImplementationDocumentCache * docCache) {
if (module->param_visible_count() == 0) return NULL;
- Document * current_document = view->doc();
+ SPDocument * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
GSListConstIterator<SPItem *> selected =
unsigned int
-Implementation::begin(Inkscape::Extension::Print */*module*/, Document */*doc*/)
+Implementation::begin(Inkscape::Extension::Print */*module*/, SPDocument */*doc*/)
{
return 0;
}
diff --git a/src/extension/implementation/implementation.h b/src/extension/implementation/implementation.h
index 9f1894d958face91e2614a4242656c51756726e4..9de70dce76ca536fa9b4e8ecd0caa793bd554425 100644 (file)
virtual Gtk::Widget *prefs_input(Inkscape::Extension::Input *module,
gchar const *filename);
- virtual Document *open(Inkscape::Extension::Input *module,
+ virtual SPDocument *open(Inkscape::Extension::Input *module,
gchar const *filename);
/* ----- Output functions ----- */
/** Find out information about the file. */
virtual Gtk::Widget *prefs_output(Inkscape::Extension::Output *module);
- virtual void save(Inkscape::Extension::Output *module, Document *doc, gchar const *filename);
+ virtual void save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename);
/* ----- Effect functions ----- */
/** Find out information about the file. */
virtual unsigned set_preview(Inkscape::Extension::Print *module);
virtual unsigned begin(Inkscape::Extension::Print *module,
- Document *doc);
+ SPDocument *doc);
virtual unsigned finish(Inkscape::Extension::Print *module);
virtual bool textToPath(Inkscape::Extension::Print *ext);
virtual bool fontEmbedded(Inkscape::Extension::Print * ext);
index d207c1a196838297dfd9cde919210c3e3fe21bb3..e6ce40bc0f517e948d3a5772a1ef940c01b4a0cb 100644 (file)
the incoming filename (so that it's not the temporary filename).
That document is then returned from this function.
*/
-Document *
+SPDocument *
Script::open(Inkscape::Extension::Input *module,
const gchar *filenameArg)
{
int data_read = execute(command, params, lfilename, fileout);
fileout.toFile(tempfilename_out);
- Document * mydoc = NULL;
+ SPDocument * mydoc = NULL;
if (data_read > 10) {
if (helper_extension.size()==0) {
mydoc = Inkscape::Extension::open(
*/
void
Script::save(Inkscape::Extension::Output *module,
- Document *doc,
+ SPDocument *doc,
const gchar *filenameArg)
{
std::list<std::string> params;
pump_events();
- Document * mydoc = NULL;
+ SPDocument * mydoc = NULL;
if (data_read > 10) {
mydoc = Inkscape::Extension::open(
Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG),
index 0769c9a18dfc5fd1c98844b755f5d623212ede3a..8e25fb3517b53a74e249952442650a68c230ee1c 100644 (file)
/**
*
*/
- virtual Document *open(Inkscape::Extension::Input *module,
+ virtual SPDocument *open(Inkscape::Extension::Input *module,
gchar const *filename);
/**
*
*/
virtual void save(Inkscape::Extension::Output *module,
- Document *doc,
+ SPDocument *doc,
gchar const *filename);
/**
index 9eea2dbebba9c894fe8ad532431274bea39d34d6..f34fea64a36a30daaa4f489ec70f20814be59a5c 100644 (file)
return;
}
-Document *
+SPDocument *
XSLT::open(Inkscape::Extension::Input */*module*/, gchar const *filename)
{
xmlDocPtr filein = xmlParseFile(filename);
}
g_free(s);
- Document * doc = sp_document_create(rdoc, filename, base, name, true);
+ SPDocument * doc = sp_document_create(rdoc, filename, base, name, true);
g_free(base); g_free(name);
}
void
-XSLT::save(Inkscape::Extension::Output */*module*/, Document *doc, gchar const *filename)
+XSLT::save(Inkscape::Extension::Output */*module*/, SPDocument *doc, gchar const *filename)
{
/* TODO: Should we assume filename to be in utf8 or to be a raw filename?
* See JavaFXOutput::save for discussion. */
index df9467d9e91f0950266b4cbf3ed8cc8400cf78d2..45befb529045aaf45cb854ef23ed8e8e43567a3f 100644 (file)
bool check(Inkscape::Extension::Extension *module);
- Document *open(Inkscape::Extension::Input *module,
+ SPDocument *open(Inkscape::Extension::Input *module,
gchar const *filename);
- void save(Inkscape::Extension::Output *module, Document *doc, gchar const *filename);
+ void save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename);
};
} /* Inkscape */
index ca5fdc29f326ac3f2270cc0d1ea18c646ff627c9..689c1286f6e96155694f7b13c3868f075e6c976b 100644 (file)
--- a/src/extension/input.cpp
+++ b/src/extension/input.cpp
Adobe Illustrator file can be transparent (not recommended, but
transparent). This is all done with undo being turned off.
*/
-Document *
+SPDocument *
Input::open (const gchar *uri)
{
if (!loaded()) {
}
timer->touch();
- Document *const doc = imp->open(this, uri);
+ SPDocument *const doc = imp->open(this, uri);
if (doc != NULL) {
Inkscape::XML::Node * repr = sp_document_repr_root(doc);
bool saved = sp_document_get_undo_sensitive(doc);
diff --git a/src/extension/input.h b/src/extension/input.h
index d2aac93763da922297b066e10665ed88d6b198e7..55d807ce26ba30d93fe4fd54800de7e28a65614b 100644 (file)
--- a/src/extension/input.h
+++ b/src/extension/input.h
Implementation::Implementation * in_imp);
virtual ~Input (void);
virtual bool check (void);
- Document * open (gchar const *uri);
+ SPDocument * open (gchar const *uri);
gchar * get_mimetype (void);
gchar * get_extension (void);
gchar * get_filetypename (void);
diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp
index 75d53927d21b8277ae9c5624940150234f1c1672..e907612fdaa093098e27d6f361e7976d7aa7a26e 100644 (file)
@@ -221,7 +221,7 @@ ImageMagick::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::Vi
Gtk::Widget *
ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
- Document * current_document = view->doc();
+ SPDocument * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
index d849755b7f3f6b21a842432647941825e671c5bf..c81fdd0298df8286fa35fdc7ff56aa14811e404e 100644 (file)
}
static bool
-png_render_document_to_file(Document *doc, gchar const *filename)
+png_render_document_to_file(SPDocument *doc, gchar const *filename)
{
CairoRenderer *renderer;
CairoRenderContext *ctx;
\param uri Filename to save to (probably will end in .png)
*/
void
-CairoRendererOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
+CairoRendererOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
{
if (!png_render_document_to_file(doc, filename))
throw Inkscape::Extension::Output::save_failed();
index a062ec8dfad4c637a54d0ad36794e12199dfb300..9b9bd6ffe9d5d3f84b9205a62df855bf0c77a707 100644 (file)
public:
bool check(Inkscape::Extension::Extension *module);
void save(Inkscape::Extension::Output *mod,
- Document *doc,
+ SPDocument *doc,
gchar const *filename);
static void init();
};
index d9cac666ce56bb1d652128f40e1685ba83337362..dff89c1ed0595ef9b74bcd85e76ad69ba4ce6762 100644 (file)
}
static bool
-ps_print_document_to_file(Document *doc, gchar const *filename, unsigned int level, bool texttopath, bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas, bool eps = false)
+ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level, bool texttopath, bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas, bool eps = false)
{
sp_document_ensure_up_to_date(doc);
@@ -124,7 +124,7 @@ ps_print_document_to_file(Document *doc, gchar const *filename, unsigned int lev
\param filename Filename to save to (probably will end in .ps)
*/
void
-CairoPsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
+CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
unsigned int ret;
@@ -188,7 +188,7 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const
\param filename Filename to save to (probably will end in .ps)
*/
void
-CairoEpsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
+CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
unsigned int ret;
index 862571f0bb43f4d4dd4ca5894b98602d013b4504..019b6b8101ed9341f3d4d3cb4aa55862aa42b7b5 100644 (file)
public:
bool check(Inkscape::Extension::Extension *module);
void save(Inkscape::Extension::Output *mod,
- Document *doc,
+ SPDocument *doc,
gchar const *filename);
static void init();
bool textToPath(Inkscape::Extension::Print *ext);
public:
bool check(Inkscape::Extension::Extension *module);
void save(Inkscape::Extension::Output *mod,
- Document *doc,
+ SPDocument *doc,
gchar const *uri);
static void init();
bool textToPath(Inkscape::Extension::Print *ext);
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp
index 28cf406f2bd0b2b2de7b8bc0cf88206a8013c116..d1462e52e5e43ae663bd381a351c1aa84650a4e2 100644 (file)
@@ -811,7 +811,7 @@ CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t
cairo_scale(_cr, PT_PER_PX, PT_PER_PX);
} else if (cairo_surface_get_content(_surface) != CAIRO_CONTENT_ALPHA) {
// set background color on non-alpha surfaces
- // TODO: bgcolor should be derived from Document
+ // TODO: bgcolor should be derived from SPDocument
cairo_set_source_rgb(_cr, 1.0, 1.0, 1.0);
cairo_rectangle(_cr, 0, 0, _width, _height);
cairo_fill(_cr);
diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp
index 1e5404c5074aa14360fcd7a16ccb4f4f70791015..b44e83449323711c64434b05789d061639d77fe5 100644 (file)
}
static bool
-pdf_render_document_to_file(Document *doc, gchar const *filename, unsigned int level,
+pdf_render_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level,
bool texttopath, bool filtertobitmap, int resolution,
const gchar * const exportId, bool exportDrawing, bool exportCanvas)
{
@@ -118,7 +118,7 @@ pdf_render_document_to_file(Document *doc, gchar const *filename, unsigned int l
tell the printing system to save to file.
*/
void
-CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
+CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
unsigned int ret;
diff --git a/src/extension/internal/cairo-renderer-pdf-out.h b/src/extension/internal/cairo-renderer-pdf-out.h
index f916eed496d9c1a1c9e16aef097c058bb748d38b..d76ffb4d44bfb76996963014749c659e184dbeb9 100644 (file)
public:
bool check(Inkscape::Extension::Extension *module);
void save(Inkscape::Extension::Output *mod,
- Document *doc,
+ SPDocument *doc,
gchar const *filename);
static void init();
};
index 3414993e5c3112d166c5f3527e1a3fd27b57329d..da88a5eae779307c1b4f98fd985085a7a8bd345e 100644 (file)
Geom::Matrix t = t_on_document * t_item.inverse();
// Do the export
- Document *document = SP_OBJECT(item)->document;
+ SPDocument *document = SP_OBJECT(item)->document;
GSList *items = NULL;
items = g_slist_append(items, item);
}
bool
-CairoRenderer::setupDocument(CairoRenderContext *ctx, Document *doc, bool pageBoundingBox, SPItem *base)
+CairoRenderer::setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool pageBoundingBox, SPItem *base)
{
g_assert( ctx != NULL );
index 4197c6784398e5a7d63688e3e5e0d1b57aecbc2b..ab5d4cf58bf6bcc690d4af9b22a638626c4e94b0 100644 (file)
void applyMask(CairoRenderContext *ctx, SPMask const *mask);
/** Initializes the CairoRenderContext according to the specified
- Document. A set*Target function can only be called on the context
+ SPDocument. A set*Target function can only be called on the context
before setupDocument. */
- bool setupDocument(CairoRenderContext *ctx, Document *doc, bool pageBoundingBox, SPItem *base);
+ bool setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool pageBoundingBox, SPItem *base);
/** Traverses the object tree and invokes the render methods. */
void renderItem(CairoRenderContext *ctx, SPItem *item);
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp
index ffba5af81e8c0a19655bb2656ee8e808d934ed5f..f400a36497008c5da1080c66f3c81cd6f5e13b21 100644 (file)
static void
-emf_print_document_to_file(Document *doc, gchar const *filename)
+emf_print_document_to_file(SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Print *mod;
SPPrintContext context;
void
-EmfWin32::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
+EmfWin32::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
#pragma pack( pop )
-Document *
+SPDocument *
EmfWin32::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
{
EMF_CALLBACK_DATA d;
// std::cout << "SVG Output: " << std::endl << *(d.outsvg) << std::endl;
- Document *doc = sp_document_new_from_mem(d.outsvg->c_str(), d.outsvg->length(), TRUE);
+ SPDocument *doc = sp_document_new_from_mem(d.outsvg->c_str(), d.outsvg->length(), TRUE);
delete d.outsvg;
delete d.path;
index 544cd75db04873ff268529c32428cd9da9a3b1eb..c62d7a4e9025071fcab7637f9e12acd8d2984358 100644 (file)
bool check(Inkscape::Extension::Extension *module); //Can this module load (always yes for now)
void save(Inkscape::Extension::Output *mod, // Save the given document to the given filename
- Document *doc,
+ SPDocument *doc,
gchar const *filename);
- virtual Document *open( Inkscape::Extension::Input *mod,
+ virtual SPDocument *open( Inkscape::Extension::Input *mod,
const gchar *uri );
static void init(void);//Initialize the class
diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp
index 822a0577bf55b27c30f07e7f8f3ecd9935606c23..d098f6466ab95ba25ddabb62deb3e0523f2d5208 100644 (file)
unsigned int
-PrintEmfWin32::begin (Inkscape::Extension::Print *mod, Document *doc)
+PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
{
gchar const *utf8_fn = mod->get_param_string("destination");
index bec3f95823f61a16a7b56262f954614f3f1eefe3..5c1d8439d329670ba048c4e7fb542c5829cf2f81 100644 (file)
/* Print functions */
virtual unsigned int setup (Inkscape::Extension::Print * module);
- virtual unsigned int begin (Inkscape::Extension::Print * module, Document *doc);
+ virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc);
virtual unsigned int finish (Inkscape::Extension::Print * module);
/* Rendering methods */
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index 2aea1cc6449942bf9d636edf33a2310a28021f6c..64a099c8a42e3c673b89b3348936c0e4050d6174 100644 (file)
namespace Extension {
namespace Internal {
-Document *
+SPDocument *
GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri)
{
- Document *doc = NULL;
+ SPDocument *doc = NULL;
GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL );
if (pb) { /* We are readable */
index 373d53da300df0c0ffcd184b9122a81ed34b71f4..9d5e6ccf7ea876f93089232f5961ea6270ce7407 100644 (file)
class GdkpixbufInput : Inkscape::Extension::Implementation::Implementation {
public:
- Document *open(Inkscape::Extension::Input *mod,
+ SPDocument *open(Inkscape::Extension::Input *mod,
gchar const *uri);
static void init();
};
index 9510b5ebd290a7ff74dac6afc2d324deca70a30b..5b3e0c16ef2e37bf7427d6951906fd7777730ed7 100644 (file)
}
/**
- \brief Actually open the gradient and turn it into an Document
+ \brief Actually open the gradient and turn it into an SPDocument
\param module The input module being used
\param filename The filename of the gradient to be opened
\return A Document with the gradient in it.
document using the \c sp_document_from_mem. That is then returned
to Inkscape.
*/
-Document *
+SPDocument *
GimpGrad::open (Inkscape::Extension::Input */*module*/, gchar const *filename)
{
Inkscape::IO::dump_fopen_call(filename, "I");
index 21ccfa2153ddf8e959404e8bdd680ea56d7d488d..45b76dd6d42420da3f91494d8ec4055d087495b1 100644 (file)
public:
bool load(Inkscape::Extension::Extension *module);
void unload(Inkscape::Extension::Extension *module);
- Document *open(Inkscape::Extension::Input *module, gchar const *filename);
+ SPDocument *open(Inkscape::Extension::Input *module, gchar const *filename);
static void init();
};
index 5a0523ba800f50973f4beb3c6ebbac030f0f5113..d4b35b261baec5cb49bb89bbdac225bb8bd07179 100644 (file)
Geom::Rect bounding_area = Geom::Rect(Geom::Point(0,0), Geom::Point(100,100));
if (selection->isEmpty()) {
/* get page size */
- Document * doc = document->doc();
+ SPDocument * doc = document->doc();
bounding_area = Geom::Rect( Geom::Point(0,0),
Geom::Point(sp_document_width(doc), sp_document_height(doc)) );
} else {
Gtk::Widget *
Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
- Document * current_document = view->doc();
+ SPDocument * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
index c1f057071d0b41992ffe8af1fa72ee329a5c61dd..417755e1973f19354dcae0a2367486cfa64ef04f 100644 (file)
/**
* Output the tree data to buffer
*/
-bool JavaFXOutput::doTreeRecursive(Document *doc, SPObject *obj)
+bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
{
/**
* Check the type of node and process
/**
* Output the curve data to buffer
*/
-bool JavaFXOutput::doTree(Document *doc)
+bool JavaFXOutput::doTree(SPDocument *doc)
{
double bignum = 1000000.0;
}
-bool JavaFXOutput::doBody(Document *doc, SPObject *obj)
+bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj)
{
/**
* Check the type of node and process
/**
* Saves the <paths> of an Inkscape SVG file as JavaFX spline definitions
*/
-bool JavaFXOutput::saveDocument(Document *doc, gchar const *filename_utf8)
+bool JavaFXOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8)
{
reset();
*/
void
JavaFXOutput::save(Inkscape::Extension::Output */*mod*/,
- Document *doc, gchar const *filename_utf8)
+ SPDocument *doc, gchar const *filename_utf8)
{
/* N.B. The name `filename_utf8' represents the fact that we want it to be in utf8; whereas in
* fact we know that some callers of Extension::save pass something in the filesystem's
index 246172c23a83a5d717037ac26f9ef2a321fdddaa..9c1c8778ba0489ab798a00e00fbcf126375bae45 100644 (file)
* API call to perform the output to a file
*/
virtual void save(Inkscape::Extension::Output *mod,
- Document *doc, gchar const *filename);
+ SPDocument *doc, gchar const *filename);
/**
* Inkscape runtime startup call.
* Output the SVG document's curve data as JavaFX geometry types
*/
bool doCurve(SPItem *item, const String &id);
- bool doTreeRecursive(Document *doc, SPObject *obj);
- bool doTree(Document *doc);
+ bool doTreeRecursive(SPDocument *doc, SPObject *obj);
+ bool doTree(SPDocument *doc);
- bool doBody(Document *doc, SPObject *obj);
+ bool doBody(SPDocument *doc, SPObject *obj);
/**
* Output the file footer
/**
* Actual method to save document
*/
- bool saveDocument(Document *doc, gchar const *filename);
+ bool saveDocument(SPDocument *doc, gchar const *filename);
//For statistics
int nrNodes;
diff --git a/src/extension/internal/latex-pstricks-out.cpp b/src/extension/internal/latex-pstricks-out.cpp
index 924f9697e0aa9abea98785f6c4d50ff4c4e95af9..4a469a7500a0da118ed649fa5ff19fad21ebe443 100644 (file)
void
-LatexOutput::save(Inkscape::Extension::Output *mod2, Document *doc, gchar const *filename)
+LatexOutput::save(Inkscape::Extension::Output *mod2, SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Print *mod;
SPPrintContext context;
diff --git a/src/extension/internal/latex-pstricks-out.h b/src/extension/internal/latex-pstricks-out.h
index a9910f4ccbb9dc45b4f1f6afd2ba6678f57710dc..a12cdc3c1395db9c187361dcb428ade17e32218b 100644 (file)
bool check(Inkscape::Extension::Extension *module); //Can this module load (always yes for now)
void save(Inkscape::Extension::Output *mod, // Save the given document to the given filename
- Document *doc,
+ SPDocument *doc,
gchar const *filename);
static void init(void);//Initialize the class
index afc985e1424481cb581050fb67d1679e656793d7..789e5ea346878159e2cb150c191d41ce33fbdf0b 100644 (file)
}
unsigned int
-PrintLatex::begin (Inkscape::Extension::Print *mod, Document *doc)
+PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
{
Inkscape::SVGOStringStream os;
int res;
index 4e310d6fd2971d3e87aa924d3d28c70f02b5c5ab..a33e169e84103a8a0f3dd8d20f641630dc1525cb 100644 (file)
/* Print functions */
virtual unsigned int setup (Inkscape::Extension::Print * module);
- virtual unsigned int begin (Inkscape::Extension::Print * module, Document *doc);
+ virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc);
virtual unsigned int finish (Inkscape::Extension::Print * module);
/* Rendering methods */
index e7e22414a497c67fb3d63089fe2ce3ef6d818cc8..cc8489302d2c73da43173e14eba0be3fc2a49f19 100644 (file)
* Descends into the SVG tree, mapping things to ODF when appropriate
*/
void
-OdfOutput::save(Inkscape::Extension::Output */*mod*/, Document *doc, gchar const *filename)
+OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gchar const *filename)
{
reset();
index 5ad1f1137397fca25bf571150526795c81716a6c..3854ddfe126a785d763254b6659a9f4ce2b0d4e2 100644 (file)
bool check (Inkscape::Extension::Extension * module);
void save (Inkscape::Extension::Output *mod,
- Document *doc,
+ SPDocument *doc,
gchar const *filename);
static void init (void);
diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp
index 76759259dcddf1b264118b9b91385ad90da890ad..937fefb1117636f7c1cba87534697813c7e4960c 100644 (file)
static cairo_status_t _write_ustring_cb(void *closure, const unsigned char *data, unsigned int length);
-Document *
+SPDocument *
PdfInputCairo::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
printf("Attempting to open using PdfInputCairo\n");
cairo_destroy(cr);
cairo_surface_destroy(surface);
- Document * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE);
+ SPDocument * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE);
delete output;
g_object_unref(page);
index 15080bc14963734bdcfb0fbc1646b7cf580e4c9d..5715b57c9c391686d096adc7483ba32b5e154777 100644 (file)
class PdfInputCairo: public Inkscape::Extension::Implementation::Implementation {
PdfInputCairo () { };
public:
- Document *open( Inkscape::Extension::Input *mod,
+ SPDocument *open( Inkscape::Extension::Input *mod,
const gchar *uri );
static void init( void );
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index 476f0daf617aaeecb56666ca9349d88c4e773481..c2d417f2c03d750dbcb3e54983fab76f92aca3d8 100644 (file)
/**
* Parses the selected page of the given PDF document using PdfParser.
*/
-Document *
+SPDocument *
PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
// Initialize the globalParams variable for poppler
Catalog *catalog = pdf_doc->getCatalog();
Page *page = catalog->getPage(page_num);
- Document *doc = sp_document_new(NULL, TRUE, TRUE);
+ SPDocument *doc = sp_document_new(NULL, TRUE, TRUE);
bool saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive(doc, false); // No need to undo in this temporary document
diff --git a/src/extension/internal/pdfinput/pdf-input.h b/src/extension/internal/pdfinput/pdf-input.h
index 968114ef3fd0198f292bb64740ce671bb06e2515..6bf0f11a21b33c545f179fe66ed0848c86a9d30b 100644 (file)
class PdfInput: public Inkscape::Extension::Implementation::Implementation {
PdfInput () { };
public:
- Document *open( Inkscape::Extension::Input *mod,
+ SPDocument *open( Inkscape::Extension::Input *mod,
const gchar *uri );
static void init( void );
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index 686e44bb12b66d86c4f7c18f4df098024bc316f7..00bd8fa4d8df9e00b2f09492381cd60b99cdd275 100644 (file)
*
*/
-SvgBuilder::SvgBuilder(Document *document, gchar *docname, XRef *xref) {
+SvgBuilder::SvgBuilder(SPDocument *document, gchar *docname, XRef *xref) {
_is_top_level = true;
_doc = document;
_docname = docname;
diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h
index 1f84ffcc37ae745bda4d2c791d5de62fdbccebd4..3b9192d31a80097e55d6e73a56e00b412c25edd1 100644 (file)
#ifdef HAVE_POPPLER
-class Document;
+class SPDocument;
namespace Inkscape {
namespace XML {
class Document;
*/
class SvgBuilder {
public:
- SvgBuilder(Document *document, gchar *docname, XRef *xref);
+ SvgBuilder(SPDocument *document, gchar *docname, XRef *xref);
SvgBuilder(SvgBuilder *parent, Inkscape::XML::Node *root);
virtual ~SvgBuilder();
std::vector<std::string> _availableFontNames; // Full names, used for matching font names (Bug LP #179589).
bool _is_top_level; // Whether this SvgBuilder is the top-level one
- Document *_doc;
+ SPDocument *_doc;
gchar *_docname; // Basename of the URI from which this document is created
XRef *_xref; // Cross-reference table from the PDF doc we're converting from
Inkscape::XML::Document *_xml_doc;
index d3ed39d1f2439bf874ebee7f3ba796ccdf9416f5..f30cbc317a4413cd6b07270bd2542a15c3bfc86e 100644 (file)
/**
* Descend the svg tree recursively, translating data
*/
-bool PovOutput::doTreeRecursive(Document *doc, SPObject *obj)
+bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
{
String id;
/**
* Output the curve data to buffer
*/
-bool PovOutput::doTree(Document *doc)
+bool PovOutput::doTree(SPDocument *doc)
{
double bignum = 1000000.0;
minx = bignum;
/**
* Saves the Shapes of an Inkscape SVG file as PovRay spline definitions
*/
-void PovOutput::saveDocument(Document *doc, gchar const *filename_utf8)
+void PovOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8)
{
reset();
*/
void
PovOutput::save(Inkscape::Extension::Output */*mod*/,
- Document *doc, gchar const *filename_utf8)
+ SPDocument *doc, gchar const *filename_utf8)
{
/* See comments in JavaFSOutput::save re the name `filename_utf8'. */
saveDocument(doc, filename_utf8);
index 02ba6da820383feb26038eb00de3a374ff15e6e5..0c3b73a7f0f3b531f87260f6cfa19b84ab8b42f6 100644 (file)
* API call to perform the output to a file
*/
void save(Inkscape::Extension::Output *mod,
- Document *doc, gchar const *filename);
+ SPDocument *doc, gchar const *filename);
/**
* Inkscape runtime startup call.
* Output the SVG document's curve data as POV curves
*/
bool doCurve(SPItem *item, const String &id);
- bool doTreeRecursive(Document *doc, SPObject *obj);
- bool doTree(Document *doc);
+ bool doTreeRecursive(SPDocument *doc, SPObject *obj);
+ bool doTree(SPDocument *doc);
/**
* Actual method to save document
*/
- void saveDocument(Document *doc, gchar const *filename);
+ void saveDocument(SPDocument *doc, gchar const *filename);
/**
index 31781108807a4d849123798f6ba1925832363c44..a3589e9051556fe27c523cd368df1b79dfda34b1 100644 (file)
/**
\return A new document just for you!
\brief This function takes in a filename of a SVG document and
- turns it into a Document.
+ turns it into a SPDocument.
\param mod Module to use
\param uri The path to the file (UTF-8)
This function is really simple, it just calls sp_document_new...
*/
-Document *
+SPDocument *
Svg::open (Inkscape::Extension::Input */*mod*/, const gchar *uri)
{
#ifdef WITH_GNOME_VFS
g_warning("Error: Could not open file '%s' with VFS\n", uri);
return NULL;
}
- Document * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1);
+ SPDocument * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1);
g_free(buffer);
return doc;
all of this code. I just stole it.
*/
void
-Svg::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
+Svg::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
{
g_return_if_fail(doc != NULL);
g_return_if_fail(filename != NULL);
index 48b57c8c59a0ac08a4d7007dc53a297498a0022b..b97735dd805c72d5aa6a072fdba28a8b2654a214 100644 (file)
public:
virtual void save( Inkscape::Extension::Output *mod,
- Document *doc,
+ SPDocument *doc,
gchar const *filename );
- virtual Document *open( Inkscape::Extension::Input *mod,
+ virtual SPDocument *open( Inkscape::Extension::Input *mod,
const gchar *uri );
static void init( void );
index f272292b5b04a9e530eb6c1d97b7a02b98a8f890..21f27885850115b34c7448be7815f5ce116fd8ff 100644 (file)
}
unsigned int
-PrintWin32::begin (Inkscape::Extension::Print *mod, Document *doc)
+PrintWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
{
DOCINFO di = {
sizeof (DOCINFO),
index 7f4b9352ded1a8da1244d6c3efaeba0e293a2285..9462115c679b463b10720dcf00d2ebed39e84234 100644 (file)
virtual unsigned int setup (Inkscape::Extension::Print * module);
//virtual unsigned int set_preview (Inkscape::Extension::Print * module);
- virtual unsigned int begin (Inkscape::Extension::Print * module, Document *doc);
+ virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc);
virtual unsigned int finish (Inkscape::Extension::Print * module);
/* Rendering methods */
index e7177e5e3031381fb148003f176a09a4dae08383..c37d5705b4bc0b0077fc2506a9b129ed0b6bd79f 100644 (file)
namespace Internal {
-Document *
+SPDocument *
WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) {
WPXInputStream* input = new libwpg::WPGFileStream(uri);
if (input->isOLEStream()) {
//printf("I've got a doc: \n%s", painter.document.c_str());
- Document * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE);
+ SPDocument * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE);
delete input;
return doc;
}
index e5c2838d596b6c90f86752f816ae381187bd63ec..ca882039bddc1ae7069347090fe86ef387d10014 100644 (file)
class WpgInput : public Inkscape::Extension::Implementation::Implementation {
WpgInput () { };
public:
- Document *open( Inkscape::Extension::Input *mod,
+ SPDocument *open( Inkscape::Extension::Input *mod,
const gchar *uri );
static void init( void );
index 8e2fa54867d3bca02139dd91965e89f806580a94..742e938de20307e62f3d74763f4a34a2dec4f486 100644 (file)
--- a/src/extension/output.cpp
+++ b/src/extension/output.cpp
could be changed, and old files will still work properly.
*/
void
-Output::save(Document *doc, gchar const *filename)
+Output::save(SPDocument *doc, gchar const *filename)
{
try {
imp->save(this, doc, filename);
diff --git a/src/extension/output.h b/src/extension/output.h
index 455b4a8aef25959b269af4c593820a28a68517b3..b52a96211c9c36d468ecadd03cd380febc2ba46c 100644 (file)
--- a/src/extension/output.h
+++ b/src/extension/output.h
#include <gtk/gtkdialog.h>
#include "extension.h"
-struct Document;
+struct SPDocument;
namespace Inkscape {
namespace Extension {
Implementation::Implementation * in_imp);
virtual ~Output (void);
virtual bool check (void);
- void save (Document *doc,
+ void save (SPDocument *doc,
gchar const *uri);
bool prefs (void);
gchar * get_mimetype(void);
index 07170587a48a86b52a473db0598ba51fcfe86490..1dda3d73f82e4dea77009e5e1b839ac05b25056f 100644 (file)
and \c pref_name() are used.
*/
bool
-ParamBool::set( bool in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ )
+ParamBool::set( bool in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ )
{
_value = in;
/** \brief Returns \c _value */
bool
-ParamBool::get (const Document * doc, const Inkscape::XML::Node * node)
+ParamBool::get (const SPDocument * doc, const Inkscape::XML::Node * node)
{
return _value;
}
private:
/** \brief Param to change */
ParamBool * _pref;
- Document * _doc;
+ SPDocument * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
This function sets the value of the checkbox to be that of the
parameter, and then sets up a callback to \c on_toggle.
*/
- ParamBoolCheckButton (ParamBool * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamBoolCheckButton (ParamBool * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::CheckButton(), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->set_active(_pref->get(NULL, NULL) /**\todo fix */);
this->signal_toggled().connect(sigc::mem_fun(this, &ParamBoolCheckButton::on_toggle));
Builds a hbox with a label and a check button in it.
*/
Gtk::Widget *
-ParamBool::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamBool::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
index 23b15596dd1256b66e451ee7c2fb97ae32d81ef2..a1cd4ce4a7b641451d9d8e0ce0a9d5b20ae02ccd 100644 (file)
bool _value;
public:
ParamBool(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
- bool get (const Document * doc, const Inkscape::XML::Node * node);
- bool set (bool in, Document * doc, Inkscape::XML::Node * node);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ bool get (const SPDocument * doc, const Inkscape::XML::Node * node);
+ bool set (bool in, SPDocument * doc, Inkscape::XML::Node * node);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
};
index 080356e710301d290ba5c35ed59b4d901cac9e90..58db857486283a4367d58e30f722d7932e58abb2 100644 (file)
}
guint32
-ParamColor::set( guint32 in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ )
+ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ )
{
_value = in;
}
Gtk::Widget *
-ParamColor::get_widget( Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal )
+ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal )
{
if (_gui_hidden) return NULL;
index 89aac7be70f2f1271f1cfd8a1f599ff9acf81c5f..e6b44fbcb85386d7ca7bb853a5dbc934fc59bba9 100644 (file)
ParamColor(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
virtual ~ParamColor(void);
/** \brief Returns \c _value, with a \i const to protect it. */
- guint32 get( const Document * /*doc*/, const Inkscape::XML::Node * /*node*/ ) { return _value; }
- guint32 set (guint32 in, Document * doc, Inkscape::XML::Node * node);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ guint32 get( const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/ ) { return _value; }
+ guint32 set (guint32 in, SPDocument * doc, Inkscape::XML::Node * node);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
sigc::signal<void> * _changeSignal;
}; /* class ParamColor */
index 3641695cccb14ae8cc46a57b6da88a8429c6cbc3..656e58c491cc53ea0fcd8fa7183cbbcb8adfc610 100644 (file)
/** \brief Create a label for the description */
Gtk::Widget *
-ParamDescription::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
+ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
if (_gui_hidden) return NULL;
index 42441e5a92078977f1185b3a13f4785a8b65817f..c305ea6dfcc09b700a4c7fa714253d9470023039 100644 (file)
gchar * _value;
public:
ParamDescription(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
};
} /* namespace Extension */
index 9de3f60dd9c0db886883dfebebb32ff60242ec8f..03c1f839b99c5a81deb39273f2504f84784cbf26 100644 (file)
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamComboBox::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamComboBox::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
{
if (in == NULL) return NULL; /* Can't have NULL string */
class ParamComboBoxEntry : public Gtk::ComboBoxText {
private:
ParamComboBox * _pref;
- Document * _doc;
+ SPDocument * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
\param pref Where to get the string from, and where to put it
when it changes.
*/
- ParamComboBoxEntry (ParamComboBox * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamComboBoxEntry (ParamComboBox * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::ComboBoxText(), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->signal_changed().connect(sigc::mem_fun(this, &ParamComboBoxEntry::changed));
};
\brief Creates a combobox widget for an enumeration parameter
*/
Gtk::Widget *
-ParamComboBox::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamComboBox::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index e1af8fd2bd2645711e2afc0c2676f72aa621cfe7..3f9707c34b43529f58a12be6e0badb95eecf4f4f 100644 (file)
public:
ParamComboBox(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
virtual ~ParamComboBox(void);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
- const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
- const gchar * set (const gchar * in, Document * doc, Inkscape::XML::Node * node);
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
+ const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
void changed (void);
}; /* class ParamComboBox */
index 516249c3c3e8f599330e994e0ff87eaad92b2c47..11e3a8d97c51b69d9e89a5f355454ff83d95610a 100644 (file)
and \c pref_name() are used.
*/
float
-ParamFloat::set (float in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamFloat::set (float in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
{
_value = in;
if (_value > _max) _value = _max;
class ParamFloatAdjustment : public Gtk::Adjustment {
/** The parameter to adjust */
ParamFloat * _pref;
- Document * _doc;
+ SPDocument * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
/** \brief Make the adjustment using an extension and the string
describing the parameter. */
- ParamFloatAdjustment (ParamFloat * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamFloatAdjustment (ParamFloat * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::Adjustment(0.0, param->min(), param->max(), 0.1, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->set_value(_pref->get(NULL, NULL) /* \todo fix */);
this->signal_value_changed().connect(sigc::mem_fun(this, &ParamFloatAdjustment::val_changed));
Builds a hbox with a label and a float adjustment in it.
*/
Gtk::Widget *
-ParamFloat::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamFloat::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 32ab7a79615dddea638e12972b4154747d81c71c..f105d8f0e3c3d420cc6be897c9dffa4a703a7ed9 100644 (file)
public:
ParamFloat (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
/** \brief Returns \c _value */
- float get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
- float set (float in, Document * doc, Inkscape::XML::Node * node);
+ float get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
+ float set (float in, SPDocument * doc, Inkscape::XML::Node * node);
float max (void) { return _max; }
float min (void) { return _min; }
float precision (void) { return _precision; }
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
};
index 2818bb57ba49b0e547c7b2852a39331a30fc9b99..301d54ed008aa0ff1b9737c10e54bff4f496b71e 100644 (file)
and \c pref_name() are used.
*/
int
-ParamInt::set (int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamInt::set (int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
{
_value = in;
if (_value > _max) _value = _max;
class ParamIntAdjustment : public Gtk::Adjustment {
/** The parameter to adjust */
ParamInt * _pref;
- Document * _doc;
+ SPDocument * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
/** \brief Make the adjustment using an extension and the string
describing the parameter. */
- ParamIntAdjustment (ParamInt * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamIntAdjustment (ParamInt * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::Adjustment(0.0, param->min(), param->max(), 1.0, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->set_value(_pref->get(NULL, NULL) /* \todo fix */);
this->signal_value_changed().connect(sigc::mem_fun(this, &ParamIntAdjustment::val_changed));
Builds a hbox with a label and a int adjustment in it.
*/
Gtk::Widget *
-ParamInt::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 6d44a10b308011163e034041e67f1fa531b391c1..a4eb54c81245fd3e1a4fabcda697ad87f0b465a7 100644 (file)
public:
ParamInt (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
/** \brief Returns \c _value */
- int get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
- int set (int in, Document * doc, Inkscape::XML::Node * node);
+ int get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
+ int set (int in, SPDocument * doc, Inkscape::XML::Node * node);
int max (void) { return _max; }
int min (void) { return _min; }
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
};
index 6ad338ffafd69b5215e0dd9bde57a19a4bc22949..1c30b7e0e82ac04acbd8b2e66dc4c8a70d418293 100644 (file)
ParamNotebookPage(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
~ParamNotebookPage(void);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void paramString (std::list <std::string> &list);
gchar * get_guitext (void) {return _text;};
@@ -196,7 +196,7 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension:
Builds a notebook page (a vbox) and puts parameters on it.
*/
Gtk::Widget *
-ParamNotebookPage::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamNotebookPage::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamNotebook::set (const int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamNotebook::set (const int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
{
ParamNotebookPage * page = NULL;
int i = 0;
class ParamNotebookWdg : public Gtk::Notebook {
private:
ParamNotebook * _pref;
- Document * _doc;
+ SPDocument * _doc;
Inkscape::XML::Node * _node;
public:
/** \brief Build a notebookpage preference for the given parameter
\param pref Where to get the string (pagename) from, and where to put it
when it changes.
*/
- ParamNotebookWdg (ParamNotebook * pref, Document * doc, Inkscape::XML::Node * node) :
+ ParamNotebookWdg (ParamNotebook * pref, SPDocument * doc, Inkscape::XML::Node * node) :
Gtk::Notebook(), _pref(pref), _doc(doc), _node(node), activated(false) {
// don't have to set the correct page: this is done in ParamNotebook::get_widget.
// hook function
Builds a notebook and puts pages in it.
*/
Gtk::Widget *
-ParamNotebook::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamNotebook::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 6efd3c5f14073f3595d4b0c606bbfaadd312e9f8..24d4ebfc138f3fca2474560fe61503978ba506c6 100644 (file)
public:
ParamNotebook(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
virtual ~ParamNotebook(void);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::list <std::string> &list);
- const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
- const gchar * set (const int in, Document * doc, Inkscape::XML::Node * node);
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
+ const gchar * set (const int in, SPDocument * doc, Inkscape::XML::Node * node);
}; /* class ParamNotebook */
index 1094a5d3f894a52b0f644a08460a63259d5b23d9..2773af61dde709ad4c9ae3206b00a50392b9e0fa 100644 (file)
@@ -156,7 +156,7 @@ Parameter::make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension *
/** \brief Wrapper to cast to the object and use it's function. */
bool
-Parameter::get_bool (const Document * doc, const Inkscape::XML::Node * node)
+Parameter::get_bool (const SPDocument * doc, const Inkscape::XML::Node * node)
{
ParamBool * boolpntr = dynamic_cast<ParamBool *>(this);
if (boolpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
int
-Parameter::get_int (const Document * doc, const Inkscape::XML::Node * node)
+Parameter::get_int (const SPDocument * doc, const Inkscape::XML::Node * node)
{
ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
float
-Parameter::get_float (const Document * doc, const Inkscape::XML::Node * node)
+Parameter::get_float (const SPDocument * doc, const Inkscape::XML::Node * node)
{
ParamFloat * floatpntr = dynamic_cast<ParamFloat *>(this);
if (floatpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
const gchar *
-Parameter::get_string (const Document * doc, const Inkscape::XML::Node * node)
+Parameter::get_string (const SPDocument * doc, const Inkscape::XML::Node * node)
{
ParamString * stringpntr = dynamic_cast<ParamString *>(this);
if (stringpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
const gchar *
-Parameter::get_enum (const Document * doc, const Inkscape::XML::Node * node)
+Parameter::get_enum (const SPDocument * doc, const Inkscape::XML::Node * node)
{
ParamComboBox * param = dynamic_cast<ParamComboBox *>(this);
if (param == NULL)
}
guint32
-Parameter::get_color(const Document* doc, const Inkscape::XML::Node* node)
+Parameter::get_color(const SPDocument* doc, const Inkscape::XML::Node* node)
{
ParamColor* param = dynamic_cast<ParamColor *>(this);
if (param == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
bool
-Parameter::set_bool (bool in, Document * doc, Inkscape::XML::Node * node)
+Parameter::set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node)
{
ParamBool * boolpntr = dynamic_cast<ParamBool *>(this);
if (boolpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
int
-Parameter::set_int (int in, Document * doc, Inkscape::XML::Node * node)
+Parameter::set_int (int in, SPDocument * doc, Inkscape::XML::Node * node)
{
ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
float
-Parameter::set_float (float in, Document * doc, Inkscape::XML::Node * node)
+Parameter::set_float (float in, SPDocument * doc, Inkscape::XML::Node * node)
{
ParamFloat * floatpntr;
floatpntr = dynamic_cast<ParamFloat *>(this);
/** \brief Wrapper to cast to the object and use it's function. */
const gchar *
-Parameter::set_string (const gchar * in, Document * doc, Inkscape::XML::Node * node)
+Parameter::set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node)
{
ParamString * stringpntr = dynamic_cast<ParamString *>(this);
if (stringpntr == NULL)
@@ -255,7 +255,7 @@ Parameter::set_string (const gchar * in, Document * doc, Inkscape::XML::Node * n
}
/** \brief Wrapper to cast to the object and use it's function. */
guint32
-Parameter::set_color (guint32 in, Document * doc, Inkscape::XML::Node * node)
+Parameter::set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node)
{
ParamColor* param = dynamic_cast<ParamColor *>(this);
if (param == NULL)
}
Inkscape::XML::Node *
-Parameter::document_param_node (Document * doc)
+Parameter::document_param_node (SPDocument * doc)
{
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node * defs = SP_OBJECT_REPR(SP_DOCUMENT_DEFS(doc));
/** \brief Basically, if there is no widget pass a NULL. */
Gtk::Widget *
-Parameter::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
+Parameter::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
return NULL;
}
index a79b2fd6b4d3a6b8c6dddabc251dfc8cd00b7c21..54249c12eb3373a48fb28c6e10469088c5920556 100644 (file)
/* **** funcs **** */
gchar * pref_name (void);
Inkscape::XML::Node * find_child (Inkscape::XML::Node * adult);
- Inkscape::XML::Node * document_param_node (Document * doc);
+ Inkscape::XML::Node * document_param_node (SPDocument * doc);
Inkscape::XML::Node * new_child (Inkscape::XML::Node * parent);
public:
Parameter(name, guitext, NULL, Parameter::SCOPE_USER, false, NULL, ext);
};
virtual ~Parameter (void);
- bool get_bool (const Document * doc,
+ bool get_bool (const SPDocument * doc,
const Inkscape::XML::Node * node);
- int get_int (const Document * doc,
+ int get_int (const SPDocument * doc,
const Inkscape::XML::Node * node);
- float get_float (const Document * doc,
+ float get_float (const SPDocument * doc,
const Inkscape::XML::Node * node);
- const gchar * get_string (const Document * doc,
+ const gchar * get_string (const SPDocument * doc,
const Inkscape::XML::Node * node);
- guint32 get_color (const Document * doc,
+ guint32 get_color (const SPDocument * doc,
const Inkscape::XML::Node * node);
- const gchar * get_enum (const Document * doc,
+ const gchar * get_enum (const SPDocument * doc,
const Inkscape::XML::Node * node);
- bool set_bool (bool in, Document * doc, Inkscape::XML::Node * node);
- int set_int (int in, Document * doc, Inkscape::XML::Node * node);
- float set_float (float in, Document * doc, Inkscape::XML::Node * node);
- const gchar * set_string (const gchar * in, Document * doc, Inkscape::XML::Node * node);
- guint32 set_color (guint32 in, Document * doc, Inkscape::XML::Node * node);
+ bool set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node);
+ int set_int (int in, SPDocument * doc, Inkscape::XML::Node * node);
+ float set_float (float in, SPDocument * doc, Inkscape::XML::Node * node);
+ const gchar * set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
+ guint32 set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node);
const gchar * name (void) {return _name;}
static Parameter * make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension * in_ext);
- virtual Gtk::Widget * get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ virtual Gtk::Widget * get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
gchar const * get_tooltip (void) { return _desc; }
index 315984e176a4e1111f830d59dfbad947118f62af..c17839001f94282b782325bc3f70931189851834 100644 (file)
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamRadioButton::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamRadioButton::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
{
if (in == NULL) return NULL; /* Can't have NULL string */
class ParamRadioButtonWdg : public Gtk::RadioButton {
private:
ParamRadioButton * _pref;
- Document * _doc;
+ SPDocument * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
\param pref Where to put the radiobutton's string when it is selected.
*/
ParamRadioButtonWdg ( Gtk::RadioButtonGroup& group, const Glib::ustring& label,
- ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal ) :
+ ParamRadioButton * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal ) :
Gtk::RadioButton(group, label), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
add_changesignal();
};
ParamRadioButtonWdg ( const Glib::ustring& label,
- ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node , sigc::signal<void> * changeSignal) :
+ ParamRadioButton * pref, SPDocument * doc, Inkscape::XML::Node * node , sigc::signal<void> * changeSignal) :
Gtk::RadioButton(label), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
add_changesignal();
};
class ComboWdg : public Gtk::ComboBoxText {
public:
- ComboWdg(ParamRadioButton* base, Document * doc, Inkscape::XML::Node * node) :
+ ComboWdg(ParamRadioButton* base, SPDocument * doc, Inkscape::XML::Node * node) :
Gtk::ComboBoxText(),
base(base),
doc(doc),
protected:
ParamRadioButton* base;
- Document* doc;
+ SPDocument* doc;
Inkscape::XML::Node* node;
virtual void on_changed() {
\brief Creates a combobox widget for an enumeration parameter
*/
Gtk::Widget *
-ParamRadioButton::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamRadioButton::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index ec35c2c53bc6b779251084b41c0dddc716785b2f..ea8440de2df36a663f6b8a82c22359c6ce8472e7 100644 (file)
Inkscape::XML::Node * xml,
AppearanceMode mode);
virtual ~ParamRadioButton(void);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
- const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
- const gchar * set (const gchar * in, Document * doc, Inkscape::XML::Node * node);
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
+ const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
private:
/** \brief Internal value. This should point to a string that has
index 6427f6f76ee4ea1487b374c5ad759eb79f016a71..e32224332e4c53e093ca35c2459fb0b473beea45 100644 (file)
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamString::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamString::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
{
if (in == NULL) return NULL; /* Can't have NULL string */
class ParamStringEntry : public Gtk::Entry {
private:
ParamString * _pref;
- Document * _doc;
+ SPDocument * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
\param pref Where to get the string from, and where to put it
when it changes.
*/
- ParamStringEntry (ParamString * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamStringEntry (ParamString * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::Entry(), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
if (_pref->get(NULL, NULL) != NULL)
this->set_text(Glib::ustring(_pref->get(NULL, NULL)));
Builds a hbox with a label and a text box in it.
*/
Gtk::Widget *
-ParamString::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamString::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 0eb116a53da211c7d5041e1248871c85e340b355..10f45e5acd20a1cf5692163b6170f32fef5a3693 100644 (file)
ParamString(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
virtual ~ParamString(void);
/** \brief Returns \c _value, with a \i const to protect it. */
- const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
- const gchar * set (const gchar * in, Document * doc, Inkscape::XML::Node * node);
- Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
+ const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
+ Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
void setMaxLength(int maxLenght) { _max_length = maxLenght; }
int getMaxLength(void) { return _max_length; }
index f6fa84f5b55bd5183d6aab4d322af6587ee553f1..8e3fc13f19486998fc2636ba1dfbf6586fc05cb8 100644 (file)
}
void
-PathEffect::processPath (Document * /*doc*/, Inkscape::XML::Node * /*path*/, Inkscape::XML::Node * /*def*/)
+PathEffect::processPath (SPDocument * /*doc*/, Inkscape::XML::Node * /*path*/, Inkscape::XML::Node * /*def*/)
{
}
void
-PathEffect::processPathEffects (Document * doc, Inkscape::XML::Node * path)
+PathEffect::processPathEffects (SPDocument * doc, Inkscape::XML::Node * path)
{
gchar const * patheffectlist = path->attribute("inkscape:path-effects");
if (patheffectlist == NULL)
index 7ad87504849ab1e73cca68dcc7a5d19fa33f00ad..0c00ae093ab8a783ea6e90a90eb59239029722fc 100644 (file)
PathEffect (Inkscape::XML::Node * in_repr,
Implementation::Implementation * in_imp);
virtual ~PathEffect (void);
- void processPath (Document * doc,
+ void processPath (SPDocument * doc,
Inkscape::XML::Node * path,
Inkscape::XML::Node * def);
- static void processPathEffects (Document * doc,
+ static void processPathEffects (SPDocument * doc,
Inkscape::XML::Node * path);
}; /* PathEffect */
index f6f6bb1e54adc5f4489863ef8f4121f0ed0176eb..2d4177d606376c77bb1e9d1806804c62e5693f8c 100644 (file)
--- a/src/extension/print.cpp
+++ b/src/extension/print.cpp
}
unsigned int
-Print::begin (Document *doc)
+Print::begin (SPDocument *doc)
{
return imp->begin(this, doc);
}
diff --git a/src/extension/print.h b/src/extension/print.h
index 3240942d7a1b25943339aeaa1afbba308f5e7824..8ae71b8e6a31bc5f9244e4e5d059ccc56a12c095 100644 (file)
--- a/src/extension/print.h
+++ b/src/extension/print.h
unsigned int setup (void);
unsigned int set_preview (void);
- unsigned int begin (Document *doc);
+ unsigned int begin (SPDocument *doc);
unsigned int finish (void);
/* Rendering methods */
index ad49c3d2ae1300c3e93dd8222dca7d3bc7c9a999..d7e0eebf3794515a9a07e94b8143219f8ecfb401 100644 (file)
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
*
* Lastly, the open function is called in the module itself.
*/
-Document *
+SPDocument *
open(Extension *key, gchar const *filename)
{
Input *imod = NULL;
if (!imod->prefs(filename))
return NULL;
- Document *doc = imod->open(filename);
+ SPDocument *doc = imod->open(filename);
if (!doc) {
throw Input::open_failed();
}
* Lastly, the save function is called in the module itself.
*/
void
-save(Extension *key, Document *doc, gchar const *filename, bool setextension, bool check_overwrite, bool official)
+save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, bool check_overwrite, bool official)
{
Output *omod;
if (key == NULL) {
diff --git a/src/extension/system.h b/src/extension/system.h
index ada5f799c1dae71ebdf0b5edbb5d9ce47b9f09a0..6c23b2f0dde073affcd553e0ff816a4df729ba08 100644 (file)
--- a/src/extension/system.h
+++ b/src/extension/system.h
namespace Inkscape {
namespace Extension {
-Document *open(Extension *key, gchar const *filename);
-void save(Extension *key, Document *doc, gchar const *filename,
+SPDocument *open(Extension *key, gchar const *filename);
+void save(Extension *key, SPDocument *doc, gchar const *filename,
bool setextension, bool check_overwrite, bool official);
Print *get_print(gchar const *key);
Extension *build_from_file(gchar const *filename);
diff --git a/src/file.cpp b/src/file.cpp
index 22425547e33669d21d77afce7edf6e4a54591fd9..049c1acb405313bce8ad55075074075720e742cc 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
-
/** @file
* @brief File/Print operations
*/
#include "uri.h"
#include "xml/rebase-hrefs.h"
-#include "streams-handles.h"
-#include "streams-webdav.h"
-#include "streams-ftp.h"
-#include "streams-http.h"
-
-//#include "buffersystem.h"
-#include <cstring>
-
#ifdef WITH_GNOME_VFS
# include <libgnomevfs/gnome-vfs.h>
#endif
char *templName = NULL;
if (templ.size()>0)
templName = (char *)templ.c_str();
- Document *doc = sp_document_new(templName, TRUE, true);
+ SPDocument *doc = sp_document_new(templName, TRUE, true);
g_return_val_if_fail(doc != NULL, NULL);
SPDesktop *dt;
if (desktop)
desktop->setWaitingCursor();
- Document *doc = NULL;
+ SPDocument *doc = NULL;
try {
doc = Inkscape::Extension::open(key, uri.c_str());
} catch (Inkscape::Extension::Input::no_extension_found &e) {
desktop->clearWaitingCursor();
if (doc) {
- Document *existing = desktop ? sp_desktop_document(desktop) : NULL;
+ SPDocument *existing = desktop ? sp_desktop_document(desktop) : NULL;
if (existing && existing->virgin && replace_empty) {
// If the current desktop is empty, open the document there
}
}
-
-
-
-//NOTE1
-bool
-sp_file_open_uri(const Inkscape::URI &uri,
- Inkscape::Extension::Extension *key,
- bool add_to_recent, bool replace_empty)
-{
- Document *doc = NULL;
- try {
- doc = Inkscape::Extension::open(key, uri.toNativeFilename());
- } catch (Inkscape::Extension::Input::no_extension_found &e) {
- doc = NULL;
- } catch (Inkscape::Extension::Input::open_failed &e) {
- doc = NULL;
- }
-
- //FIXME1 KLUDGE switch
-
- //WebDAV
- /*
- if (std::strstr(uri.toString(), "http") != NULL)
- {
- if (strcmp(uri.toString(), "/http") >= 5//FIXME3 skip begining '/'
- ||
- strcmp(uri.toString(), "http") >= 4
- )
- {
-
- std::cout<<"+++ 'http' uri.toString->"<<uri.toString()<<std::endl;
-
- Inkscape::WebDAVBuffer wbuf;
- Inkscape::iwebdavstream *iws = new Inkscape::iwebdavstream(wbuf);
- Inkscape::BufferSystem bs(iws);
- bs.onInputStream();
- }
-
- } else*/
- std::cout<<"--> FTP , HTTP etc."<<std::endl;
-
- //FTP
- if (std::strstr(uri.toString(), "ftp") != NULL)
- {
- if (strcmp(uri.toString(), "/ftp") >= 4//FIXME3 skip begining '/'
- ||
- strcmp(uri.toString(), "ftp") >= 3
- )
- {
- std::cout<<"+++ 'ftp' uri.toString->"<<uri.toString()<<std::endl;
-
- Inkscape::FTPBuffer wbuf;
- Inkscape::iftpstream *iws = new Inkscape::iftpstream(wbuf);
- char *buf = new char[8192];
- *iws >> buf;
- std::cout<<"buf->"<<buf<<std::endl;
-
- //Inkscape::BufferSystem bs(iws);
- //bs.onInputStream();
- }
- //HTTP
- } else if (std::strstr(uri.toString(), "http") != NULL)
- {
- if (strcmp(uri.toString(), "/http") >= 5//FIXME3 skip begining '/'
- ||
- strcmp(uri.toString(), "http") >= 4
- )
- {
- std::cout<<"+++ 'http' uri.toString->"<<uri.toString()<<std::endl;
-
-/* Inkscape::HTTPBuffer wbuf;
- Inkscape::ihttpstream *iws = new Inkscape::ihttpstream(wbuf);
- char *buf = new char[8192];
- *iws >> buf;
- std::cout<<"buf->"<<buf<<std::endl;
-*/
- //Inkscape::BufferSystem bs(iws);
- //bs.onInputStream();
- }
-
- } /*else if ()
- {
-
- } */
-
-
-
- if (doc) {
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *existing = desktop ? sp_desktop_document(desktop) : NULL;
-
- if (existing && existing->virgin && replace_empty) {
- // If the current desktop is empty, open the document there
- sp_document_ensure_up_to_date (doc);
- desktop->change_document(doc);
- sp_document_resized_signal_emit (doc, sp_document_width(doc), sp_document_height(doc));
- } else {
- if (!Inkscape::NSApplication::Application::getNewGui()) {
- // create a whole new desktop and window
- SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL));
- sp_create_window(dtw, TRUE);
- desktop = static_cast<SPDesktop*>(dtw->view);
- } else {
- desktop = Inkscape::NSApplication::Editor::createDesktop (doc);
- }
- }
-
- doc->virgin = FALSE;
- // everyone who cares now has a reference, get rid of ours
- sp_document_unref(doc);
- // resize the window to match the document properties
- sp_namedview_window_from_document(desktop);
- sp_namedview_update_layers_from_document(desktop);
-
- if (add_to_recent) {
-//--tullarisc prefs_set_recent_file(SP_DOCUMENT_URI(doc), SP_DOCUMENT_NAME(doc));
- }
-
- return TRUE;
- } else {
- //FIXME 1
- //gchar *safeUri = Inkscape::IO::sanitizeString(uri.toNativeFilename());
- //gchar *text = g_strdup_printf(_("Failed to load the requested file %s"), safeUri);
- //sp_ui_error_dialog(text);
- //g_free(text);
- //g_free(safeUri);
- return FALSE;
- }
-}
-
-
/**
* Handle prompting user for "do you want to revert"? Revert on "OK"
*/
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
g_assert(desktop != NULL);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
g_assert(doc != NULL);
Inkscape::XML::Node *repr = sp_document_repr_root(doc);
/**
* Display an file Open selector. Open a document if OK is pressed.
* Can select single or multiple files for opening.
- * NOTE1
*/
void
sp_file_open_dialog(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*data*/)
@@ -662,7 +521,7 @@ sp_file_open_dialog(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*d
open_path.append(G_DIR_SEPARATOR_S);
prefs->setString("/dialogs/open/path", open_path);
- sp_file_open_uri(Inkscape::URI(fileName.c_str()), selection);
+ sp_file_open(fileName, selection);
}
return;
@@ -681,7 +540,7 @@ sp_file_open_dialog(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*d
void
sp_file_vacuum()
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
unsigned int diff = vacuum_document (doc);
* document; is true for normal save, false for temporary saves
*/
static bool
-file_save(Gtk::Window &parentWindow, Document *doc, const Glib::ustring &uri,
+file_save(Gtk::Window &parentWindow, SPDocument *doc, const Glib::ustring &uri,
Inkscape::Extension::Extension *key, bool saveas, bool official)
{
if (!doc || uri.size()<1) //Safety check
* Used only for remote saving using VFS and a specific uri. Gets the file at the /tmp.
*/
bool
-file_save_remote(Document */*doc*/,
+file_save_remote(SPDocument */*doc*/,
#ifdef WITH_GNOME_VFS
const Glib::ustring &uri,
#else
* \param ascopy (optional) wether to set the documents->uri to the new filename or not
*/
bool
-sp_file_save_dialog(Gtk::Window &parentWindow, Document *doc, bool is_copy)
+sp_file_save_dialog(Gtk::Window &parentWindow, SPDocument *doc, bool is_copy)
{
Inkscape::XML::Node *repr = sp_document_repr_root(doc);
* Save a document, displaying a SaveAs dialog if necessary.
*/
bool
-sp_file_save_document(Gtk::Window &parentWindow, Document *doc)
+sp_file_save_document(Gtk::Window &parentWindow, SPDocument *doc)
{
bool success = true;
@@ -1054,13 +913,13 @@ sp_file_save_a_copy(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*d
* Import a resource. Called by sp_file_import()
*/
void
-file_import(Document *in_doc, const Glib::ustring &uri,
+file_import(SPDocument *in_doc, const Glib::ustring &uri,
Inkscape::Extension::Extension *key)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
//DEBUG_MESSAGE( fileImport, "file_import( in_doc:%p uri:[%s], key:%p", in_doc, uri, key );
- Document *doc;
+ SPDocument *doc;
try {
doc = Inkscape::Extension::open(key, uri.c_str());
} catch (Inkscape::Extension::Input::no_extension_found &e) {
}
if (doc != NULL) {
- Inkscape::XML::rebase_hrefs((Inkscape::XML::Document *)doc, in_doc->base, true);
+ Inkscape::XML::rebase_hrefs(doc, in_doc->base, true);
Inkscape::XML::Document *xml_in_doc = sp_document_repr_doc(in_doc);
prevent_id_clashes(doc, in_doc);
{
static Glib::ustring import_path;
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (!doc)
return;
sp_file_export_dialog(void *widget)
{
//# temp hack for 'doc' until we can switch to this dialog
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
Glib::ustring export_path;
Glib::ustring export_loc;
if (!SP_ACTIVE_DOCUMENT)
return false;
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
Glib::ustring export_path;
Glib::ustring export_loc;
{
static Glib::ustring import_path;
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (!doc)
return;
void
sp_file_print(Gtk::Window& parentWindow)
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (doc)
sp_print_document(parentWindow, doc);
}
sp_file_print_preview(gpointer /*object*/, gpointer /*data*/)
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (doc)
sp_print_preview_document(doc);
diff --git a/src/file.h b/src/file.h
index 2eaace640deb60abb24451bb418865c6f71f6d7d..ce75a61a7cfff5f0a689bd0574a343a1b1837d2d 100644 (file)
--- a/src/file.h
+++ b/src/file.h
#include "extension/extension-forward.h"
-#include <iostream>
-#include <fstream>
-#include <glibmm/i18n.h>
-
-#include "uri.h"
-#include "streams-webdav.h"
-
struct SPDesktop;
-struct Document;
+struct SPDocument;
namespace Inkscape {
namespace Extension {
bool replace_empty = true
);
-//NOTE1
-/*
- * Opens a new file and window from the given URI (class)
- */
-bool sp_file_open_uri(
- const Inkscape::URI &uri,
- Inkscape::Extension::Extension *key,
- bool add_to_recent = true,
- bool replace_empty = true
- );
-
/**
* Displays a file open dialog. Calls sp_file_open on
* an OK.
* Added to make only the remote savings.
*/
-bool file_save_remote(Document *doc, const Glib::ustring &uri,
+bool file_save_remote(SPDocument *doc, const Glib::ustring &uri,
Inkscape::Extension::Extension *key, bool saveas, bool official);
/**
@@ -126,10 +108,10 @@ bool sp_file_save_a_copy (Gtk::Window &parentWindow, gpointer object, gpointer d
* Saves the given document. Displays a file select dialog
* if needed.
*/
-bool sp_file_save_document (Gtk::Window &parentWindow, Document *document);
+bool sp_file_save_document (Gtk::Window &parentWindow, SPDocument *document);
/* Do the saveas dialog with a document as the parameter */
-bool sp_file_save_dialog (Gtk::Window &parentWindow, Document *doc, bool bAsCopy = FALSE);
+bool sp_file_save_dialog (Gtk::Window &parentWindow, SPDocument *doc, bool bAsCopy = FALSE);
/*######################
/**
* Imports a resource
*/
-void file_import(Document *in_doc, const Glib::ustring &uri,
+void file_import(SPDocument *in_doc, const Glib::ustring &uri,
Inkscape::Extension::Extension *key);
/*######################
#endif
-//namespace Inkscape {
-//namespace Net {
-
-
-
-//}
-//}
-// #endif
-
/*
Local Variables:
mode:c++
index d40347889d1df3647312c099f52777a7b0efe8a7..363663ac3c8c34c946916077a4f73f8bd8cfc9f2 100644 (file)
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
}
}
-SPFilter *new_filter(Document *document)
+SPFilter *new_filter(SPDocument *document)
{
g_return_val_if_fail(document != NULL, NULL);
@@ -184,7 +184,7 @@ filter_add_primitive(SPFilter *filter, const Inkscape::Filters::FilterPrimitiveT
* Creates a filter with blur primitive of specified radius for an item with the given matrix expansion, width and height
*/
SPFilter *
-new_filter_gaussian_blur (Document *document, gdouble radius, double expansion, double expansionX, double expansionY, double width, double height)
+new_filter_gaussian_blur (SPDocument *document, gdouble radius, double expansion, double expansionX, double expansionY, double width, double height)
{
g_return_val_if_fail(document != NULL, NULL);
* an item with the given matrix expansion, width and height
*/
SPFilter *
-new_filter_blend_gaussian_blur (Document *document, const char *blendmode, gdouble radius, double expansion,
+new_filter_blend_gaussian_blur (SPDocument *document, const char *blendmode, gdouble radius, double expansion,
double expansionX, double expansionY, double width, double height)
{
g_return_val_if_fail(document != NULL, NULL);
@@ -317,7 +317,7 @@ new_filter_blend_gaussian_blur (Document *document, const char *blendmode, gdoub
* specified mode and radius, respectively
*/
SPFilter *
-new_filter_simple_from_item (Document *document, SPItem *item, const char *mode, gdouble radius)
+new_filter_simple_from_item (SPDocument *document, SPItem *item, const char *mode, gdouble radius)
{
Geom::OptRect const r = sp_item_bbox_desktop(item, SPItem::GEOMETRIC_BBOX);
@@ -345,7 +345,7 @@ new_filter_simple_from_item (Document *document, SPItem *item, const char *mode,
*/
/* TODO: this should be made more generic, not just for blurs */
SPFilter *
-modify_filter_gaussian_blur_from_item(Document *document, SPItem *item,
+modify_filter_gaussian_blur_from_item(SPDocument *document, SPItem *item,
gdouble radius)
{
if (!item->style || !item->style->filter.set) {
diff --git a/src/filter-chemistry.h b/src/filter-chemistry.h
index ee249d6f2a0db88f126ff318b0309d23f64ce919..1b18ec11ab706ead1f166202438eae5cc4771483 100644 (file)
--- a/src/filter-chemistry.h
+++ b/src/filter-chemistry.h
#include "sp-filter.h"
SPFilterPrimitive *filter_add_primitive(SPFilter *filter, Inkscape::Filters::FilterPrimitiveType);
-SPFilter *new_filter (Document *document);
-SPFilter *new_filter_gaussian_blur (Document *document, gdouble stdDeviation, double expansion, double expansionX, double expansionY, double width, double height);
-SPFilter *new_filter_simple_from_item (Document *document, SPItem *item, const char *mode, gdouble stdDeviation);
-SPFilter *modify_filter_gaussian_blur_from_item (Document *document, SPItem *item, gdouble stdDeviation);
+SPFilter *new_filter (SPDocument *document);
+SPFilter *new_filter_gaussian_blur (SPDocument *document, gdouble stdDeviation, double expansion, double expansionX, double expansionY, double width, double height);
+SPFilter *new_filter_simple_from_item (SPDocument *document, SPItem *item, const char *mode, gdouble stdDeviation);
+SPFilter *modify_filter_gaussian_blur_from_item (SPDocument *document, SPItem *item, gdouble stdDeviation);
void remove_filter (SPObject *item, bool recursive);
void remove_filter_gaussian_blur (SPObject *item);
bool filter_is_single_gaussian_blur(SPFilter *filter);
diff --git a/src/filters/blend.cpp b/src/filters/blend.cpp
index 26db781a08f00e3e885ecb0fa742540902e3530f..5998d7be335021cb0ea6b4aeefa97e69c8a9efb9 100644 (file)
--- a/src/filters/blend.cpp
+++ b/src/filters/blend.cpp
static void sp_feBlend_class_init(SPFeBlendClass *klass);
static void sp_feBlend_init(SPFeBlend *feBlend);
-static void sp_feBlend_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feBlend_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feBlend_release(SPObject *object);
static void sp_feBlend_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feBlend_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feBlend_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feBlend_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
SPFeBlend *blend = SP_FEBLEND(object);
index f3c336d715381944bd7334b015813c617f6f57ea..55cfcbeb78ed20c6b0833d2210e592a536bc9f01 100644 (file)
static void sp_feColorMatrix_class_init(SPFeColorMatrixClass *klass);
static void sp_feColorMatrix_init(SPFeColorMatrix *feColorMatrix);
-static void sp_feColorMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feColorMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feColorMatrix_release(SPObject *object);
static void sp_feColorMatrix_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feColorMatrix_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feColorMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feColorMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feColorMatrix_parent_class)->build) {
((SPObjectClass *) feColorMatrix_parent_class)->build(object, document, repr);
diff --git a/src/filters/componenttransfer-funcnode.cpp b/src/filters/componenttransfer-funcnode.cpp
index f74da8154f65a0ac026ffbf5cbc0b94a0f273abc..e66f85e70b8399b99d94637519fa90ca0e929297 100644 (file)
static void sp_fefuncnode_class_init(SPFeFuncNodeClass *klass);
static void sp_fefuncnode_init(SPFeFuncNode *fefuncnode);
-static void sp_fefuncnode_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_fefuncnode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_fefuncnode_release(SPObject *object);
static void sp_fefuncnode_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_fefuncnode_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_fefuncnode_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_fefuncnode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feFuncNode_parent_class)->build) {
((SPObjectClass *) feFuncNode_parent_class)->build(object, document, repr);
index fbfca3a354aabfd24e647023092993ff33b0e390..557d884e0ffb797f3d2fe5f1d90d5bc1e9488b9e 100644 (file)
static void sp_feComponentTransfer_class_init(SPFeComponentTransferClass *klass);
static void sp_feComponentTransfer_init(SPFeComponentTransfer *feComponentTransfer);
-static void sp_feComponentTransfer_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feComponentTransfer_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feComponentTransfer_release(SPObject *object);
static void sp_feComponentTransfer_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feComponentTransfer_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feComponentTransfer_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feComponentTransfer_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feComponentTransfer_parent_class)->build) {
((SPObjectClass *) feComponentTransfer_parent_class)->build(object, document, repr);
index 8265a611c17ea913c2a85ecbd6d7543e811d0964..93c692f94d14f24749b9c116e954b1340ab4106c 100644 (file)
static void sp_feComposite_class_init(SPFeCompositeClass *klass);
static void sp_feComposite_init(SPFeComposite *feComposite);
-static void sp_feComposite_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feComposite_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feComposite_release(SPObject *object);
static void sp_feComposite_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feComposite_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feComposite_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feComposite_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feComposite_parent_class)->build) {
((SPObjectClass *) feComposite_parent_class)->build(object, document, repr);
index cc9d62f8fd4f39bda3574d3ec0477a5e36639e70..3e1c36f0ad994afd8f6d3cc3edfc88a174a658c4 100644 (file)
static void sp_feConvolveMatrix_class_init(SPFeConvolveMatrixClass *klass);
static void sp_feConvolveMatrix_init(SPFeConvolveMatrix *feConvolveMatrix);
-static void sp_feConvolveMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feConvolveMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feConvolveMatrix_release(SPObject *object);
static void sp_feConvolveMatrix_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feConvolveMatrix_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feConvolveMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feConvolveMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feConvolveMatrix_parent_class)->build) {
((SPObjectClass *) feConvolveMatrix_parent_class)->build(object, document, repr);
index e494e8ccdc482be621448d528d87d3388888a69f..bdc569083564712f170bc94d0b69e72105db86cc 100644 (file)
static void sp_feDiffuseLighting_class_init(SPFeDiffuseLightingClass *klass);
static void sp_feDiffuseLighting_init(SPFeDiffuseLighting *feDiffuseLighting);
-static void sp_feDiffuseLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feDiffuseLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feDiffuseLighting_release(SPObject *object);
static void sp_feDiffuseLighting_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feDiffuseLighting_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feDiffuseLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feDiffuseLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feDiffuseLighting_parent_class)->build) {
((SPObjectClass *) feDiffuseLighting_parent_class)->build(object, document, repr);
index b05ee4db139937f3cfaea0af66d0271458ae245a..baa17d785f00452de09356050bfe7d599a259ade 100644 (file)
static void sp_feDisplacementMap_class_init(SPFeDisplacementMapClass *klass);
static void sp_feDisplacementMap_init(SPFeDisplacementMap *feDisplacementMap);
-static void sp_feDisplacementMap_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feDisplacementMap_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feDisplacementMap_release(SPObject *object);
static void sp_feDisplacementMap_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feDisplacementMap_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feDisplacementMap_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feDisplacementMap_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feDisplacementMap_parent_class)->build) {
((SPObjectClass *) feDisplacementMap_parent_class)->build(object, document, repr);
index f250947987331632ed36d49efed2f0a77b9f16cd..41584c4a4c17c664bdb41adf50b3727e9ca42cfd 100644 (file)
static void sp_fedistantlight_class_init(SPFeDistantLightClass *klass);
static void sp_fedistantlight_init(SPFeDistantLight *fedistantlight);
-static void sp_fedistantlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_fedistantlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_fedistantlight_release(SPObject *object);
static void sp_fedistantlight_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_fedistantlight_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_fedistantlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_fedistantlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feDistantLight_parent_class)->build) {
((SPObjectClass *) feDistantLight_parent_class)->build(object, document, repr);
diff --git a/src/filters/flood.cpp b/src/filters/flood.cpp
index 941f361131bb6958b1c05cf61e998dc738318654..625e35d42bf765183611c38561bbe824d25e3258 100644 (file)
--- a/src/filters/flood.cpp
+++ b/src/filters/flood.cpp
static void sp_feFlood_class_init(SPFeFloodClass *klass);
static void sp_feFlood_init(SPFeFlood *feFlood);
-static void sp_feFlood_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feFlood_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feFlood_release(SPObject *object);
static void sp_feFlood_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feFlood_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feFlood_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feFlood_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feFlood_parent_class)->build) {
((SPObjectClass *) feFlood_parent_class)->build(object, document, repr);
diff --git a/src/filters/image.cpp b/src/filters/image.cpp
index bdfbadee091eb758f567285e4d376a59c49b16e8..0002ef94c74a36b336aa2e40350a2027e5266fd3 100644 (file)
--- a/src/filters/image.cpp
+++ b/src/filters/image.cpp
static void sp_feImage_class_init(SPFeImageClass *klass);
static void sp_feImage_init(SPFeImage *feImage);
-static void sp_feImage_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feImage_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feImage_release(SPObject *object);
static void sp_feImage_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feImage_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feImage_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feImage_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
// Save document reference so we can load images with relative paths.
SPFeImage *feImage = SP_FEIMAGE(object);
diff --git a/src/filters/image.h b/src/filters/image.h
index 74352db8062bb04874012bb2b5e0cbd640d2f525..7207918e12923a93014c9881003edaab46cbdec8 100644 (file)
--- a/src/filters/image.h
+++ b/src/filters/image.h
/** IMAGE ATTRIBUTES HERE */
gchar *href;
SVGLength x, y, height, width;
- Document *document;
+ SPDocument *document;
bool from_element;
SPItem* SVGElem;
Inkscape::URIReference* SVGElemRef;
diff --git a/src/filters/merge.cpp b/src/filters/merge.cpp
index 9d82da7ae6987a5341608f03fe56ab4f518145e3..437cb4b5511caf21724301aa24594a4dca167020 100644 (file)
--- a/src/filters/merge.cpp
+++ b/src/filters/merge.cpp
static void sp_feMerge_class_init(SPFeMergeClass *klass);
static void sp_feMerge_init(SPFeMerge *feMerge);
-static void sp_feMerge_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feMerge_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feMerge_release(SPObject *object);
static void sp_feMerge_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feMerge_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feMerge_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feMerge_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feMerge_parent_class)->build) {
((SPObjectClass *) feMerge_parent_class)->build(object, document, repr);
index 42b4bc8dbadb8966d7009c541563502be7a21125..8a4e0dd0ac179691fbb754e3cfeae9ab056cd514 100644 (file)
static void sp_feMergeNode_class_init(SPFeMergeNodeClass *klass);
static void sp_feMergeNode_init(SPFeMergeNode *skeleton);
-static void sp_feMergeNode_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feMergeNode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feMergeNode_release(SPObject *object);
static void sp_feMergeNode_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feMergeNode_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feMergeNode_build(SPObject *object, Document */*document*/, Inkscape::XML::Node */*repr*/)
+sp_feMergeNode_build(SPObject *object, SPDocument */*document*/, Inkscape::XML::Node */*repr*/)
{
sp_object_read_attr(object, "in");
}
index 6d91d99056682a9e1e856f6cbd77560aab5a2dd5..9a34bbccba3634a472dd93a342099160608ecdf6 100644 (file)
static void sp_feMorphology_class_init(SPFeMorphologyClass *klass);
static void sp_feMorphology_init(SPFeMorphology *feMorphology);
-static void sp_feMorphology_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feMorphology_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feMorphology_release(SPObject *object);
static void sp_feMorphology_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feMorphology_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feMorphology_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feMorphology_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feMorphology_parent_class)->build) {
((SPObjectClass *) feMorphology_parent_class)->build(object, document, repr);
diff --git a/src/filters/offset.cpp b/src/filters/offset.cpp
index 3ae6994ce5c349dc6add3e33530a76f36ab870a1..61ea45ff2a5549b1f1cf365b9af41e46719f1970 100644 (file)
--- a/src/filters/offset.cpp
+++ b/src/filters/offset.cpp
static void sp_feOffset_class_init(SPFeOffsetClass *klass);
static void sp_feOffset_init(SPFeOffset *feOffset);
-static void sp_feOffset_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feOffset_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feOffset_release(SPObject *object);
static void sp_feOffset_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feOffset_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feOffset_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feOffset_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feOffset_parent_class)->build) {
((SPObjectClass *) feOffset_parent_class)->build(object, document, repr);
index cc56b5f01014b89823d699dfbf89e6391e032b8c..ce58cf13e34f52d0719fb054a7ad2f87e33deccf 100644 (file)
static void sp_fepointlight_class_init(SPFePointLightClass *klass);
static void sp_fepointlight_init(SPFePointLight *fepointlight);
-static void sp_fepointlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_fepointlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_fepointlight_release(SPObject *object);
static void sp_fepointlight_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_fepointlight_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_fepointlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_fepointlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) fePointLight_parent_class)->build) {
((SPObjectClass *) fePointLight_parent_class)->build(object, document, repr);
index 9a3ac68112c97d976d3f900ac83aad07a84644fc..03a0c7f9687d2f844ed4629086c4f7ed8c1d586e 100644 (file)
static void sp_feSpecularLighting_class_init(SPFeSpecularLightingClass *klass);
static void sp_feSpecularLighting_init(SPFeSpecularLighting *feSpecularLighting);
-static void sp_feSpecularLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feSpecularLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feSpecularLighting_release(SPObject *object);
static void sp_feSpecularLighting_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feSpecularLighting_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feSpecularLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feSpecularLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feSpecularLighting_parent_class)->build) {
((SPObjectClass *) feSpecularLighting_parent_class)->build(object, document, repr);
index bd5d06f737b025a978b011f430f5c120690321cb..3b518f0b430653e24f71ffa8a9f478f94e6fd3fe 100644 (file)
static void sp_fespotlight_class_init(SPFeSpotLightClass *klass);
static void sp_fespotlight_init(SPFeSpotLight *fespotlight);
-static void sp_fespotlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_fespotlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_fespotlight_release(SPObject *object);
static void sp_fespotlight_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_fespotlight_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_fespotlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_fespotlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feSpotLight_parent_class)->build) {
((SPObjectClass *) feSpotLight_parent_class)->build(object, document, repr);
diff --git a/src/filters/tile.cpp b/src/filters/tile.cpp
index 7bf03cde31488934269502939969707f161182d9..877f70b27d0f72223a1cd83a8c7217c27001d02d 100644 (file)
--- a/src/filters/tile.cpp
+++ b/src/filters/tile.cpp
static void sp_feTile_class_init(SPFeTileClass *klass);
static void sp_feTile_init(SPFeTile *feTile);
-static void sp_feTile_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feTile_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feTile_release(SPObject *object);
static void sp_feTile_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feTile_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feTile_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feTile_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feTile_parent_class)->build) {
((SPObjectClass *) feTile_parent_class)->build(object, document, repr);
index e348f796f6a35aeaae4b490ff95cf56663621aa4..f3c1430565863e1e7882517b0bbd2a3c5c357005 100644 (file)
static void sp_feTurbulence_class_init(SPFeTurbulenceClass *klass);
static void sp_feTurbulence_init(SPFeTurbulence *feTurbulence);
-static void sp_feTurbulence_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_feTurbulence_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_feTurbulence_release(SPObject *object);
static void sp_feTurbulence_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_feTurbulence_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_feTurbulence_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_feTurbulence_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) feTurbulence_parent_class)->build) {
((SPObjectClass *) feTurbulence_parent_class)->build(object, document, repr);
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 9855c42f10ba779ef9301956b988f573290dedce..7b622338480a85124c78052ed2f9f4c0c68029b3 100644 (file)
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -394,7 +394,7 @@ inline static bool check_if_pixel_is_paintable(guchar *px, unsigned char *trace_
* \param union_with_selection If true, merge the final SVG path with the current selection.
*/
static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *desktop, Geom::Matrix transform, unsigned int min_x, unsigned int max_x, unsigned int min_y, unsigned int max_y, bool union_with_selection) {
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
unsigned char *trace_t;
*/
static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *event, bool union_with_selection, bool is_point_fill, bool is_touch_fill) {
SPDesktop *desktop = event_context->desktop;
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
/* Create new arena */
NRArena *arena = NRArena::create();
diff --git a/src/forward.h b/src/forward.h
index 4ac08c12689f69c9ebdadb68373ad2300d60cba1..d4a98fbff915016f7c4b14e848307406fecccffe 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 SPDocument;
class SPDocumentClass;
#define SP_TYPE_DOCUMENT (sp_document_get_type ())
-#define SP_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DOCUMENT, Document))
+#define SP_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DOCUMENT, SPDocument))
#define SP_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DOCUMENT))
GType sp_document_get_type ();
index 85e4e2c557e93df497f66938abe6c14ee04c2fa6..4abd7483f42207c2c968d39e51e4ea5c8da17992 100644 (file)
*/
static SPGradient *
-sp_gradient_get_private_normalized(Document *document, SPGradient *vector, SPGradientType type)
+sp_gradient_get_private_normalized(SPDocument *document, SPGradient *vector, SPGradientType type)
{
g_return_val_if_fail(document != NULL, NULL);
g_return_val_if_fail(vector != NULL, NULL);
return gr;
}
- Document *doc = SP_OBJECT_DOCUMENT(gr);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(gr);
SPObject *defs = SP_DOCUMENT_DEFS(doc);
if ((gr->has_stops) ||
return gr;
if (SP_OBJECT_HREFCOUNT(gr) > 1) {
- Document *doc = SP_OBJECT_DOCUMENT(gr);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(gr);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = SP_OBJECT_REPR (gr)->duplicate(xml_doc);
*/
SPGradient *
-sp_document_default_gradient_vector(Document *document, guint32 color)
+sp_document_default_gradient_vector(SPDocument *document, guint32 color)
{
SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
@@ -1271,7 +1271,7 @@ Return the preferred vector for \a o, made from (in order of preference) its cur
current fill or stroke color, or from desktop style if \a o is NULL or doesn't have style.
*/
SPGradient *
-sp_gradient_vector_for_object(Document *const doc, SPDesktop *const desktop,
+sp_gradient_vector_for_object(SPDocument *const doc, SPDesktop *const desktop,
SPObject *const o, bool const is_fill)
{
guint32 rgba = 0;
index 94351d4835030022efa201f072a2ebcc85cb9c5d..73b9893bc69e833ee86069ee6355ceddb3826a3d 100644 (file)
--- a/src/gradient-chemistry.h
+++ b/src/gradient-chemistry.h
* Get default normalized gradient vector of document, create if there is none
*/
-SPGradient *sp_document_default_gradient_vector (Document *document, guint32 color = 0);
-SPGradient *sp_gradient_vector_for_object (Document *doc, SPDesktop *desktop, SPObject *o, bool is_fill);
+SPGradient *sp_document_default_gradient_vector (SPDocument *document, guint32 color = 0);
+SPGradient *sp_gradient_vector_for_object (SPDocument *doc, SPDesktop *desktop, SPObject *o, bool is_fill);
void sp_object_ensure_fill_gradient_normalized (SPObject *object);
void sp_object_ensure_stroke_gradient_normalized (SPObject *object);
index 64a836b8f9abe0277ed7deb595a9e321b94dfc71..fc5c1af446593c0db42626003aab45e8d9ec11bc 100644 (file)
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -346,7 +346,7 @@ sp_gradient_context_get_stop_intervals (GrDrag *drag, GSList **these_stops, GSLi
static void
sp_gradient_context_add_stops_between_selected_stops (SPGradientContext *rc)
{
- Document *doc = NULL;
+ SPDocument *doc = NULL;
GrDrag *drag = rc->_grdrag;
GSList *these_stops = NULL;
static void
sp_gradient_simplify(SPGradientContext *rc, double tolerance)
{
- Document *doc = NULL;
+ SPDocument *doc = NULL;
GrDrag *drag = rc->_grdrag;
GSList *these_stops = NULL;
{
SPDesktop *desktop = SP_EVENT_CONTEXT(&rc)->desktop;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
SPEventContext *ec = SP_EVENT_CONTEXT(&rc);
if (!selection->isEmpty()) {
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 65f310e6a576bb32dd6bc7b5e6a6f2628378459e..c16ed2456548e33f7adcc5a72d874835ca79b1d1 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
{
if (!selected) return;
- Document *document = false;
+ SPDocument *document = false;
struct StructStopInfo {
SPStop * spstop;
diff --git a/src/helper/action.cpp b/src/helper/action.cpp
index 8c2705e4528aa3adcd70a728046c932b6ff839d1..84d150615388fcae9c58853087dd77c0543e1fe8 100644 (file)
--- a/src/helper/action.cpp
+++ b/src/helper/action.cpp
{
_addProperty(share_static_string("timestamp"), timestamp());
if (action->view) {
- Document *document = action->view->doc();
+ SPDocument *document = action->view->doc();
if (document) {
_addProperty(share_static_string("document"), document->serial());
}
index 1e364a37c10ffdf2b842152fd23d478127a2eb67..f41342e42271ce41712884e8eca1ff49f63b689a 100644 (file)
// to the call for the interface to the png writing.
bool
-sp_export_jpg_file(Document *doc, gchar const *filename,
+sp_export_jpg_file(SPDocument *doc, gchar const *filename,
double x0, double y0, double x1, double y1,
unsigned width, unsigned height, double xdpi, double ydpi,
unsigned long bgcolor, double quality,GSList *items)
}
GdkPixbuf*
-sp_generate_internal_bitmap(Document *doc, gchar const */*filename*/,
+sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/,
double x0, double y0, double x1, double y1,
unsigned width, unsigned height, double xdpi, double ydpi,
unsigned long bgcolor,
index de6a80181b6b0d801b69d6be978735483d12b80e..a985be297eeaaa2d1de9ab622efe7c2f23ad922e 100644 (file)
--- a/src/helper/pixbuf-ops.h
+++ b/src/helper/pixbuf-ops.h
#include <glib/gtypes.h>
-struct Document;
+struct SPDocument;
-bool sp_export_jpg_file (Document *doc, gchar const *filename, double x0, double y0, double x1, double y1,
+bool sp_export_jpg_file (SPDocument *doc, gchar const *filename, double x0, double y0, double x1, double y1,
unsigned int width, unsigned int height, double xdpi, double ydpi, unsigned long bgcolor, double quality, GSList *items_only = NULL);
-GdkPixbuf* sp_generate_internal_bitmap(Document *doc, gchar const *filename,
+GdkPixbuf* sp_generate_internal_bitmap(SPDocument *doc, gchar const *filename,
double x0, double y0, double x1, double y1,
unsigned width, unsigned height, double xdpi, double ydpi,
unsigned long bgcolor, GSList *items_only = NULL);
index ad1b43c55955ccb159ae335128768a217dd498d9..3ac9006800b30f978e6906d999bce4878f26cbca 100644 (file)
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
}
static bool
-sp_png_write_rgba_striped(Document *doc,
+sp_png_write_rgba_striped(SPDocument *doc,
gchar const *filename, unsigned long int width, unsigned long int height, double xdpi, double ydpi,
int (* get_rows)(guchar const **rows, int row, int num_rows, void *data),
void *data)
*
* \return true if succeeded (or if no action was taken), false if an error occurred.
*/
-bool sp_export_png_file (Document *doc, gchar const *filename,
+bool sp_export_png_file (SPDocument *doc, gchar const *filename,
double x0, double y0, double x1, double y1,
unsigned long int width, unsigned long int height, double xdpi, double ydpi,
unsigned long bgcolor,
width, height, xdpi, ydpi, bgcolor, status, data, force_overwrite, items_only);
}
bool
-sp_export_png_file(Document *doc, gchar const *filename,
+sp_export_png_file(SPDocument *doc, gchar const *filename,
Geom::Rect const &area,
unsigned long width, unsigned long height, double xdpi, double ydpi,
unsigned long bgcolor,
diff --git a/src/helper/png-write.h b/src/helper/png-write.h
index f7e372e0ba3f960ab74313795cfbcdd604bd45ec..83321aa4e7c6d68dddb1edfc5d7cbd5442e95c3e 100644 (file)
--- a/src/helper/png-write.h
+++ b/src/helper/png-write.h
#include <glib/gtypes.h>
#include <2geom/forward.h>
-struct Document;
+struct SPDocument;
-bool sp_export_png_file (Document *doc, gchar const *filename,
+bool sp_export_png_file (SPDocument *doc, gchar const *filename,
double x0, double y0, double x1, double y1,
unsigned long int width, unsigned long int height, double xdpi, double ydpi,
unsigned long bgcolor,
unsigned int (*status) (float, void *), void *data, bool force_overwrite = false, GSList *items_only = NULL);
-bool sp_export_png_file (Document *doc, gchar const *filename,
+bool sp_export_png_file (SPDocument *doc, gchar const *filename,
Geom::Rect const &area,
unsigned long int width, unsigned long int height, double xdpi, double ydpi,
unsigned long bgcolor,
index 9363974801a4e25312e22fa9f9b0a1fbec6e676a..575197fee3109deef8efe245edd39aef92dc4786 100644 (file)
-static SPObject *sp_gradient_load_from_svg(gchar const *name, Document *current_doc);
-static SPObject *sp_marker_load_from_svg(gchar const *name, Document *current_doc);
-static SPObject *sp_gradient_load_from_svg(gchar const *name, Document *current_doc);
+static SPObject *sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc);
+static SPObject *sp_marker_load_from_svg(gchar const *name, SPDocument *current_doc);
+static SPObject *sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc);
// FIXME: these should be merged with the icon loading code so they
// take the dir to look in, and the file to check for, and cache
// against that, rather than the existing copy/paste code seen here.
-static SPObject * sp_marker_load_from_svg(gchar const *name, Document *current_doc)
+static SPObject * sp_marker_load_from_svg(gchar const *name, SPDocument *current_doc)
{
- static Document *doc = NULL;
+ static SPDocument *doc = NULL;
static unsigned int edoc = FALSE;
if (!current_doc) {
return NULL;
static SPObject *
-sp_pattern_load_from_svg(gchar const *name, Document *current_doc)
+sp_pattern_load_from_svg(gchar const *name, SPDocument *current_doc)
{
- static Document *doc = NULL;
+ static SPDocument *doc = NULL;
static unsigned int edoc = FALSE;
if (!current_doc) {
return NULL;
static SPObject *
-sp_gradient_load_from_svg(gchar const *name, Document *current_doc)
+sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc)
{
- static Document *doc = NULL;
+ static SPDocument *doc = NULL;
static unsigned int edoc = FALSE;
if (!current_doc) {
return NULL;
gchar * base = g_strndup(e, a);
SPDesktop *desktop = inkscape_active_desktop();
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
SPDefs *defs= (SPDefs *) SP_DOCUMENT_DEFS(doc);
SPObject *object = NULL;
else {
SPDesktop *desktop = inkscape_active_desktop();
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
SPObject *object = doc->getObjectById(urn);
return object;
diff --git a/src/id-clash.cpp b/src/id-clash.cpp
index e739c4e4c9ad907dcc45eff9ef2865d52146b032..b215576a4d506f8ca39fc9a875313dfe31edf0e4 100644 (file)
--- a/src/id-clash.cpp
+++ b/src/id-clash.cpp
* a list of those changes that will require fixing up references.
*/
static void
-change_clashing_ids(Document *imported_doc, Document *current_doc,
+change_clashing_ids(SPDocument *imported_doc, SPDocument *current_doc,
SPObject *elem, const refmap_type *refmap,
id_changelist_type *id_changes)
{
* those IDs are updated accordingly.
*/
void
-prevent_id_clashes(Document *imported_doc, Document *current_doc)
+prevent_id_clashes(SPDocument *imported_doc, SPDocument *current_doc)
{
refmap_type *refmap = new refmap_type;
id_changelist_type id_changes;
diff --git a/src/id-clash.h b/src/id-clash.h
index 1abd1dd8332dd3dd993dfedf259b5367bdf82538..41864273815cf22df93cfa911dae11a03fbbafb8 100644 (file)
--- a/src/id-clash.h
+++ b/src/id-clash.h
#include "document.h"
-void prevent_id_clashes(Document *imported_doc, Document *current_doc);
+void prevent_id_clashes(SPDocument *imported_doc, SPDocument *current_doc);
#endif /* !SEEN_ID_CLASH_H */
diff --git a/src/inkscape-private.h b/src/inkscape-private.h
index 001d1201a556a8699f8c35393bdab57df1b8b43a..cb7f98729aa5ef23fdc57414f5035524b6a8a175 100644 (file)
--- a/src/inkscape-private.h
+++ b/src/inkscape-private.h
void inkscape_remove_desktop (SPDesktop * desktop);
void inkscape_activate_desktop (SPDesktop * desktop);
void inkscape_reactivate_desktop (SPDesktop * desktop);
-void inkscape_add_document (Document *document);
-bool inkscape_remove_document (Document *document);
+void inkscape_add_document (SPDocument *document);
+bool inkscape_remove_document (SPDocument *document);
void inkscape_set_color (SPColor *color, float opacity);
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index c2c45d3bbc0bb60a5cb86f8b705a1e590bcf6c57..60ab895ede7789bf05f082b957aaf1f017375f40 100644 (file)
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -105,7 +105,7 @@ static void inkscape_deactivate_desktop_private (Inkscape::Application *inkscape
struct Inkscape::Application {
GObject object;
Inkscape::XML::Document *menus;
- std::map<Document *, int> document_set;
+ std::map<SPDocument *, int> document_set;
GSList *desktops;
gchar *argv0;
gboolean dialogs_toggle;
void (* set_eventcontext) (Inkscape::Application * inkscape, SPEventContext * eventcontext);
void (* activate_desktop) (Inkscape::Application * inkscape, SPDesktop * desktop);
void (* deactivate_desktop) (Inkscape::Application * inkscape, SPDesktop * desktop);
- void (* destroy_document) (Inkscape::Application *inkscape, Document *doc);
+ void (* destroy_document) (Inkscape::Application *inkscape, SPDocument *doc);
void (* color_set) (Inkscape::Application *inkscape, SPColor *color, double opacity);
void (* shut_down) (Inkscape::Application *inkscape);
void (* dialogs_hide) (Inkscape::Application *inkscape);
gint docnum = 0;
SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Autosaving documents..."));
- for (std::map<Document*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
iter != inkscape->document_set.end();
++iter) {
- Document *doc = iter->first;
+ SPDocument *doc = iter->first;
++docnum;
g_assert_not_reached ();
}
- new (&inkscape->document_set) std::map<Document *, int>();
+ new (&inkscape->document_set) std::map<SPDocument *, int>();
inkscape->menus = sp_repr_read_mem (_(menus_skeleton), MENUS_SKELETON_SIZE, NULL);
inkscape->desktops = NULL;
gint count = 0;
GSList *savednames = NULL;
GSList *failednames = NULL;
- for (std::map<Document*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
iter != inkscape->document_set.end();
++iter) {
- Document *doc = iter->first;
+ SPDocument *doc = iter->first;
Inkscape::XML::Node *repr;
repr = sp_document_repr_root (doc);
if (doc->isModifiedSinceSave()) {
* fixme: These need probably signals too
*/
void
-inkscape_add_document (Document *document)
+inkscape_add_document (SPDocument *document)
{
g_return_if_fail (document != NULL);
// try to insert the pair into the list
if (!(inkscape->document_set.insert(std::make_pair(document, 1)).second)) {
//insert failed, this key (document) is already in the list
- for (std::map<Document*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
iter != inkscape->document_set.end();
++iter) {
if (iter->first == document) {
// returns true if this was last reference to this document, so you can delete it
bool
-inkscape_remove_document (Document *document)
+inkscape_remove_document (SPDocument *document)
{
g_return_val_if_fail (document != NULL, false);
if (!Inkscape::NSApplication::Application::getNewGui())
{
- for (std::map<Document*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
iter != inkscape->document_set.end();
++iter) {
if (iter->first == document) {
return (SPDesktop *) inkscape->desktops->data;
}
-Document *
+SPDocument *
inkscape_active_document (void)
{
if (Inkscape::NSApplication::Application::getNewGui())
}
bool inkscape_is_sole_desktop_for_document(SPDesktop const &desktop) {
- Document const* document = desktop.doc();
+ SPDocument const* document = desktop.doc();
if (!document) {
return false;
}
for ( GSList *iter = inkscape->desktops ; iter ; iter = iter->next ) {
SPDesktop *other_desktop=(SPDesktop *)iter->data;
- Document *other_document=other_desktop->doc();
+ SPDocument *other_document=other_desktop->doc();
if ( other_document == document && other_desktop != &desktop ) {
return false;
}
diff --git a/src/inkscape.h b/src/inkscape.h
index e611af49b88fdeacf1506f9f92853d1f757c92a2..ca2894227c1d8589c30cf54497058fa9a80dda63 100644 (file)
--- a/src/inkscape.h
+++ b/src/inkscape.h
#include <glib/gtypes.h>
struct SPDesktop;
-struct Document;
+struct SPDocument;
struct SPEventContext;
namespace Inkscape {
SPEventContext * inkscape_active_event_context (void);
#define SP_ACTIVE_DOCUMENT inkscape_active_document ()
-Document * inkscape_active_document (void);
+SPDocument * inkscape_active_document (void);
#define SP_ACTIVE_DESKTOP inkscape_active_desktop ()
SPDesktop * inkscape_active_desktop (void);
diff --git a/src/inkview.cpp b/src/inkview.cpp
index 0278d3029faaf0e860bd1d791279d9197b7c1f67..5cfde2c814a793d1365d32549300ff58394f4902 100644 (file)
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
int size;
int length;
int current;
- Document *doc;
+ SPDocument *doc;
GtkWidget *view;
GtkWidget *window;
bool fullscreen;
}
static void
-sp_svgview_set_document(struct SPSlideShow *ss, Document *doc, int current)
+sp_svgview_set_document(struct SPSlideShow *ss, SPDocument *doc, int current)
{
if (doc && doc != ss->doc) {
sp_document_ensure_up_to_date (doc);
{
sp_svgview_waiting_cursor(ss);
- Document *doc = NULL;
+ SPDocument *doc = NULL;
int current = ss->current;
while (!doc && (current < ss->length - 1)) {
doc = sp_document_new (ss->slides[++current], TRUE, false);
{
sp_svgview_waiting_cursor(ss);
- Document *doc = NULL;
+ SPDocument *doc = NULL;
int current = ss->current;
while (!doc && (current > 0)) {
doc = sp_document_new (ss->slides[--current], TRUE, false);
{
sp_svgview_waiting_cursor(ss);
- Document *doc = NULL;
+ SPDocument *doc = NULL;
int current = 0;
while ( !doc && (current < ss->length - 1)) {
if (current == ss->current)
{
sp_svgview_waiting_cursor(ss);
- Document *doc = NULL;
+ SPDocument *doc = NULL;
int current = ss->length - 1;
while (!doc && (current >= 0)) {
if (current == ss->current)
Inkscape::Application *inkscape_get_instance() { return NULL; }
void inkscape_ref (void) {}
void inkscape_unref (void) {}
-void inkscape_add_document (Document *document) {}
-void inkscape_remove_document (Document *document) {}
+void inkscape_add_document (SPDocument *document) {}
+void inkscape_remove_document (SPDocument *document) {}
#endif
diff --git a/src/interface.cpp b/src/interface.cpp
index 475ecdf16c3c04d713a4198a07edeb946ea59bac..cf70720649c1ff5b8bdc8e983b56f722e0cc2927 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
void
sp_ui_new_view()
{
- Document *document;
+ SPDocument *document;
SPViewWidget *dtw;
document = SP_ACTIVE_DOCUMENT;
void
sp_ui_new_view_preview()
{
- Document *document;
+ SPDocument *document;
SPViewWidget *dtw;
document = SP_ACTIVE_DOCUMENT;
guint /*event_time*/,
gpointer /*user_data*/)
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
switch (info) {
guint /*event_time*/,
gpointer /*user_data*/)
{
-// Document *doc = SP_ACTIVE_DOCUMENT;
+// SPDocument *doc = SP_ACTIVE_DOCUMENT;
// SPDesktop *desktop = SP_ACTIVE_DESKTOP;
static void
sp_ui_import_one_file(char const *filename)
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (!doc) return;
if (filename == NULL) return;
index 01087d04e8d6bebaec49b12d4cdc49e722e62ab9..66814c5cac767882a8b9ad97f1f1ab7033da30e1 100644 (file)
const Glib::ustring &name);
/**
- * Returns whether or not the given node is the root node of the Document associated
+ * Returns whether or not the given node is the root node of the SPDocument associated
* with an XMLNodeTracker's SessionManager.
*
* \param Reference to an XML::Node to test.
index b6d236be93210107680765b9fb1481f1d8a51a7b..a04ab05f00e39fa1f424141140e37e0e72260670 100644 (file)
SessionManager::initialiseSession(Glib::ustring const& to, State::SessionType type)
{
- Document* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", type, to);
+ SPDocument* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", type, to);
InkboardDocument* inkdoc = dynamic_cast< InkboardDocument* >(doc->rdoc);
if(inkdoc == NULL) return;
Dialog::DialogReply reply = static_cast< Dialog::DialogReply >(dialog.run());
- Document* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", State::WHITEBOARD_PEER, from);
+ SPDocument* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", State::WHITEBOARD_PEER, from);
InkboardDocument* inkdoc = dynamic_cast< InkboardDocument* >(doc->rdoc);
if(inkdoc == NULL) return true;
//# HELPER FUNCTIONS
//#########################################################################
-Document*
+SPDocument*
makeInkboardDocument(int code, gchar const* rootname, State::SessionType type, Glib::ustring const& to)
{
- Document* doc;
+ SPDocument* doc;
InkboardDocument* rdoc = new InkboardDocument(g_quark_from_static_string("xml"), type, to);
rdoc->setAttribute("version", "1.0");
@@ -382,7 +382,7 @@ makeInkboardDocument(int code, gchar const* rootname, State::SessionType type, G
//
// \see sp_file_new
SPDesktop*
-makeInkboardDesktop(Document* doc)
+makeInkboardDesktop(SPDocument* doc)
{
SPDesktop* dt;
index 48e912265faa7d46705e922ee75c594e2667b964..53cc8f5b4e53f71539800558a2064f45eb677853 100644 (file)
#include "gc-alloc.h"
-class Document;
+class SPDocument;
class SPDesktop;
};
-Document* makeInkboardDocument(int code, gchar const* rootname,
+SPDocument* makeInkboardDocument(int code, gchar const* rootname,
State::SessionType type, Glib::ustring const& to);
-SPDesktop* makeInkboardDesktop(Document* doc);
+SPDesktop* makeInkboardDesktop(SPDocument* doc);
} // namespace Whiteboard
diff --git a/src/layer-fns.cpp b/src/layer-fns.cpp
index 2431b07582500bf73eaa0c9a96180390d9fd70eb..75bb89bcf65f49f1d07d542a94839adc7f98f178 100644 (file)
--- a/src/layer-fns.cpp
+++ b/src/layer-fns.cpp
* \pre \a root should be either \a layer or an ancestor of it
*/
SPObject *create_layer(SPObject *root, SPObject *layer, LayerRelativePosition position) {
- Document *document=SP_OBJECT_DOCUMENT(root);
+ SPDocument *document=SP_OBJECT_DOCUMENT(root);
static int layer_suffix=1;
gchar *id=NULL;
diff --git a/src/layer-manager.cpp b/src/layer-manager.cpp
index fe0d4190484ee637ff9927f93250dd5344aa8ff7..8c45c7e53642fdebabb75b930ce24efb09909ab2 100644 (file)
--- a/src/layer-manager.cpp
+++ b/src/layer-manager.cpp
{
_layer_connection = desktop->connectCurrentLayerChanged( sigc::mem_fun(*this, &LayerManager::_selectedLayerChanged) );
- sigc::bound_mem_functor1<void, Inkscape::LayerManager, Document*> first = sigc::mem_fun(*this, &LayerManager::_setDocument);
+ sigc::bound_mem_functor1<void, Inkscape::LayerManager, SPDocument*> first = sigc::mem_fun(*this, &LayerManager::_setDocument);
// This next line has problems on gcc 4.0.2
- sigc::slot<void, Document*> base2 = first;
+ sigc::slot<void, SPDocument*> base2 = first;
- sigc::slot<void,SPDesktop*,Document*> slot2 = sigc::hide<0>( base2 );
+ sigc::slot<void,SPDesktop*,SPDocument*> slot2 = sigc::hide<0>( base2 );
_document_connection = desktop->connectDocumentReplaced( slot2 );
_setDocument(desktop->doc());
@@ -211,7 +211,7 @@ void LayerManager::renameLayer( SPObject* obj, gchar const *label, bool uniquify
-void LayerManager::_setDocument(Document *document) {
+void LayerManager::_setDocument(SPDocument *document) {
if (_document) {
_resource_connection.disconnect();
}
diff --git a/src/layer-manager.h b/src/layer-manager.h
index bbd5ccafbf40dfd63fc41182d0205ba0a0fa01ce..81f75e002aef5144ef16cbc8937a5a3d27b7ccb2 100644 (file)
--- a/src/layer-manager.h
+++ b/src/layer-manager.h
#include <map>
class SPDesktop;
-class Document;
+class SPDocument;
namespace Inkscape {
class LayerWatcher;
void _objectModified( SPObject* obj, guint flags );
- void _setDocument(Document *document);
+ void _setDocument(SPDocument *document);
void _rebuild();
void _selectedLayerChanged(SPObject *layer);
sigc::connection _resource_connection;
GC::soft_ptr<SPDesktop> _desktop;
- Document *_document;
+ SPDocument *_document;
std::vector<LayerWatcher*> _watchers;
index c34559a29f2a6728e6f7880c202cb4603ea981c6..49f954586058474feb1b9ec3f3f29ddaba37bf72 100644 (file)
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#else
-//--tullarisc # ifdef HAVE_STDINT_H
+# ifdef HAVE_STDINT_H
# include <stdint.h>
-//# endif
+# endif
#endif
// error codes (mostly obsolete)
index f92f7c2ab9949b96c40c3001ea5c9164f6d8cc6c..de0535448c4ead1a5f6f842f4bd05139fad94955 100644 (file)
}
void
-Effect::createAndApply(const char* name, Document *doc, SPItem *item)
+Effect::createAndApply(const char* name, SPDocument *doc, SPItem *item)
{
// Path effect definition
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
}
void
-Effect::createAndApply(EffectType type, Document *doc, SPItem *item)
+Effect::createAndApply(EffectType type, SPDocument *doc, SPItem *item)
{
createAndApply(LPETypeConverter.get_key(type).c_str(), doc, item);
}
return SP_OBJECT_REPR(lpeobj);
}
-Document *
+SPDocument *
Effect::getSPDoc()
{
if (SP_OBJECT_DOCUMENT(lpeobj) == NULL) g_message("Effect::getSPDoc() returns NULL");
index 461073c3fbfa7f6a66f2f712fa0a80c6f7d81e3e..6f195b176f3c2aa9d07fda335519789b081c12c9 100644 (file)
#define LPE_CONVERSION_TOLERANCE 0.01 // FIXME: find good solution for this.
-struct Document;
+struct SPDocument;
struct SPDesktop;
struct SPItem;
class SPNodeContext;
class Effect {
public:
static Effect* New(EffectType lpenr, LivePathEffectObject *lpeobj);
- static void createAndApply(const char* name, Document *doc, SPItem *item);
- static void createAndApply(EffectType type, Document *doc, SPItem *item);
+ static void createAndApply(const char* name, SPDocument *doc, SPItem *item);
+ static void createAndApply(EffectType type, SPDocument *doc, SPItem *item);
virtual ~Effect();
Glib::ustring getName();
Inkscape::XML::Node * getRepr();
- Document * getSPDoc();
+ SPDocument * getSPDoc();
LivePathEffectObject * getLPEObj() {return lpeobj;};
Parameter * getParameter(const char * key);
index c7ca5e4aab448e79a3dc54e3daf4db81af270801..ec0dee0beb1c5e41d9281efa2d9a28e9f939fdd7 100644 (file)
* Virtual build: set livepatheffect attributes from its associated XML node.
*/
void
-LivePathEffectObject::livepatheffect_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+LivePathEffectObject::livepatheffect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
#ifdef LIVEPATHEFFECT_VERBOSE
g_message("Build livepatheffect");
LivePathEffectObject::fork_private_if_necessary(unsigned int nr_of_allowed_users)
{
if (SP_OBJECT_HREFCOUNT(this) > nr_of_allowed_users) {
- Document *doc = SP_OBJECT_DOCUMENT(this);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(this);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = SP_OBJECT_REPR (this)->duplicate(xml_doc);
index 842b84c458021dc5aac5a1f5be693a4e683710f0..dc631a5c1d0e8374a0485e7b7da4dbaabd7ffaa1 100644 (file)
private:
static void livepatheffect_class_init(LivePathEffectObjectClass *klass);
static void livepatheffect_init(LivePathEffectObject *stop);
- static void livepatheffect_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+ static void livepatheffect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void livepatheffect_release(SPObject *object);
static void livepatheffect_set(SPObject *object, unsigned key, gchar const *value);
static Inkscape::XML::Node *livepatheffect_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
index 5f7cb02774e1219dd70019570abc3ea5a2df77df..be465e32469b1eaf08d7b63163844306dfe1848e 100644 (file)
--- a/src/lpe-tool-context.cpp
+++ b/src/lpe-tool-context.cpp
@@ -422,7 +422,7 @@ lpetool_context_switch_mode(SPLPEToolContext *lc, Inkscape::LivePathEffect::Effe
}
void
-lpetool_get_limiting_bbox_corners(Document *document, Geom::Point &A, Geom::Point &B) {
+lpetool_get_limiting_bbox_corners(SPDocument *document, Geom::Point &A, Geom::Point &B) {
Geom::Coord w = sp_document_width(document);
Geom::Coord h = sp_document_height(document);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (!prefs->getBool("/tools/lpetool/show_bbox", true))
return;
- Document *document = sp_desktop_document(lc->desktop);
+ SPDocument *document = sp_desktop_document(lc->desktop);
Geom::Point A, B;
lpetool_get_limiting_bbox_corners(document, A, B);
diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h
index f710e9321570b25f90d772a3407315b4bf4cb377..8a52ba97c70308ce7ef4a910bab4cf5e0eababc0 100644 (file)
--- a/src/lpe-tool-context.h
+++ b/src/lpe-tool-context.h
int lpetool_item_has_construction(SPLPEToolContext *lc, SPItem *item);
bool lpetool_try_construction(SPLPEToolContext *lc, Inkscape::LivePathEffect::EffectType const type);
void lpetool_context_switch_mode(SPLPEToolContext *lc, Inkscape::LivePathEffect::EffectType const type);
-void lpetool_get_limiting_bbox_corners(Document *document, Geom::Point &A, Geom::Point &B);
+void lpetool_get_limiting_bbox_corners(SPDocument *document, Geom::Point &A, Geom::Point &B);
void lpetool_context_reset_limiting_bbox(SPLPEToolContext *lc);
void lpetool_create_measuring_items(SPLPEToolContext *lc, Inkscape::Selection *selection = NULL);
void lpetool_delete_measuring_items(SPLPEToolContext *lc);
index 6ab1920956da4249b6008949733c2fd6dd74b9bc..dc59e1a9302af212f39b5c648dd9476dbee69023 100644 (file)
--- a/src/main-cmdlineact.cpp
+++ b/src/main-cmdlineact.cpp
SPDesktop * desktop = dynamic_cast<SPDesktop *>(view);
if (desktop == NULL) { return; }
- Document * doc = view->doc();
+ SPDocument * doc = view->doc();
SPObject * obj = doc->getObjectById(_arg);
if (obj == NULL) {
printf(_("Unable to find node ID: '%s'\n"), _arg);
diff --git a/src/main.cpp b/src/main.cpp
index 64fcb664dd431985aa5c35cbab3da214454d1dda..9c33688ed88ec1751a4e3b3a1d572c05699eaa1a 100644 (file)
--- a/src/main.cpp
+++ b/src/main.cpp
int sp_main_gui(int argc, char const **argv);
int sp_main_console(int argc, char const **argv);
-static void sp_do_export_png(Document *doc);
-static void do_export_ps_pdf(Document* doc, gchar const* uri, char const *mime);
+static void sp_do_export_png(SPDocument *doc);
+static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const *mime);
#ifdef WIN32
-static void do_export_emf(Document* doc, gchar const* uri, char const *mime);
+static void do_export_emf(SPDocument* doc, gchar const* uri, char const *mime);
#endif //WIN32
-static void do_query_dimension (Document *doc, bool extent, Geom::Dim2 const axis, const gchar *id);
-static void do_query_all (Document *doc);
+static void do_query_dimension (SPDocument *doc, bool extent, Geom::Dim2 const axis, const gchar *id);
+static void do_query_all (SPDocument *doc);
static void do_query_all_recurse (SPObject *o);
static gchar *sp_global_printer = NULL;
{
while (fl) {
const gchar *filename = (gchar *)fl->data;
- Document *doc = Inkscape::Extension::open(NULL, filename);
+ SPDocument *doc = Inkscape::Extension::open(NULL, filename);
if (doc == NULL) {
doc = Inkscape::Extension::open(Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG), filename);
}
}
static void
-do_query_dimension (Document *doc, bool extent, Geom::Dim2 const axis, const gchar *id)
+do_query_dimension (SPDocument *doc, bool extent, Geom::Dim2 const axis, const gchar *id)
{
SPObject *o = NULL;
@@ -1167,7 +1167,7 @@ do_query_dimension (Document *doc, bool extent, Geom::Dim2 const axis, const gch
}
static void
-do_query_all (Document *doc)
+do_query_all (SPDocument *doc)
{
SPObject *o = NULL;
static void
-sp_do_export_png(Document *doc)
+sp_do_export_png(SPDocument *doc)
{
const gchar *filename = NULL;
gdouble dpi = 0.0;
* \param mime MIME type to export as.
*/
-static void do_export_ps_pdf(Document* doc, gchar const* uri, char const* mime)
+static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const* mime)
{
Inkscape::Extension::DB::OutputList o;
Inkscape::Extension::db.get_output_list(o);
@@ -1507,7 +1507,7 @@ static void do_export_ps_pdf(Document* doc, gchar const* uri, char const* mime)
* \param mime MIME type to export as (should be "image/x-emf")
*/
-static void do_export_emf(Document* doc, gchar const* uri, char const* mime)
+static void do_export_emf(SPDocument* doc, gchar const* uri, char const* mime)
{
Inkscape::Extension::DB::OutputList o;
Inkscape::Extension::db.get_output_list(o);
diff --git a/src/marker.cpp b/src/marker.cpp
index 2efcde1b99e6b03b5c22192cfcfbc09c29939b73..c66acc1924f3869b67faad8373c2d36167292941 100644 (file)
--- a/src/marker.cpp
+++ b/src/marker.cpp
static void sp_marker_class_init (SPMarkerClass *klass);
static void sp_marker_init (SPMarker *marker);
-static void sp_marker_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_marker_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_marker_release (SPObject *object);
static void sp_marker_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_marker_update (SPObject *object, SPCtx *ctx, guint flags);
* \see sp_object_build()
*/
static void
-sp_marker_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_marker_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
SPGroup *group;
SPMarker *marker;
@@ -723,7 +723,7 @@ sp_marker_view_remove (SPMarker *marker, SPMarkerView *view, unsigned int destro
}
const gchar *
-generate_marker (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix /*transform*/, Geom::Matrix move)
+generate_marker (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix /*transform*/, Geom::Matrix move)
{
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
diff --git a/src/marker.h b/src/marker.h
index 5206a9c89c91f16e48ffd2aa4b96fa2bfa5c65d7..f2d74a3a699c230cb73bd8dab5e9bd0ee1cd76a8 100644 (file)
--- a/src/marker.h
+++ b/src/marker.h
unsigned int key, unsigned int pos,
Geom::Matrix const &base, float linewidth);
void sp_marker_hide (SPMarker *marker, unsigned int key);
-const gchar *generate_marker (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix transform, Geom::Matrix move);
+const gchar *generate_marker (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move);
#endif
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index e2c4f3fa3925d9f011f5d31b5fea80bcce56cb5f..f9a615583fa438c8689eaec09dfeabe9a88dc656 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
//FIXME: a closed path CAN legally have one node, it's only an open one which must be
//at least 2
sp_nodepath_get_node_count(nodepath) < 2) {
- Document *document = sp_desktop_document (nodepath->desktop);
+ SPDocument *document = sp_desktop_document (nodepath->desktop);
//FIXME: The following line will be wrong when we have mltiple nodepaths: we only want to
//delete this nodepath's object, not the entire selection! (though at this time, this
//does not matter)
// if the entire nodepath is removed, delete the selected object.
if (nodepath->subpaths == NULL ||
sp_nodepath_get_node_count(nodepath) < 2) {
- Document *document = sp_desktop_document (nodepath->desktop);
+ SPDocument *document = sp_desktop_document (nodepath->desktop);
sp_selection_delete(nodepath->desktop);
sp_document_done (document, SP_VERB_CONTEXT_NODE,
_("Delete nodes"));
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 3b5cd31364718eee2e84d029a2c2aee866a4045d..99ee78ade932963fbb01cabfca7e7f0411965935 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
sp_selected_path_combine(SPDesktop *desktop)
{
Inkscape::Selection *selection = sp_desktop_selection(desktop);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
if (g_slist_length((GSList *) selection->itemList()) < 1) {
sp_desktop_message_stack(desktop)->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to combine."));
@@ -328,7 +328,7 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec
items = items->next) {
SPItem *item = SP_ITEM(items->data);
- Document *document = item->document;
+ SPDocument *document = item->document;
if (SP_IS_PATH(item) && !SP_PATH(item)->original_curve) {
continue; // already a path, and no path effect
diff --git a/src/persp3d.cpp b/src/persp3d.cpp
index 978a8952cd80066b6f2271466d396c796c4c2b85..916e9f25f421fe071452b070e4088abfb2cf9bdf 100644 (file)
--- a/src/persp3d.cpp
+++ b/src/persp3d.cpp
static void persp3d_class_init(Persp3DClass *klass);
static void persp3d_init(Persp3D *stop);
-static void persp3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void persp3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void persp3d_release(SPObject *object);
static void persp3d_set(SPObject *object, unsigned key, gchar const *value);
static void persp3d_update(SPObject *object, SPCtx *ctx, guint flags);
/**
* Virtual build: set persp3d attributes from its associated XML node.
*/
-static void persp3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void persp3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) persp3d_parent_class)->build)
(* ((SPObjectClass *) persp3d_parent_class)->build)(object, document, repr);
}
Persp3D *
-persp3d_create_xml_element (Document *document, Persp3D *dup) {// if dup is given, copy the attributes over
+persp3d_create_xml_element (SPDocument *document, Persp3D *dup) {// if dup is given, copy the attributes over
SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
Inkscape::XML::Node *repr;
@@ -240,7 +240,7 @@ persp3d_create_xml_element (Document *document, Persp3D *dup) {// if dup is give
}
Persp3D *
-persp3d_document_first_persp (Document *document) {
+persp3d_document_first_persp (SPDocument *document) {
SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document);
Inkscape::XML::Node *repr;
for (SPObject *child = sp_object_first_child(defs); child != NULL; child = SP_OBJECT_NEXT(child) ) {
}
void
-persp3d_print_debugging_info_all(Document *document) {
+persp3d_print_debugging_info_all(SPDocument *document) {
SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document);
Inkscape::XML::Node *repr;
for (SPObject *child = sp_object_first_child(defs); child != NULL; child = SP_OBJECT_NEXT(child) ) {
diff --git a/src/persp3d.h b/src/persp3d.h
index cbad0b87372b01e62b1caa383b9755cfdd5428c2..79bec0232c5372465266a04e90924ade2e8e1481 100644 (file)
--- a/src/persp3d.h
+++ b/src/persp3d.h
// Also write the list of boxes into the xml repr and vice versa link boxes to their persp3d?
std::vector<SPBox3D *> boxes;
std::map<SPBox3D *, bool>* boxes_transformed; // TODO: eventually we should merge this with 'boxes'
- Document *document; // should this rather be the SPDesktop?
+ SPDocument *document; // should this rather be the SPDesktop?
// for debugging only
int my_counter;
bool persp3d_perspectives_coincide(const Persp3D *lhs, const Persp3D *rhs);
void persp3d_absorb(Persp3D *persp1, Persp3D *persp2);
-Persp3D * persp3d_create_xml_element (Document *document, Persp3D *dup = NULL);
-Persp3D * persp3d_document_first_persp (Document *document);
+Persp3D * persp3d_create_xml_element (SPDocument *document, Persp3D *dup = NULL);
+Persp3D * persp3d_document_first_persp (SPDocument *document);
bool persp3d_has_all_boxes_in_selection (Persp3D *persp);
std::map<Persp3D *, std::list<SPBox3D *> > persp3d_unselected_boxes(Inkscape::Selection *selection);
void persp3d_split_perspectives_according_to_selection(Inkscape::Selection *selection);
void persp3d_print_debugging_info (Persp3D *persp);
-void persp3d_print_debugging_info_all(Document *doc);
+void persp3d_print_debugging_info_all(SPDocument *doc);
void persp3d_print_all_selected();
#endif /* __PERSP3D_H__ */
diff --git a/src/print.cpp b/src/print.cpp
index 7fbaa53e998e619f7d38190841df958032cba5d5..044dffe345102d60d107d37b61756d11cf7827de 100644 (file)
--- a/src/print.cpp
+++ b/src/print.cpp
/* UI */
void
-sp_print_preview_document(Document *doc)
+sp_print_preview_document(SPDocument *doc)
{
Inkscape::Extension::Print *mod;
unsigned int ret;
}
void
-sp_print_document(Gtk::Window& parentWindow, Document *doc)
+sp_print_document(Gtk::Window& parentWindow, SPDocument *doc)
{
sp_document_ensure_up_to_date(doc);
}
void
-sp_print_document_to_file(Document *doc, gchar const *filename)
+sp_print_document_to_file(SPDocument *doc, gchar const *filename)
{
Inkscape::Extension::Print *mod;
SPPrintContext context;
diff --git a/src/print.h b/src/print.h
index 11efced7bc38c6ce01d459ae72da5ed7bae32703..577a169cf819ebdbebce3f13226559ab30399fe3 100644 (file)
--- a/src/print.h
+++ b/src/print.h
/* UI */
-void sp_print_preview_document(Document *doc);
-void sp_print_document(Gtk::Window& parentWindow, Document *doc);
-void sp_print_document_to_file(Document *doc, gchar const *filename);
+void sp_print_preview_document(SPDocument *doc);
+void sp_print_document(Gtk::Window& parentWindow, SPDocument *doc);
+void sp_print_document_to_file(SPDocument *doc, gchar const *filename);
#endif /* !PRINT_H_INKSCAPE */
index 75fd12e4b559685c3b12b7b5aa03cf032e00a290..1cd965e390b526d89318918dd7569dfdaec4a049 100644 (file)
--- a/src/profile-manager.cpp
+++ b/src/profile-manager.cpp
namespace Inkscape {
-ProfileManager::ProfileManager(Document *document) :
+ProfileManager::ProfileManager(SPDocument *document) :
_doc(document),
_knownProfiles()
{
diff --git a/src/profile-manager.h b/src/profile-manager.h
index d72ad3dd8cf768a21e2f36de9afb7c9082b8a6b3..61e22615fd080d270876b40df97d024aa78e8296 100644 (file)
--- a/src/profile-manager.h
+++ b/src/profile-manager.h
#include "gc-finalized.h"
#include <vector>
-class Document;
+class SPDocument;
namespace Inkscape {
public GC::Finalized
{
public:
- ProfileManager(Document *document);
+ ProfileManager(SPDocument *document);
~ProfileManager();
ColorProfile* find(gchar const* name);
void _resourcesChanged();
- Document* _doc;
+ SPDocument* _doc;
sigc::connection _resource_connection;
std::vector<SPObject*> _knownProfiles;
};
diff --git a/src/rdf.cpp b/src/rdf.cpp
index 5559526f16dc68290a4a0f15cd4469c340e06c92..f0b1749229ae515454eb9b06f4b2482f426cb656 100644 (file)
--- a/src/rdf.cpp
+++ b/src/rdf.cpp
// set document's title element to the RDF title
if (!strcmp(entity->name, "title")) {
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if(doc && doc->root) doc->root->setTitle(text);
}
}
Inkscape::XML::Node *
-rdf_get_rdf_root_repr ( Document * doc, bool build )
+rdf_get_rdf_root_repr ( SPDocument * doc, bool build )
{
g_return_val_if_fail (doc != NULL, NULL);
g_return_val_if_fail (doc->rroot != NULL, NULL);
}
Inkscape::XML::Node *
-rdf_get_xml_repr( Document * doc, gchar const * name, bool build )
+rdf_get_xml_repr( SPDocument * doc, gchar const * name, bool build )
{
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (doc != NULL, NULL);
}
Inkscape::XML::Node *
-rdf_get_work_repr( Document * doc, gchar const * name, bool build )
+rdf_get_work_repr( SPDocument * doc, gchar const * name, bool build )
{
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (doc != NULL, NULL);
*
*/
const gchar *
-rdf_get_work_entity(Document * doc, struct rdf_work_entity_t * entity)
+rdf_get_work_entity(SPDocument * doc, struct rdf_work_entity_t * entity)
{
g_return_val_if_fail (doc != NULL, NULL);
if ( entity == NULL ) return NULL;
*
*/
unsigned int
-rdf_set_work_entity(Document * doc, struct rdf_work_entity_t * entity,
+rdf_set_work_entity(SPDocument * doc, struct rdf_work_entity_t * entity,
const gchar * text)
{
g_return_val_if_fail ( entity != NULL, 0 );
@@ -918,7 +918,7 @@ rdf_match_license(Inkscape::XML::Node const *repr, struct rdf_license_t const *l
*
*/
struct rdf_license_t *
-rdf_get_license(Document * document)
+rdf_get_license(SPDocument * document)
{
Inkscape::XML::Node const *repr = rdf_get_xml_repr ( document, XML_TAG_NAME_LICENSE, FALSE );
if (repr) {
*
*/
void
-rdf_set_license(Document * doc, struct rdf_license_t const * license)
+rdf_set_license(SPDocument * doc, struct rdf_license_t const * license)
{
// drop old license section
Inkscape::XML::Node * repr = rdf_get_xml_repr ( doc, XML_TAG_NAME_LICENSE, FALSE );
};
void
-rdf_set_defaults ( Document * doc )
+rdf_set_defaults ( SPDocument * doc )
{
g_assert ( doc != NULL );
diff --git a/src/rdf.h b/src/rdf.h
index 57ae79cb887fcf789bbac935c8d77a34b9a0aaec..a98f5a1e474b43354585e2824fd81cae46df07fd 100644 (file)
--- a/src/rdf.h
+++ b/src/rdf.h
struct rdf_work_entity_t * rdf_find_entity(gchar const * name);
-const gchar * rdf_get_work_entity(Document * doc,
+const gchar * rdf_get_work_entity(SPDocument * doc,
struct rdf_work_entity_t * entity);
-unsigned int rdf_set_work_entity(Document * doc,
+unsigned int rdf_set_work_entity(SPDocument * doc,
struct rdf_work_entity_t * entity,
const gchar * text);
-struct rdf_license_t * rdf_get_license(Document * doc);
-void rdf_set_license(Document * doc,
+struct rdf_license_t * rdf_get_license(SPDocument * doc);
+void rdf_set_license(SPDocument * doc,
struct rdf_license_t const * license);
-void rdf_set_defaults ( Document * doc );
+void rdf_set_defaults ( SPDocument * doc );
#endif // _RDF_H_
index 0e2fe43d1accc85a66b777de1e268f9b7efce278..e55bba2a5926079ef2e3a2fd99f300d7b8e791c2 100644 (file)
@@ -139,7 +139,7 @@ void sp_selection_copy_impl(GSList const *items, GSList **clip, Inkscape::XML::D
g_slist_free((GSList *) sorted_items);
}
-GSList *sp_selection_paste_impl(Document *doc, SPObject *parent, GSList **clip)
+GSList *sp_selection_paste_impl(SPDocument *doc, SPObject *parent, GSList **clip)
{
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
if (desktop == NULL)
return;
- Document *doc = desktop->doc();
+ SPDocument *doc = desktop->doc();
Inkscape::XML::Document* xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (!dt)
return;
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
sp_desktop_selection(dt)->clear();
g_return_if_fail(SP_IS_GROUP(dt->currentLayer()));
if (desktop == NULL)
return;
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (desktop == NULL)
return;
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty()) {
if (desktop == NULL)
return;
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty()) {
}
void
-sp_undo(SPDesktop *desktop, Document *)
+sp_undo(SPDesktop *desktop, SPDocument *)
{
if (!sp_document_undo(sp_desktop_document(desktop)))
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing to undo."));
}
void
-sp_redo(SPDesktop *desktop, Document *)
+sp_redo(SPDesktop *desktop, SPDocument *)
{
if (!sp_document_redo(sp_desktop_document(desktop)))
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing to redo."));
void
sp_selection_item_prev(SPDesktop *desktop)
{
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
g_return_if_fail(document != NULL);
g_return_if_fail(desktop != NULL);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (desktop == NULL)
return;
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (desktop == NULL)
return;
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
// we need to copy the list because it gets reset when objects are deleted
GSList *items = g_slist_copy((GSList *) selection->itemList());
if (desktop == NULL)
return;
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (desktop == NULL)
return;
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
@@ -2457,7 +2457,7 @@ sp_selection_get_export_hints(Inkscape::Selection *selection, char const **filen
}
void
-sp_document_get_export_hints(Document *doc, char const **filename, float *xdpi, float *ydpi)
+sp_document_get_export_hints(SPDocument *doc, char const **filename, float *xdpi, float *ydpi)
{
Inkscape::XML::Node * repr = sp_document_repr_root(doc);
gchar const *dpi_string;
if (desktop == NULL)
return;
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
@@ -2697,7 +2697,7 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la
if (desktop == NULL)
return;
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (desktop == NULL)
return;
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
fit_canvas_to_selection(SPDesktop *desktop)
{
g_return_val_if_fail(desktop != NULL, false);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
g_return_val_if_fail(doc != NULL, false);
g_return_val_if_fail(desktop->selection != NULL, false);
}
bool
-fit_canvas_to_drawing(Document *doc)
+fit_canvas_to_drawing(SPDocument *doc)
{
g_return_val_if_fail(doc != NULL, false);
void fit_canvas_to_selection_or_drawing(SPDesktop *desktop) {
g_return_if_fail(desktop != NULL);
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
g_return_if_fail(doc != NULL);
g_return_if_fail(desktop->selection != NULL);
index 4a8c8901e8c2f2c3cc014dd402d5b270bfea7f88..67e772a00999a39043b891b53e538e28d6caead4 100644 (file)
void scroll_to_show_item(SPDesktop *desktop, SPItem *item);
-void sp_undo (SPDesktop *desktop, Document *doc);
-void sp_redo (SPDesktop *desktop, Document *doc);
+void sp_undo (SPDesktop *desktop, SPDocument *doc);
+void sp_redo (SPDesktop *desktop, SPDocument *doc);
void sp_selection_get_export_hints (Inkscape::Selection *selection, const char **filename, float *xdpi, float *ydpi);
-void sp_document_get_export_hints (Document * doc, const char **filename, float *xdpi, float *ydpi);
+void sp_document_get_export_hints (SPDocument * doc, const char **filename, float *xdpi, float *ydpi);
void sp_selection_create_bitmap_copy (SPDesktop *desktop);
bool fit_canvas_to_selection(SPDesktop *);
void verb_fit_canvas_to_selection(SPDesktop *);
-bool fit_canvas_to_drawing(Document *);
+bool fit_canvas_to_drawing(SPDocument *);
void verb_fit_canvas_to_drawing(SPDesktop *);
void fit_canvas_to_selection_or_drawing(SPDesktop *);
diff --git a/src/snap.cpp b/src/snap.cpp
index 48f3a8fea26a10b2217d3f6aa39b283e21e6aedb..f0769e0a1ad1903326446d38f50986fa7d4bc5f1 100644 (file)
--- a/src/snap.cpp
+++ b/src/snap.cpp
_guide_to_ignore = guide_to_ignore;
}
-Document *SnapManager::getDocument() const
+SPDocument *SnapManager::getDocument() const
{
return _named_view->document;
}
diff --git a/src/snap.h b/src/snap.h
index 18820f78e852e66b2d60d1f1a86d1f65ebcc22a0..e621bdb605334cb1b1e0fa4619368d2c09ca69f4 100644 (file)
--- a/src/snap.h
+++ b/src/snap.h
SPDesktop const *getDesktop() const {return _desktop;}
SPNamedView const *getNamedView() const {return _named_view;}
- Document *getDocument() const;
+ SPDocument *getDocument() const;
SPGuide const *getGuideToIgnore() const {return _guide_to_ignore;}
bool getSnapIndicator() const {return _snapindicator;}
diff --git a/src/sp-anchor.cpp b/src/sp-anchor.cpp
index ec1b4e53f38b96113c24654ca681fd8d851f7913..aabefdfdb4cfe14d87607bd310b746fcad061e11 100644 (file)
--- a/src/sp-anchor.cpp
+++ b/src/sp-anchor.cpp
static void sp_anchor_class_init(SPAnchorClass *ac);
static void sp_anchor_init(SPAnchor *anchor);
-static void sp_anchor_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_anchor_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_anchor_release(SPObject *object);
static void sp_anchor_set(SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_anchor_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
anchor->href = NULL;
}
-static void sp_anchor_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_anchor_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
diff --git a/src/sp-animation.cpp b/src/sp-animation.cpp
index b5f0e8605f37ea417dda596a76ee695a7acc4f8a..2d9f2e94191478e4377bc9267025da0b1b63739e 100644 (file)
--- a/src/sp-animation.cpp
+++ b/src/sp-animation.cpp
static void sp_animation_class_init(SPAnimationClass *klass);
static void sp_animation_init(SPAnimation *animation);
-static void sp_animation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_animation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_animation_release(SPObject *object);
static void sp_animation_set(SPObject *object, unsigned int key, gchar const *value);
static void
-sp_animation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_animation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) animation_parent_class)->build)
((SPObjectClass *) animation_parent_class)->build(object, document, repr);
static void sp_ianimation_class_init(SPIAnimationClass *klass);
static void sp_ianimation_init(SPIAnimation *animation);
-static void sp_ianimation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_ianimation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_ianimation_release(SPObject *object);
static void sp_ianimation_set(SPObject *object, unsigned int key, gchar const *value);
static void
-sp_ianimation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_ianimation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) ianimation_parent_class)->build)
((SPObjectClass *) ianimation_parent_class)->build(object, document, repr);
static void sp_animate_class_init(SPAnimateClass *klass);
static void sp_animate_init(SPAnimate *animate);
-static void sp_animate_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_animate_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_animate_release(SPObject *object);
static void sp_animate_set(SPObject *object, unsigned int key, gchar const *value);
static void
-sp_animate_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_animate_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) animate_parent_class)->build)
((SPObjectClass *) animate_parent_class)->build(object, document, repr);
diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp
index 1dab31e3442c663a2ec5e3d9617ab9ce09741326..4bbabc965fbaf3360018461fe9bec96615e81192 100644 (file)
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
static void sp_clippath_class_init(SPClipPathClass *klass);
static void sp_clippath_init(SPClipPath *clippath);
-static void sp_clippath_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_clippath_release(SPObject * object);
static void sp_clippath_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_clippath_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
}
static void
-sp_clippath_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build(object, document, repr);
// Create a mask element (using passed elements), add it to <defs>
const gchar *
-sp_clippath_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform)
+sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform)
{
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
diff --git a/src/sp-clippath.h b/src/sp-clippath.h
index d6a4e6f0b8b39f1bc13b04047fe9358260b36078..199b29f3b3f279e72cb5cbdc9dd90321e73f6693 100644 (file)
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
void sp_clippath_set_bbox(SPClipPath *cp, unsigned int key, NRRect *bbox);
void sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);
-const gchar *sp_clippath_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform);
+const gchar *sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform);
#endif
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 2847d23e9d342a8ca8f14230d2d82873856810e0..ff2e3904437961c62e8f6481a4cb7e12ad9c323e 100644 (file)
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
@@ -366,7 +366,7 @@ static Inkscape::XML::Node *sp_genericellipse_write(SPObject *object, Inkscape::
static void sp_ellipse_class_init(SPEllipseClass *klass);
static void sp_ellipse_init(SPEllipse *ellipse);
-static void sp_ellipse_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_ellipse_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *sp_ellipse_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_ellipse_set(SPObject *object, unsigned int key, gchar const *value);
static gchar *sp_ellipse_description(SPItem *item);
}
static void
-sp_ellipse_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_ellipse_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) ellipse_parent_class)->build)
(* ((SPObjectClass *) ellipse_parent_class)->build) (object, document, repr);
@@ -513,7 +513,7 @@ sp_ellipse_position_set(SPEllipse *ellipse, gdouble x, gdouble y, gdouble rx, gd
static void sp_circle_class_init(SPCircleClass *klass);
static void sp_circle_init(SPCircle *circle);
-static void sp_circle_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_circle_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *sp_circle_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_circle_set(SPObject *object, unsigned int key, gchar const *value);
static gchar *sp_circle_description(SPItem *item);
}
static void
-sp_circle_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_circle_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) circle_parent_class)->build)
(* ((SPObjectClass *) circle_parent_class)->build)(object, document, repr);
static void sp_arc_class_init(SPArcClass *klass);
static void sp_arc_init(SPArc *arc);
-static void sp_arc_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_arc_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *sp_arc_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_arc_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_arc_modified(SPObject *object, guint flags);
}
static void
-sp_arc_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_arc_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) arc_parent_class)->build)
(* ((SPObjectClass *) arc_parent_class)->build) (object, document, repr);
index e090a27b2ad30a3f1881924f1d28180d855ea1d2..77325c4b11fa9041d2b79ccd8857e167aaff569d 100644 (file)
static void sp_filter_primitive_class_init(SPFilterPrimitiveClass *klass);
static void sp_filter_primitive_init(SPFilterPrimitive *filter_primitive);
-static void sp_filter_primitive_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_filter_primitive_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_filter_primitive_release(SPObject *object);
static void sp_filter_primitive_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_filter_primitive_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_filter_primitive_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_filter_primitive_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) filter_primitive_parent_class)->build) {
((SPObjectClass *) filter_primitive_parent_class)->build(object, document, repr);
index 31ef5ef11a60432b2abfde506ae919fe6923adab..216ff1d6f7a8bc10c57be0ac948a262209222edc 100644 (file)
class SPFilterReference : public Inkscape::URIReference {
public:
SPFilterReference(SPObject *obj) : URIReference(obj) {}
- SPFilterReference(Document *doc) : URIReference(doc) {}
+ SPFilterReference(SPDocument *doc) : URIReference(doc) {}
SPFilter *getObject() const {
return (SPFilter *)URIReference::getObject();
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 7c819af1fed3609a6f168c01a2152efc45abdbe5..7197c1ec93539c53810f0d0db80ac58703a24882 100644 (file)
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
static void sp_filter_class_init(SPFilterClass *klass);
static void sp_filter_init(SPFilter *filter);
-static void sp_filter_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_filter_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_filter_release(SPObject *object);
static void sp_filter_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_filter_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_filter_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_filter_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) filter_parent_class)->build) {
((SPObjectClass *) filter_parent_class)->build(object, document, repr);
diff --git a/src/sp-flowdiv.cpp b/src/sp-flowdiv.cpp
index 78aab7cb347a9733f009011341dd6e530a9f2cb0..6d679701fdc098836244aa32d3a4be38644d7c79 100644 (file)
--- a/src/sp-flowdiv.cpp
+++ b/src/sp-flowdiv.cpp
static Inkscape::XML::Node *sp_flowdiv_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_flowdiv_update (SPObject *object, SPCtx *ctx, unsigned int flags);
static void sp_flowdiv_modified (SPObject *object, guint flags);
-static void sp_flowdiv_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr);
+static void sp_flowdiv_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
static void sp_flowdiv_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_flowtspan_class_init (SPFlowtspanClass *klass);
static Inkscape::XML::Node *sp_flowtspan_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_flowtspan_update (SPObject *object, SPCtx *ctx, unsigned int flags);
static void sp_flowtspan_modified (SPObject *object, guint flags);
-static void sp_flowtspan_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr);
+static void sp_flowtspan_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
static void sp_flowtspan_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_flowpara_class_init (SPFlowparaClass *klass);
static Inkscape::XML::Node *sp_flowpara_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_flowpara_update (SPObject *object, SPCtx *ctx, unsigned int flags);
static void sp_flowpara_modified (SPObject *object, guint flags);
-static void sp_flowpara_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr);
+static void sp_flowpara_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
static void sp_flowpara_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_flowline_class_init (SPFlowlineClass *klass);
}
static void
-sp_flowdiv_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_flowdiv_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
{
object->_requireSVGVersion(Inkscape::Version(1, 2));
}
}
static void
-sp_flowtspan_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_flowtspan_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) flowtspan_parent_class)->build)
((SPObjectClass *) flowtspan_parent_class)->build (object, doc, repr);
}
}
static void
-sp_flowpara_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_flowpara_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) flowpara_parent_class)->build)
((SPObjectClass *) flowpara_parent_class)->build (object, doc, repr);
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index ff4a2fda54cedeae9a19d952a1db59a13674d1ab..6af2f7169eaf3c9eb34ed451470c0d9ee4fa0aa1 100644 (file)
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
static void sp_flowtext_update(SPObject *object, SPCtx *ctx, guint flags);
static void sp_flowtext_modified(SPObject *object, guint flags);
static Inkscape::XML::Node *sp_flowtext_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static void sp_flowtext_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_flowtext_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_flowtext_set(SPObject *object, unsigned key, gchar const *value);
static void sp_flowtext_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);
}
static void
-sp_flowtext_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_flowtext_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
object->_requireSVGVersion(Inkscape::Version(1, 2));
SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p0, Geom::Point p1)
{
- Document *doc = sp_desktop_document (desktop);
+ SPDocument *doc = sp_desktop_document (desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *root_repr = xml_doc->createElement("svg:flowRoot");
diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp
index 166262bc92a70a994e811b35092ec5a34318ccd6..1ec6f4601b90e3a389e7c09c215af002eea7aa6d 100644 (file)
--- a/src/sp-font-face.cpp
+++ b/src/sp-font-face.cpp
static void sp_fontface_class_init(SPFontFaceClass *fc);
static void sp_fontface_init(SPFontFace *font);
-static void sp_fontface_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_fontface_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_fontface_release(SPObject *object);
static void sp_fontface_set(SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_fontface_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
*/
}
-static void sp_fontface_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_fontface_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
diff --git a/src/sp-font.cpp b/src/sp-font.cpp
index c960d0fe9c8bd760c4792676fa93cf1bde2ae7e0..75fb186383a56bb64449f01852d9e6c409329762 100644 (file)
--- a/src/sp-font.cpp
+++ b/src/sp-font.cpp
static void sp_font_class_init(SPFontClass *fc);
static void sp_font_init(SPFont *font);
-static void sp_font_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_font_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_font_release(SPObject *object);
static void sp_font_set(SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_font_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
font->vert_adv_y = 0;
}
-static void sp_font_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_font_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
index 8544e03fee126c19f42ca967b45af55c0ec04d4f..e6eab5032264c454b762b7029d827e2c2bf4b719 100644 (file)
--- a/src/sp-gaussian-blur.cpp
+++ b/src/sp-gaussian-blur.cpp
static void sp_gaussianBlur_class_init(SPGaussianBlurClass *klass);
static void sp_gaussianBlur_init(SPGaussianBlur *gaussianBlur);
-static void sp_gaussianBlur_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_gaussianBlur_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_gaussianBlur_release(SPObject *object);
static void sp_gaussianBlur_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_gaussianBlur_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_gaussianBlur_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_gaussianBlur_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) gaussianBlur_parent_class)->build) {
((SPObjectClass *) gaussianBlur_parent_class)->build(object, document, repr);
index 7b61f1c3da5ce884a6c35506a14915f84e0659e9..6d08f212cea1318cb9ad2a6037dc06aadca59072 100644 (file)
--- a/src/sp-glyph-kerning.cpp
+++ b/src/sp-glyph-kerning.cpp
static void sp_glyph_kerning_class_init(SPGlyphKerningClass *gc);
static void sp_glyph_kerning_init(SPGlyphKerning *glyph);
-static void sp_glyph_kerning_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_glyph_kerning_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_glyph_kerning_release(SPObject *object);
static void sp_glyph_kerning_set(SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_glyph_kerning_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
glyph->k = 0;
}
-static void sp_glyph_kerning_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_glyph_kerning_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
diff --git a/src/sp-glyph.cpp b/src/sp-glyph.cpp
index 6102954f23fe6965a5371dcf16ec4ba15e08a5e8..8af78a0aaf55111113cd1f056e2a98ac5036b454 100644 (file)
--- a/src/sp-glyph.cpp
+++ b/src/sp-glyph.cpp
static void sp_glyph_class_init(SPGlyphClass *gc);
static void sp_glyph_init(SPGlyph *glyph);
-static void sp_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_glyph_release(SPObject *object);
static void sp_glyph_set(SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_glyph_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
glyph->vert_adv_y = 0;
}
-static void sp_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
diff --git a/src/sp-gradient-test.h b/src/sp-gradient-test.h
index 1771b7c3e6628da94202adaa74b10bc3c6792b21..bc188401bec90b927341ce6dd155c1ed8632a1ff 100644 (file)
--- a/src/sp-gradient-test.h
+++ b/src/sp-gradient-test.h
class SPGradientTest : public DocumentUsingTest
{
public:
- Document* _doc;
+ SPDocument* _doc;
SPGradientTest() :
_doc(0)
diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp
index c9ceeabf003c649399cea08da2b0933dd2462cb3..84a0a98704315228b655e8b80268a47726069a72 100644 (file)
--- a/src/sp-gradient.cpp
+++ b/src/sp-gradient.cpp
static void sp_stop_class_init(SPStopClass *klass);
static void sp_stop_init(SPStop *stop);
-static void sp_stop_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_stop_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_stop_set(SPObject *object, unsigned key, gchar const *value);
static Inkscape::XML::Node *sp_stop_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
/**
* Virtual build: set stop attributes from its associated XML node.
*/
-static void sp_stop_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_stop_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) stop_parent_class)->build)
(* ((SPObjectClass *) stop_parent_class)->build)(object, document, repr);
static void sp_gradient_class_init(SPGradientClass *klass);
static void sp_gradient_init(SPGradient *gr);
-static void sp_gradient_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_gradient_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_gradient_release(SPObject *object);
static void sp_gradient_set(SPObject *object, unsigned key, gchar const *value);
static void sp_gradient_child_added(SPObject *object,
* Virtual build: set gradient attributes from its associated repr.
*/
static void
-sp_gradient_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_gradient_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
SPGradient *gradient = SP_GRADIENT(object);
static void sp_lineargradient_init(SPLinearGradient *lg);
static void sp_lineargradient_build(SPObject *object,
- Document *document,
+ SPDocument *document,
Inkscape::XML::Node *repr);
static void sp_lineargradient_set(SPObject *object, unsigned key, gchar const *value);
static Inkscape::XML::Node *sp_lineargradient_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr,
* Callback: set attributes from associated repr.
*/
static void sp_lineargradient_build(SPObject *object,
- Document *document,
+ SPDocument *document,
Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) lg_parent_class)->build)
static void sp_radialgradient_init(SPRadialGradient *rg);
static void sp_radialgradient_build(SPObject *object,
- Document *document,
+ SPDocument *document,
Inkscape::XML::Node *repr);
static void sp_radialgradient_set(SPObject *object, unsigned key, gchar const *value);
static Inkscape::XML::Node *sp_radialgradient_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr,
* Set radial gradient attributes from associated repr.
*/
static void
-sp_radialgradient_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_radialgradient_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) rg_parent_class)->build)
(* ((SPObjectClass *) rg_parent_class)->build)(object, document, repr);
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp
index 170dfa37593669c80ecd652a5d789f160bbcda44..f5edf7d97cf3a63baf9820d97bf57822ae640f1b 100644 (file)
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
static void sp_guide_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void sp_guide_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_guide_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_guide_release(SPObject *object);
static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value);
@@ -152,7 +152,7 @@ static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value,
}
}
-static void sp_guide_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_guide_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
(* ((SPObjectClass *) (parent_class))->build)(object, document, repr);
@@ -243,7 +243,7 @@ static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value)
SPGuide *
sp_guide_create(SPDesktop *desktop, Geom::Point const &pt1, Geom::Point const &pt2) {
- Document *doc=sp_desktop_document(desktop);
+ SPDocument *doc=sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = xml_doc->createElement("sodipodi:guide");
@@ -269,7 +269,7 @@ sp_guide_pt_pairs_to_guides(SPDesktop *dt, std::list<std::pair<Geom::Point, Geom
void
sp_guide_create_guides_around_page(SPDesktop *dt) {
- Document *doc=sp_desktop_document(dt);
+ SPDocument *doc=sp_desktop_document(dt);
std::list<std::pair<Geom::Point, Geom::Point> > pts;
Geom::Point A(0, 0);
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index 5284bb92324685456797efa3d93775b9885d56ef..65aad1e2d097a30f0e20df76275becc1ce5386c0 100644 (file)
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
static void sp_image_class_init (SPImageClass * klass);
static void sp_image_init (SPImage * image);
-static void sp_image_build (SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_image_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static void sp_image_release (SPObject * object);
static void sp_image_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_image_update (SPObject *object, SPCtx *ctx, unsigned int flags);
}
static void
-sp_image_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_image_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build) {
((SPObjectClass *) parent_class)->build (object, document, repr);
sp_image_update (SPObject *object, SPCtx *ctx, unsigned int flags)
{
SPImage *image = SP_IMAGE(object);
- Document *doc = SP_OBJECT_DOCUMENT(object);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(object);
if (((SPObjectClass *) (parent_class))->update) {
((SPObjectClass *) (parent_class))->update (object, ctx, flags);
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index f9570a885dbe7cdaa26eb31adf06cc12db020065..9c19ce75a1a9839509f4ad38c9cea83f39eabda4 100644 (file)
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
static void sp_group_class_init (SPGroupClass *klass);
static void sp_group_init (SPGroup *group);
-static void sp_group_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_group_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_group_release(SPObject *object);
static void sp_group_dispose(GObject *object);
new (&group->_display_modes) std::map<unsigned int, SPGroup::LayerMode>();
}
-static void sp_group_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_group_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
sp_object_read_attr(object, "inkscape:groupmode");
g_return_if_fail (group != NULL);
g_return_if_fail (SP_IS_GROUP (group));
- Document *doc = SP_OBJECT_DOCUMENT (group);
+ SPDocument *doc = SP_OBJECT_DOCUMENT (group);
SPObject *root = SP_DOCUMENT_ROOT (doc);
SPObject *defs = SP_OBJECT (SP_ROOT (root)->defs);
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 16efe677f39d1731ead7dd30c86fa4d38a8a4919..662dc1cac7370d3007ac135aace282407e0905d5 100644 (file)
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
static void sp_item_class_init(SPItemClass *klass);
static void sp_item_init(SPItem *item);
-static void sp_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_item_release(SPObject *object);
static void sp_item_set(SPObject *object, unsigned key, gchar const *value);
static void sp_item_update(SPObject *object, SPCtx *ctx, guint flags);
}
static void
-sp_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
sp_object_read_attr(object, "style");
sp_object_read_attr(object, "transform");
diff --git a/src/sp-line.cpp b/src/sp-line.cpp
index 36ac643ec6c31c234c449348817affcb0118f898..d0ce32397d7ffe801b0447c7c5c8b39a902a42c7 100644 (file)
--- a/src/sp-line.cpp
+++ b/src/sp-line.cpp
static void sp_line_class_init (SPLineClass *klass);
static void sp_line_init (SPLine *line);
-static void sp_line_build (SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_line_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static void sp_line_set (SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_line_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void
-sp_line_build (SPObject * object, Document * document, Inkscape::XML::Node * repr)
+sp_line_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr)
{
if (((SPObjectClass *) parent_class)->build) {
((SPObjectClass *) parent_class)->build (object, document, repr);
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index fdf348b78a7a022f075c5104a079b2d184f73578..90e9b2d6d62e18057b40c46c71177d811b5362ef 100644 (file)
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
static void sp_lpe_item_init(SPLPEItem *lpe_item);
static void sp_lpe_item_finalize(GObject *object);
-static void sp_lpe_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_lpe_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_lpe_item_release(SPObject *object);
static void sp_lpe_item_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_lpe_item_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_lpe_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_lpe_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
sp_object_read_attr(object, "inkscape:path-effect");
diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp
index 12876d69af352f7352a3af1aebbdb0b4b12ac6ee..20cb38297c126fd07e93a27c1e6687accfc21575 100644 (file)
--- a/src/sp-mask.cpp
+++ b/src/sp-mask.cpp
static void sp_mask_class_init (SPMaskClass *klass);
static void sp_mask_init (SPMask *mask);
-static void sp_mask_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_mask_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_mask_release (SPObject * object);
static void sp_mask_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_mask_child_added (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
}
static void
-sp_mask_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_mask_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build) {
((SPObjectClass *) parent_class)->build (object, document, repr);
@@ -270,7 +270,7 @@ sp_mask_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML
// Create a mask element (using passed elements), add it to <defs>
const gchar *
-sp_mask_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform)
+sp_mask_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform)
{
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
diff --git a/src/sp-mask.h b/src/sp-mask.h
index 293be8cee6df1e15bc412b0c34926e8e8b3e956e..d5bddd332861f2f18efdbe0e3b4d8013ce1013ea 100644 (file)
--- a/src/sp-mask.h
+++ b/src/sp-mask.h
void sp_mask_set_bbox (SPMask *mask, unsigned int key, NRRect *bbox);
-const gchar *sp_mask_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform);
+const gchar *sp_mask_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform);
#endif
diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp
index 1b9be018898f5d5b7107d20b2880394a0f8161d6..920b7d64dbb5458a1ef4d8f731c6748d3175bd07 100644 (file)
--- a/src/sp-metadata.cpp
+++ b/src/sp-metadata.cpp
static void sp_metadata_class_init (SPMetadataClass *klass);
static void sp_metadata_init (SPMetadata *metadata);
-static void sp_metadata_build (SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_metadata_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static void sp_metadata_release (SPObject *object);
static void sp_metadata_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_metadata_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_metadata_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
using Inkscape::XML::NodeSiblingIterator;
@@ -207,7 +207,7 @@ sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML:
* \brief Retrieves the metadata object associated with a document
*/
SPMetadata *
-sp_document_metadata (Document *document)
+sp_document_metadata (SPDocument *document)
{
SPObject *nv;
diff --git a/src/sp-metadata.h b/src/sp-metadata.h
index 1de4634796545f8a5b673330aa4caa0f2639d0ee..82b7c4fc5dff2eeb35d89269d65409347d2a13af 100644 (file)
--- a/src/sp-metadata.h
+++ b/src/sp-metadata.h
GType sp_metadata_get_type (void);
-SPMetadata * sp_document_metadata (Document *document);
+SPMetadata * sp_document_metadata (SPDocument *document);
#endif
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
index 4b120717a4ea1468ef2fcb5f28d5a577e860bb6a..ffc29a71ed45ff9c622f15d02c069d57d5343b71 100644 (file)
--- a/src/sp-missing-glyph.cpp
+++ b/src/sp-missing-glyph.cpp
static void sp_missing_glyph_class_init(SPMissingGlyphClass *gc);
static void sp_missing_glyph_init(SPMissingGlyph *glyph);
-static void sp_missing_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_missing_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_missing_glyph_release(SPObject *object);
static void sp_missing_glyph_set(SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_missing_glyph_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
glyph->vert_adv_y = 0;
}
-static void sp_missing_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_missing_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 4def33f759ebd856537461b708fcc19e357ed427..47720c5d64f12fb9409e1f74aa7a537b457d0fe8 100644 (file)
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
static void sp_namedview_class_init(SPNamedViewClass *klass);
static void sp_namedview_init(SPNamedView *namedview);
-static void sp_namedview_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_namedview_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_namedview_release(SPObject *object);
static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *value);
static void sp_namedview_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
new (&nv->snap_manager) SnapManager(nv);
}
-static void sp_namedview_generate_old_grid(SPNamedView * /*nv*/, Document *document, Inkscape::XML::Node *repr) {
+static void sp_namedview_generate_old_grid(SPNamedView * /*nv*/, SPDocument *document, Inkscape::XML::Node *repr) {
bool old_grid_settings_present = false;
// set old settings
@@ -208,7 +208,7 @@ static void sp_namedview_generate_old_grid(SPNamedView * /*nv*/, Document *docum
}
}
-static void sp_namedview_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_namedview_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
SPNamedView *nv = (SPNamedView *) object;
SPObjectGroup *og = (SPObjectGroup *) object;
void sp_namedview_update_layers_from_document (SPDesktop *desktop)
{
SPObject *layer = NULL;
- Document *document = desktop->doc();
+ SPDocument *document = desktop->doc();
SPNamedView *nv = desktop->namedview;
if ( nv->default_layer_id != 0 ) {
layer = document->getObjectById(g_quark_to_string(nv->default_layer_id));
}
}
-void sp_namedview_toggle_guides(Document *doc, Inkscape::XML::Node *repr)
+void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr)
{
unsigned int v;
unsigned int set = sp_repr_get_boolean(repr, "showguides", &v);
@@ -900,7 +900,7 @@ void sp_namedview_show_grids(SPNamedView * namedview, bool show, bool dirty_docu
{
namedview->grids_visible = show;
- Document *doc = SP_OBJECT_DOCUMENT (namedview);
+ SPDocument *doc = SP_OBJECT_DOCUMENT (namedview);
Inkscape::XML::Node *repr = SP_OBJECT_REPR(namedview);
bool saved = sp_document_get_undo_sensitive(doc);
return TRUE;
}
-SPNamedView *sp_document_namedview(Document *document, const gchar *id)
+SPNamedView *sp_document_namedview(SPDocument *document, const gchar *id)
{
g_return_val_if_fail(document != NULL, NULL);
diff --git a/src/sp-namedview.h b/src/sp-namedview.h
index 450e80d47c5528d3b1ce291219c1337943b7521b..048096d8c0096e569761f332afb9f0d51be03425 100644 (file)
--- a/src/sp-namedview.h
+++ b/src/sp-namedview.h
GType sp_namedview_get_type();
-SPNamedView *sp_document_namedview(Document *document, gchar const *name);
+SPNamedView *sp_document_namedview(SPDocument *document, gchar const *name);
void sp_namedview_window_from_document(SPDesktop *desktop);
void sp_namedview_document_from_window(SPDesktop *desktop);
void sp_namedview_update_layers_from_document (SPDesktop *desktop);
-void sp_namedview_toggle_guides(Document *doc, Inkscape::XML::Node *repr);
+void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr);
void sp_namedview_show_grids(SPNamedView *namedview, bool show, bool dirty_document);
Inkscape::CanvasGrid * sp_namedview_get_first_enabled_grid(SPNamedView *namedview);
diff --git a/src/sp-object-repr.cpp b/src/sp-object-repr.cpp
index 7583049dcceca82578afcf6aa7ab2d2edc65f23c..4c3d5196ee2c4de5bb3753ca8ce46d17f94e4e79 100644 (file)
--- a/src/sp-object-repr.cpp
+++ b/src/sp-object-repr.cpp
* Construct an SPRoot and all its descendents from the given repr.
*/
SPObject *
-sp_object_repr_build_tree(Document *document, Inkscape::XML::Node *repr)
+sp_object_repr_build_tree(SPDocument *document, Inkscape::XML::Node *repr)
{
g_assert(document != NULL);
g_assert(repr != NULL);
diff --git a/src/sp-object-repr.h b/src/sp-object-repr.h
index 5a6b1772fd8bcbc49f1d4696399871582c174ce2..f3a80f83c77a1259279d1f3b99dfd85b08a3828c 100644 (file)
--- a/src/sp-object-repr.h
+++ b/src/sp-object-repr.h
}
-SPObject *sp_object_repr_build_tree (Document *document, Inkscape::XML::Node *repr);
+SPObject *sp_object_repr_build_tree (SPDocument *document, Inkscape::XML::Node *repr);
GType sp_repr_type_lookup (Inkscape::XML::Node *repr);
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index fade379bd1a6470fb026ca3bacd24e2babafd0a0..85e8a4e9ab4ad8898967f1de925bd74da2dbcb97 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
* propagate to the SPRepr layer. This is important for implementation of
* the undo stack, animations and other features.
*
- * SPObjects are bound to the higher-level container Document, which
+ * SPObjects are bound to the higher-level container SPDocument, which
* provides document level functionality such as the undo stack,
* dictionary and so on. Source: doc/architecture.txt
*/
static void sp_object_order_changed(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref);
static void sp_object_release(SPObject *object);
-static void sp_object_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_object_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_object_private_set(SPObject *object, unsigned int key, gchar const *value);
static Inkscape::XML::Node *sp_object_private_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
@@ -783,11 +783,11 @@ static void sp_object_order_changed(SPObject *object, Inkscape::XML::Node *child
* the document and repr; implementation then will parse all of the attributes,
* generate the children objects and so on. Invoking build on the SPRoot
* object results in creation of the whole document tree (this is, what
- * Document does after the creation of the XML tree).
+ * SPDocument does after the creation of the XML tree).
* \see sp_object_release()
*/
static void
-sp_object_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_object_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
/* Nothing specific here */
debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object));
@@ -809,7 +809,7 @@ sp_object_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
}
void
-sp_object_invoke_build(SPObject *object, Document *document, Inkscape::XML::Node *repr, unsigned int cloned)
+sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned)
{
debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object));
switch (key) {
case SP_ATTR_ID:
if ( !SP_OBJECT_IS_CLONED(object) && object->repr->type() == Inkscape::XML::ELEMENT_NODE ) {
- Document *document=object->document;
+ SPDocument *document=object->document;
SPObject *conflict=NULL;
gchar const *new_id = value;
diff --git a/src/sp-object.h b/src/sp-object.h
index 9a4f8fd4d29397d7a574fff354ccba94404373c0..bbb8ecbd0a2d096e14baa0ccffaad3c75dec5f6c 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 */
- Inkscape::XML::Document *document; /* Document we are part of */
+ SPDocument *document; /* Document we are part of */
SPObject *parent; /* Our parent (only one allowed) */
SPObject *children; /* Our children */
SPObject *_last_child; /* Remembered last child */
/** @brief Updates the object's display immediately
*
- * This method is called during the idle loop by Document in order to update the object's
+ * This method is called during the idle loop by SPDocument in order to update the object's
* display.
*
* One additional flag is legal here:
struct SPObjectClass {
GObjectClass parent_class;
- void (* build) (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr);
+ void (* build) (SPObject *object, SPDocument *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::DocumentTree *doc, Inkscape::XML::Node *repr, unsigned int flags);
+ Inkscape::XML::Node * (* write) (SPObject *object, Inkscape::XML::Document *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, Inkscape::XML::Document *document, Inkscape::XML::Node *repr, unsigned int cloned);
+void sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned);
void sp_object_set(SPObject *object, unsigned int key, gchar const *value);
diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp
index 12e98d5efe564dc73ca17529189c2da514d135b8..ae0f7bf19ea48bebe09cc7ccf91f12f6958aff74 100644 (file)
--- a/src/sp-offset.cpp
+++ b/src/sp-offset.cpp
#include "xml/repr.h"
-class Document;
+class SPDocument;
#define noOFFSET_VERBOSE
static void sp_offset_init (SPOffset * offset);
static void sp_offset_finalize(GObject *obj);
-static void sp_offset_build (SPObject * object, Document * document,
+static void sp_offset_build (SPObject * object, SPDocument * document,
Inkscape::XML::Node * repr);
static Inkscape::XML::Node *sp_offset_write (SPObject * object, Inkscape::XML::Document *doc, Inkscape::XML::Node * repr,
guint flags);
* Virtual build: set offset attributes from corresponding repr.
*/
static void
-sp_offset_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_offset_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
diff --git a/src/sp-paint-server.h b/src/sp-paint-server.h
index 0402ac3ce47359f2410092720eec410b30dc93f7..998f1556bf9d29f17df364850a2970121d061def 100644 (file)
--- a/src/sp-paint-server.h
+++ b/src/sp-paint-server.h
class SPPaintServerReference : public Inkscape::URIReference {
public:
SPPaintServerReference (SPObject *obj) : URIReference(obj) {}
- SPPaintServerReference (Document *doc) : URIReference(doc) {}
+ SPPaintServerReference (SPDocument *doc) : URIReference(doc) {}
SPPaintServer *getObject() const {
return (SPPaintServer *)URIReference::getObject();
}
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index b6637e9d1633c2413ec88ead13b7b2069448eb12..04ad386d9a0fb18cf63726c96d3d9b8397452abe 100644 (file)
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
static void sp_path_finalize(GObject *obj);
static void sp_path_release(SPObject *object);
-static void sp_path_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_path_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_path_set(SPObject *object, unsigned key, gchar const *value);
static Inkscape::XML::Node *sp_path_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
* fill & style attributes, markers, and CSS properties.
*/
static void
-sp_path_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_path_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
/* Are these calls actually necessary? */
sp_object_read_attr(object, "marker");
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index 60d2254f77756ab61dd3d258244105c0a37fa184..90af65b97cb8f3c072509d3268c272497a71d72d 100644 (file)
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
static void sp_pattern_class_init (SPPatternClass *klass);
static void sp_pattern_init (SPPattern *gr);
-static void sp_pattern_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_pattern_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_pattern_release (SPObject *object);
static void sp_pattern_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_pattern_child_added (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
}
static void
-sp_pattern_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_pattern_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) pattern_parent_class)->build)
(* ((SPObjectClass *) pattern_parent_class)->build) (object, document, repr);
SPPattern *
pattern_chain (SPPattern *pattern)
{
- Document *document = SP_OBJECT_DOCUMENT (pattern);
+ SPDocument *document = SP_OBJECT_DOCUMENT (pattern);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
@@ -496,7 +496,7 @@ sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool se
}
const gchar *
-pattern_tile (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix transform, Geom::Matrix move)
+pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move)
{
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
diff --git a/src/sp-pattern.h b/src/sp-pattern.h
index 48c4504256374edb9940526c6ad49ed126ca9753..f15285e277cd545791cde08ec1c3327263539ee0 100644 (file)
--- a/src/sp-pattern.h
+++ b/src/sp-pattern.h
SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property);
void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool set);
-const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix transform, Geom::Matrix move);
+const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move);
SPPattern *pattern_getroot (SPPattern *pat);
diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp
index 0f9003f341112a782e5f48afc8dc49e69ffea517..014c68c9b75652ba8af992a904325b2c0daca8db 100644 (file)
--- a/src/sp-polygon.cpp
+++ b/src/sp-polygon.cpp
static void sp_polygon_class_init(SPPolygonClass *pc);
static void sp_polygon_init(SPPolygon *polygon);
-static void sp_polygon_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_polygon_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static gchar *sp_polygon_description(SPItem *item);
/* Nothing here */
}
-static void sp_polygon_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+static void sp_polygon_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build) {
((SPObjectClass *) parent_class)->build(object, document, repr);
diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp
index ff7951992ce6db1242f0ec6470372618d16cad7d..08f446d6124a5685c228de1c09e218ba46f2e33b 100644 (file)
--- a/src/sp-polyline.cpp
+++ b/src/sp-polyline.cpp
static void sp_polyline_class_init (SPPolyLineClass *klass);
static void sp_polyline_init (SPPolyLine *polyline);
-static void sp_polyline_build (SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_polyline_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static void sp_polyline_set (SPObject *object, unsigned int key, const gchar *value);
static Inkscape::XML::Node *sp_polyline_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
}
static void
-sp_polyline_build (SPObject * object, Document * document, Inkscape::XML::Node * repr)
+sp_polyline_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr)
{
if (((SPObjectClass *) parent_class)->build)
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index 6e4b515c04181b22edada78fe067bcb4425d3db4..aa026abb3eab890ab17824a6b3a06fd275de0661 100644 (file)
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
static void sp_rect_class_init(SPRectClass *klass);
static void sp_rect_init(SPRect *rect);
-static void sp_rect_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_rect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_rect_set(SPObject *object, unsigned key, gchar const *value);
static void sp_rect_update(SPObject *object, SPCtx *ctx, guint flags);
static Inkscape::XML::Node *sp_rect_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
}
static void
-sp_rect_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_rect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build(object, document, repr);
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index e06405df53791cf28227672a6ecc0f419356292a..bd935074dec47dfba5663dbf6a68aebcdf5348c5 100644 (file)
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
static void sp_root_class_init(SPRootClass *klass);
static void sp_root_init(SPRoot *root);
-static void sp_root_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_root_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_root_release(SPObject *object);
static void sp_root_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_root_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
* It then calls the object's parent class object's build function.
*/
static void
-sp_root_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_root_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
SPGroup *group = (SPGroup *) object;
SPRoot *root = (SPRoot *) object;
diff --git a/src/sp-script.cpp b/src/sp-script.cpp
index d495ac51fdb7ee0b814d66e9d4f0b57837923773..a4013245003c339ea3b91e47e177921cdfae84e7 100644 (file)
--- a/src/sp-script.cpp
+++ b/src/sp-script.cpp
static void sp_script_update(SPObject *object, SPCtx *ctx, guint flags);
static void sp_script_modified(SPObject *object, guint flags);
static void sp_script_set(SPObject *object, unsigned int key, gchar const *value);
-static void sp_script_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_script_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *sp_script_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static SPObjectClass *parent_class;
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_script_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_script_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build) {
((SPObjectClass *) parent_class)->build(object, document, repr);
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index 638d2b0404b37b698a5b4b29db4b5a7f29396621..e7ded6303def093aa92ef19fde99c71245600482 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
static void sp_shape_init (SPShape *shape);
static void sp_shape_finalize (GObject *object);
-static void sp_shape_build (SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_shape_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static void sp_shape_release (SPObject *object);
static void sp_shape_set(SPObject *object, unsigned key, gchar const *value);
* \see sp_object_build()
*/
static void
-sp_shape_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_shape_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
(*((SPObjectClass *) (parent_class))->build) (object, document, repr);
diff --git a/src/sp-skeleton.cpp b/src/sp-skeleton.cpp
index b92f738dbd3c5fbe939eb985e58098751cf510ea..ec6c9b437534b6b30bdb96f57200f613eb270b36 100644 (file)
--- a/src/sp-skeleton.cpp
+++ b/src/sp-skeleton.cpp
static void sp_skeleton_class_init(SPSkeletonClass *klass);
static void sp_skeleton_init(SPSkeleton *skeleton);
-static void sp_skeleton_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_skeleton_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_skeleton_release(SPObject *object);
static void sp_skeleton_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_skeleton_update(SPObject *object, SPCtx *ctx, guint flags);
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
-sp_skeleton_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_skeleton_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
debug("0x%p",object);
if (((SPObjectClass *) skeleton_parent_class)->build) {
diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp
index f0f95fb9c6852044d6b87693901236d735529451..71906fcc0c3b65d394e6333dd163c7640a7ddaed 100644 (file)
--- a/src/sp-spiral.cpp
+++ b/src/sp-spiral.cpp
static void sp_spiral_class_init (SPSpiralClass *klass);
static void sp_spiral_init (SPSpiral *spiral);
-static void sp_spiral_build (SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_spiral_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static Inkscape::XML::Node *sp_spiral_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_spiral_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_spiral_update (SPObject *object, SPCtx *ctx, guint flags);
* Virtual build: set spiral properties from corresponding repr.
*/
static void
-sp_spiral_build (SPObject * object, Document * document, Inkscape::XML::Node * repr)
+sp_spiral_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr)
{
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
diff --git a/src/sp-star.cpp b/src/sp-star.cpp
index 88b24aa77aa842a137f40bffe5507536ceaade73..71c9ad1c72d47bc17513335be25baf65d8c064c7 100644 (file)
--- a/src/sp-star.cpp
+++ b/src/sp-star.cpp
static void sp_star_class_init (SPStarClass *klass);
static void sp_star_init (SPStar *star);
-static void sp_star_build (SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_star_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static Inkscape::XML::Node *sp_star_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_star_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_star_update (SPObject *object, SPCtx *ctx, guint flags);
}
static void
-sp_star_build (SPObject * object, Document * document, Inkscape::XML::Node * repr)
+sp_star_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr)
{
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
diff --git a/src/sp-string.cpp b/src/sp-string.cpp
index a1a974310afccd7768847d952380ad2c4b6f1150..871338ad599ef44c0990f42b462182863cad18c3 100644 (file)
--- a/src/sp-string.cpp
+++ b/src/sp-string.cpp
static void sp_string_class_init(SPStringClass *classname);
static void sp_string_init(SPString *string);
-static void sp_string_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_string_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_string_release(SPObject *object);
static void sp_string_read_content(SPObject *object);
static void sp_string_update(SPObject *object, SPCtx *ctx, unsigned flags);
}
static void
-sp_string_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_string_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
{
sp_string_read_content(object);
index 75e2d450c1848af766534b408e1ecdb395dac2df..6e24ee28c4b0abff1c0b4a7d6c0acfc94e16a881 100644 (file)
--- a/src/sp-style-elem-test.h
+++ b/src/sp-style-elem-test.h
class SPStyleElemTest : public CxxTest::TestSuite
{
public:
- Document* _doc;
+ SPDocument* _doc;
SPStyleElemTest() :
_doc(0)
diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp
index 1becc422162a694d3bce51a84b906978d78f849a..46c311920708dd6cebf0c3cbd87854efc3675c3b 100644 (file)
--- a/src/sp-style-elem.cpp
+++ b/src/sp-style-elem.cpp
static void sp_style_elem_init(SPStyleElem *style_elem);
static void sp_style_elem_class_init(SPStyleElemClass *klass);
-static void sp_style_elem_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr);
+static void sp_style_elem_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
static void sp_style_elem_set(SPObject *object, unsigned const key, gchar const *const value);
static void sp_style_elem_read_content(SPObject *);
static Inkscape::XML::Node *sp_style_elem_write(SPObject *, Inkscape::XML::Document *, Inkscape::XML::Node *, guint flags);
}
static void
-sp_style_elem_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_style_elem_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
sp_style_elem_read_content(object);
diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp
index 8b176fb0a5bc5ba799e75f318f560cc5f8695824..41004db6e37154db0e98ae5ae6f687d2dc2af5ae 100644 (file)
--- a/src/sp-symbol.cpp
+++ b/src/sp-symbol.cpp
static void sp_symbol_class_init (SPSymbolClass *klass);
static void sp_symbol_init (SPSymbol *symbol);
-static void sp_symbol_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_symbol_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_symbol_release (SPObject *object);
static void sp_symbol_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_symbol_child_added (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
}
static void
-sp_symbol_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_symbol_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
SPGroup *group;
SPSymbol *symbol;
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index 325b3b381e3132659c61bdd5ebe9d5705c0062d3..61947311c4995155f4de67629d5afa665bfac99a 100644 (file)
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
static void sp_text_init (SPText *text);
static void sp_text_release (SPObject *object);
-static void sp_text_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_text_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_text_set (SPObject *object, unsigned key, gchar const *value);
static void sp_text_child_added (SPObject *object, Inkscape::XML::Node *rch, Inkscape::XML::Node *ref);
static void sp_text_remove_child (SPObject *object, Inkscape::XML::Node *rch);
}
static void
-sp_text_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_text_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
{
sp_object_read_attr(object, "x");
sp_object_read_attr(object, "y");
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 5323cde846df9189fd8c9c5327d9ab2a0b4f1224..83f9ecfa6e3cf2f8a1b9d98a432789fa7449c3a2 100644 (file)
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
static void sp_tref_init(SPTRef *tref);
static void sp_tref_finalize(GObject *obj);
-static void sp_tref_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_tref_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_tref_release(SPObject *object);
static void sp_tref_set(SPObject *object, unsigned int key, gchar const *value);
static void sp_tref_update(SPObject *object, SPCtx *ctx, guint flags);
* Reads the Inkscape::XML::Node, and initializes SPTRef variables.
*/
static void
-sp_tref_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_tref_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) tref_parent_class)->build) {
((SPObjectClass *) tref_parent_class)->build(object, document, repr);
Inkscape::XML::Node *tref_repr = SP_OBJECT_REPR(tref);
Inkscape::XML::Node *tref_parent = sp_repr_parent(tref_repr);
- Document *document = SP_OBJECT(tref)->document;
+ SPDocument *document = SP_OBJECT(tref)->document;
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
Inkscape::XML::Node *new_tspan_repr = xml_doc->createElement("svg:tspan");
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index a35ceae72e5140b7d0c48d1962b9b27631d62297..89a86218efb37d0318ce3a0d35505ad8a4ab9ab4 100644 (file)
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
static void sp_tspan_class_init(SPTSpanClass *classname);
static void sp_tspan_init(SPTSpan *tspan);
-static void sp_tspan_build(SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_tspan_build(SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static void sp_tspan_release(SPObject *object);
static void sp_tspan_set(SPObject *object, unsigned key, gchar const *value);
static void sp_tspan_update(SPObject *object, SPCtx *ctx, guint flags);
}
static void
-sp_tspan_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_tspan_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
{
//SPTSpan *tspan = SP_TSPAN(object);
static void sp_textpath_init(SPTextPath *textpath);
static void sp_textpath_finalize(GObject *obj);
-static void sp_textpath_build(SPObject * object, Document * document, Inkscape::XML::Node * repr);
+static void sp_textpath_build(SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static void sp_textpath_release(SPObject *object);
static void sp_textpath_set(SPObject *object, unsigned key, gchar const *value);
static void sp_textpath_update(SPObject *object, SPCtx *ctx, guint flags);
}
static void
-sp_textpath_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_textpath_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
{
//SPTextPath *textpath = SP_TEXTPATH(object);
diff --git a/src/sp-use.cpp b/src/sp-use.cpp
index 5e3c7ee10e7f148d1cd1610434418ce67f1d1825..76930086cc64dae64d4ccb1a492a43a9a368ec44 100644 (file)
--- a/src/sp-use.cpp
+++ b/src/sp-use.cpp
static void sp_use_init(SPUse *use);
static void sp_use_finalize(GObject *obj);
-static void sp_use_build(SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_use_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_use_release(SPObject *object);
static void sp_use_set(SPObject *object, unsigned key, gchar const *value);
static Inkscape::XML::Node *sp_use_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
}
static void
-sp_use_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_use_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) parent_class)->build) {
(* ((SPObjectClass *) parent_class)->build)(object, document, repr);
if (!repr) return NULL;
Inkscape::XML::Node *parent = sp_repr_parent(repr);
- Document *document = SP_OBJECT(use)->document;
+ SPDocument *document = SP_OBJECT(use)->document;
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
// Track the ultimate source of a chain of uses.
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 87f3dd890c372a84dcda793b3d1e5a9b5d4cf299..feba2cab6b0ee522b2cd5f02f8f4e5699520c082 100644 (file)
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -602,7 +602,7 @@ sp_selected_path_boolop(SPDesktop *desktop, bool_op bop, const unsigned int verb
static
void sp_selected_path_outline_add_marker( SPObject *marker_object, Geom::Matrix marker_transform,
Geom::Scale stroke_scale, Geom::Matrix transform,
- Inkscape::XML::Node *g_repr, Inkscape::XML::Document *xml_doc, Document * doc )
+ Inkscape::XML::Node *g_repr, Inkscape::XML::Document *xml_doc, SPDocument * doc )
{
SPMarker* marker = SP_MARKER (marker_object);
SPItem* marker_item = sp_item_first_item_child (SP_OBJECT (marker_object));
if (res->descr_cmd.size() > 1) { // if there's 0 or 1 node left, drop this path altogether
- Document * doc = sp_desktop_document(desktop);
+ SPDocument * doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
diff --git a/src/style-test.h b/src/style-test.h
index 7ebbf08be9ea0f9166b3622af7e4e34199aacdb5..a2d5fcf24459bdcf7aa4d2b56495811cf654300d 100644 (file)
--- a/src/style-test.h
+++ b/src/style-test.h
class StyleTest : public CxxTest::TestSuite
{
public:
- Document* _doc;
+ SPDocument* _doc;
StyleTest() :
_doc(0)
diff --git a/src/style.cpp b/src/style.cpp
index e564aa60b3b3adeea9d3abeb9eb5b3410be7dd0a..dd81692823123f0b45c055ebe1da5f0cb3af22ca 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
static void sp_style_read_ilength(SPILength *val, gchar const *str);
static void sp_style_read_ilengthornormal(SPILengthOrNormal *val, gchar const *str);
static void sp_style_read_itextdecoration(SPITextDecoration *val, gchar const *str);
-static void sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document);
-static void sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document);
+static void sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document);
+static void sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document);
static void sp_style_read_ifontsize(SPIFontSize *val, gchar const *str);
-static void sp_style_read_ifilter(gchar const *str, SPStyle *style, Document *document);
+static void sp_style_read_ifilter(gchar const *str, SPStyle *style, SPDocument *document);
static void sp_style_read_penum(SPIEnum *val, Inkscape::XML::Node *repr, gchar const *key, SPStyleEnum const *dict, bool can_explicitly_inherit);
static void sp_style_read_plength(SPILength *val, Inkscape::XML::Node *repr, gchar const *key);
@@ -443,7 +443,7 @@ sp_style_stroke_paint_server_ref_changed(SPObject *old_ref, SPObject *ref, SPSty
* Returns a new SPStyle object with settings as per sp_style_clear().
*/
SPStyle *
-sp_style_new(Document *document)
+sp_style_new(SPDocument *document)
{
SPStyle *const style = g_new0(SPStyle, 1);
break;
}
case SP_PROP_MARKER:
- /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */
+ /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
/* style->marker[SP_MARKER_LOC] = g_quark_from_string(val); */
if (!style->marker[SP_MARKER_LOC].set) {
g_free(style->marker[SP_MARKER_LOC].value);
break;
case SP_PROP_MARKER_START:
- /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */
+ /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
if (!style->marker[SP_MARKER_LOC_START].set) {
g_free(style->marker[SP_MARKER_LOC_START].value);
style->marker[SP_MARKER_LOC_START].value = g_strdup(val);
}
break;
case SP_PROP_MARKER_MID:
- /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */
+ /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
if (!style->marker[SP_MARKER_LOC_MID].set) {
g_free(style->marker[SP_MARKER_LOC_MID].value);
style->marker[SP_MARKER_LOC_MID].value = g_strdup(val);
}
break;
case SP_PROP_MARKER_END:
- /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */
+ /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
if (!style->marker[SP_MARKER_LOC_END].set) {
g_free(style->marker[SP_MARKER_LOC_END].value);
style->marker[SP_MARKER_LOC_END].value = g_strdup(val);
@@ -2111,7 +2111,7 @@ sp_style_merge_from_dying_parent(SPStyle *const style, SPStyle const *const pare
static void
-sp_style_set_ipaint_to_uri(SPStyle *style, SPIPaint *paint, const Inkscape::URI *uri, Document *document)
+sp_style_set_ipaint_to_uri(SPStyle *style, SPIPaint *paint, const Inkscape::URI *uri, SPDocument *document)
{
// it may be that this style's SPIPaint has not yet created its URIReference;
// now that we have a document, we can create it here
/** \todo fixme: Do that text manipulation via parents */
SPObject *object = style->object;
- Document *document = style->document;
+ SPDocument *document = style->document;
gint const refcount = style->refcount;
SPTextStyle *text = style->text;
unsigned const text_private = style->text_private;
* \param document Ignored
*/
static void
-sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document)
+sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document)
{
(void)style; // TODO
(void)document; // TODO
@@ -3114,7 +3114,7 @@ sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, Document
* \pre paint == \&style.fill || paint == \&style.stroke.
*/
static void
-sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document)
+sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document)
{
while (g_ascii_isspace(*str)) {
++str;
* Set SPIFilter object from string.
*/
static void
-sp_style_read_ifilter(gchar const *str, SPStyle * style, Document *document)
+sp_style_read_ifilter(gchar const *str, SPStyle * style, SPDocument *document)
{
SPIFilter *f = &(style->filter);
/* Try all possible values: inherit, none, uri */
diff --git a/src/style.h b/src/style.h
index 87d427547c193d2cac51622e93149857914e286b..d5ccc4901ac5553d0fe6c29db161d30894a43d77 100644 (file)
--- a/src/style.h
+++ b/src/style.h
/** Object we are attached to */
SPObject *object;
/** Document we are associated with */
- Document *document;
+ SPDocument *document;
/** Our text style component */
SPTextStyle *text;
const gchar *getStrokeURI() {if (stroke.value.href) return stroke.value.href->getURI()->toString(); else return NULL;}
};
-SPStyle *sp_style_new(Document *document);
+SPStyle *sp_style_new(SPDocument *document);
SPStyle *sp_style_new_from_object(SPObject *object);
index 5c33075c9b24fc0502857676b0a1b5dd65f2ce65..10d9976566f04a3fed2b3b6f720a35e7e8504939 100644 (file)
--- a/src/svg-view-widget.cpp
+++ b/src/svg-view-widget.cpp
@@ -205,7 +205,7 @@ sp_svg_view_widget_view_resized (SPViewWidget *vw, Inkscape::UI::View::View */*v
* Constructs new SPSVGSPViewWidget object and returns pointer to it.
*/
GtkWidget *
-sp_svg_view_widget_new (Document *doc)
+sp_svg_view_widget_new (SPDocument *doc)
{
GtkWidget *widget;
diff --git a/src/svg-view-widget.h b/src/svg-view-widget.h
index 9f6410f67c294f1a76595b9490d6973390c2af78..cd609b07ac2432a44a509fba01d23d986594d37f 100644 (file)
--- a/src/svg-view-widget.h
+++ b/src/svg-view-widget.h
#include "display/display-forward.h"
#include "ui/view/view-widget.h"
-class Document;
+class SPDocument;
class SPSVGSPViewWidget;
class SPSVGSPViewWidgetClass;
GtkType sp_svg_view_widget_get_type (void);
-GtkWidget *sp_svg_view_widget_new (Document *doc);
+GtkWidget *sp_svg_view_widget_new (SPDocument *doc);
void sp_svg_view_widget_set_resize (SPSVGSPViewWidget *vw, bool resize, gdouble width, gdouble height);
diff --git a/src/svg-view.cpp b/src/svg-view.cpp
index 35a51cfcd2d0cd56df1563fc451f32f535b1c539..bd46dd17a6c86645eec790878106b47d4ce9ca28 100644 (file)
--- a/src/svg-view.cpp
+++ b/src/svg-view.cpp
@@ -188,7 +188,7 @@ arena_handler (SPCanvasArena */*arena*/, NRArenaItem *ai, GdkEvent *event, SPSVG
* Callback connected with set_document signal.
*/
void
-SPSVGView::setDocument (Document *document)
+SPSVGView::setDocument (SPDocument *document)
{
if (doc()) {
sp_item_invoke_hide (SP_ITEM (sp_document_root (doc())), _dkey);
diff --git a/src/svg-view.h b/src/svg-view.h
index ab59ca417fedbae0244cd2acf496973d263e3d87..838a95b03eb6c7677db2199a3786089af4c8e2a3 100644 (file)
--- a/src/svg-view.h
+++ b/src/svg-view.h
void doRescale (bool event);
- virtual void setDocument (Document*);
+ virtual void setDocument (SPDocument*);
virtual void mouseover();
virtual void mouseout();
virtual bool shutdown() { return true; }
diff --git a/src/test-helpers.h b/src/test-helpers.h
index 3eacb7d13bf7e2edea2583a0a65a5139b0af4056..8dba0c942e23a81d16dfe7350733bbc2bd420602 100644 (file)
--- a/src/test-helpers.h
+++ b/src/test-helpers.h
static_cast<void>(g_object_new(inkscape_get_type(), NULL));
}
- Document* tmp = sp_document_new( NULL, TRUE, true );
+ SPDocument* tmp = sp_document_new( NULL, TRUE, true );
if ( tmp ) {
fun( suite );
if ( suite )
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index 61960086a8d00d1ea59dd8fbb42601e039b6e241..f574b69fb14a6628f693373dac3927d2c9fc27e1 100644 (file)
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
if (!desktop)
return;
- Document *doc = sp_desktop_document (desktop);
+ SPDocument *doc = sp_desktop_document (desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (!desktop)
return;
- Document *doc = sp_desktop_document (desktop);
+ SPDocument *doc = sp_desktop_document (desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp
index 9afadbeaf1bc1606ef11e5afc0bec88aa021c06d..e2bd0e9f583581cc9dba0a9fc01c36f06644789a 100644 (file)
--- a/src/trace/trace.cpp
+++ b/src/trace/trace.cpp
engine = NULL;
return;
}
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
sp_document_ensure_up_to_date(doc);
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index 692e22112d7f413af8a75974317a2f3ac23f1b58..3f55d040bc426a0f806c2d0f37617da34c167395 100644 (file)
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
@@ -415,7 +415,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
GSList *items = g_slist_prepend (NULL, item);
GSList *selected = NULL;
GSList *to_select = NULL;
- Document *doc = SP_OBJECT_DOCUMENT(item);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(item);
sp_item_list_to_curves (items, &selected, &to_select);
g_slist_free (items);
SPObject* newObj = doc->getObjectByRepr((Inkscape::XML::Node *) to_select->data);
@@ -524,7 +524,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
SP_OBJECT(item)->deleteObject(true, true);
sp_object_unref(SP_OBJECT(item), NULL);
} else { // duplicate
- Document *doc = SP_OBJECT_DOCUMENT(item);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(item);
Inkscape::XML::Document* xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *old_repr = SP_OBJECT_REPR(item);
SPObject *old_obj = doc->getObjectByRepr(old_repr);
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index e7e8a29dc088fba074f5309030ccfae4815444e7..7e41006bec7832908135b1423526b39a18d97e12 100644 (file)
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
void _copyTextPath(SPTextPath *);
Inkscape::XML::Node *_copyNode(Inkscape::XML::Node *, Inkscape::XML::Document *, Inkscape::XML::Node *);
- void _pasteDocument(Document *, bool in_place);
- void _pasteDefs(Document *);
+ void _pasteDocument(SPDocument *, bool in_place);
+ void _pasteDefs(SPDocument *);
bool _pasteImage();
bool _pasteText();
SPCSSAttr *_parseColor(const Glib::ustring &);
void _applyPathEffect(SPItem *, gchar const *);
- Document *_retrieveClipboard(Glib::ustring = "");
+ SPDocument *_retrieveClipboard(Glib::ustring = "");
// clipboard callbacks
void _onGet(Gtk::SelectionData &, guint);
void _userWarn(SPDesktop *, char const *);
// private properites
- Document *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
+ SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node
Inkscape::XML::Node *_root; ///< Reference to the clipboard's root node
Inkscape::XML::Node *_clipnode; ///< The node that holds extra information
if ( target == CLIPBOARD_TEXT_TARGET ) return _pasteText();
// otherwise, use the import extensions
- Document *tempdoc = _retrieveClipboard(target);
+ SPDocument *tempdoc = _retrieveClipboard(target);
if ( tempdoc == NULL ) {
_userWarn(desktop, _("Nothing on the clipboard."));
return false;
*/
const gchar *ClipboardManagerImpl::getFirstObjectID()
{
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
return NULL;
}
return false;
}
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
// no document, but we can try _text_style
if (_text_style) {
@@ -425,7 +425,7 @@ bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y
}
// FIXME: actually, this should accept arbitrary documents
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
_userWarn(desktop, _("No size on the clipboard."));
return false;
return false;
}
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc ) {
Inkscape::XML::Node *root = sp_document_repr_root(tempdoc);
Inkscape::XML::Node *clipnode = sp_repr_lookup_name(root, "inkscape:clipboard", 1);
*/
Glib::ustring ClipboardManagerImpl::getPathParameter()
{
- Document *tempdoc = _retrieveClipboard(); // any target will do here
+ SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
_userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
return "";
*/
Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId()
{
- Document *tempdoc = _retrieveClipboard(); // any target will do here
+ SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
_userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
return "";
@@ -769,10 +769,10 @@ Inkscape::XML::Node *ClipboardManagerImpl::_copyNode(Inkscape::XML::Node *node,
* @param in_place Whether to paste the selection where it was when copied
* @pre @c clipdoc is not empty and items can be added to the current layer
*/
-void ClipboardManagerImpl::_pasteDocument(Document *clipdoc, bool in_place)
+void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *target_document = sp_desktop_document(desktop);
+ SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
*target_parent = SP_OBJECT_REPR(desktop->currentLayer());
* @param clipdoc The document to paste
* @pre @c clipdoc != NULL and pasting into the active document is possible
*/
-void ClipboardManagerImpl::_pasteDefs(Document *clipdoc)
+void ClipboardManagerImpl::_pasteDefs(SPDocument *clipdoc)
{
// boilerplate vars copied from _pasteDocument
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *target_document = sp_desktop_document(desktop);
+ SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
*defs = sp_repr_lookup_name(root, "svg:defs", 1),
*/
bool ClipboardManagerImpl::_pasteImage()
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if ( doc == NULL ) return false;
// retrieve image data
/**
* @brief Retrieve the clipboard contents as a document
- * @return Clipboard contents converted to Document, or NULL if no suitable content was present
+ * @return Clipboard contents converted to SPDocument, or NULL if no suitable content was present
*/
-Document *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target)
+SPDocument *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target)
{
Glib::ustring best_target;
if ( required_target == "" )
@@ -1061,7 +1061,7 @@ Document *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target
if ( in == inlist.end() )
return NULL; // this shouldn't happen unless _getBestTarget returns something bogus
- Document *tempdoc = NULL;
+ SPDocument *tempdoc = NULL;
try {
tempdoc = (*in)->open(filename);
} catch (...) {
diff --git a/src/ui/clipboard.h b/src/ui/clipboard.h
index 467888ed70c9e493803fa243f27d19d9221a08de..54c05ac0def1f16419b74c559e7c3d25d81ad495 100644 (file)
--- a/src/ui/clipboard.h
+++ b/src/ui/clipboard.h
* @brief System-wide clipboard manager
*
* ClipboardManager takes care of manipulating the system clipboard in response
- * to user actions. It holds a complete Document as the contents. This document
+ * to user actions. It holds a complete SPDocument as the contents. This document
* is exported using output extensions when other applications request data.
* Copying to another instance of Inkscape is special-cased, because of the extra
* data required (i.e. style, size, Live Path Effects parameters, etc.)
index af6a0c516c27f0f39c06be12aed7cc124d6eeea4..025bec37a074018d8be728db097d9fe636e5df49 100644 (file)
// should be in UTF-*8..
char *about=g_build_filename(INKSCAPE_SCREENSDIR, _("about.svg"), NULL);
- Document *doc=sp_document_new (about, TRUE);
+ SPDocument *doc=sp_document_new (about, TRUE);
g_free(about);
g_return_val_if_fail(doc != NULL, NULL);
index f69d80fe5ec6c7bb783d2204cca398c07c40f9fb..96cad1fbe6074596d9edfde15ba8a1b44c4f8cae 100644 (file)
}
void
-DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, Document *)
+DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop));
repr->addListener (&_repr_events, this);
index 2bc94836bf1886aceddccb53e866444f4fb7ec7a..7f718e9f7faaa2ece578dfb346ea5e415c740fda 100644 (file)
void build_metadata();
void init();
- void _handleDocumentReplaced(SPDesktop* desktop, Document *document);
+ void _handleDocumentReplaced(SPDesktop* desktop, SPDocument *document);
void _handleActivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
void _handleDeactivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
index 0e928a9ebec5313c6faf02371f09fcbbd7c3f788..423778276e8fd32752bbe40a0909b0e6225882a3 100644 (file)
}
void
-DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, Document *document)
+DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *document)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop));
repr->addListener(&_repr_events, this);
{
SPDesktop *dt = getDesktop();
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(dt));
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
Glib::ustring typestring = _grids_combo_gridtype.get_active_text();
CanvasGrid::writeNewGridToRepr(repr, doc, CanvasGrid::getGridTypeFromName(typestring.c_str()));
index 5aa8d446d7aa54cce498b9d614ad90940f09a050..136ae2c899746956911c0097993a9e9332ddb659 100644 (file)
void removeExternalScript();
void scripting_create_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem);
- void _handleDocumentReplaced(SPDesktop* desktop, Document *document);
+ void _handleDocumentReplaced(SPDesktop* desktop, SPDocument *document);
void _handleActivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
void _handleDeactivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
index 30a7e7c2a42908aeb0b7402086839c3ed14f2e4b..70f2f2ae52edbdfd6862a1fa267e5e2fc8341029 100644 (file)
### SVG Preview Widget
#########################################################################*/
-bool SVGPreview::setDocument(Document *doc)
+bool SVGPreview::setDocument(SPDocument *doc)
{
if (document)
sp_document_unref(document);
* I don't know why passing false to keepalive is bad. But it
* prevents the display of an svg with a non-ascii filename
*/
- Document *doc = sp_document_new (fileName.c_str(), true);
+ SPDocument *doc = sp_document_new (fileName.c_str(), true);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
return false;
gint len = (gint)strlen(xmlBuffer);
- Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
index bd0477b302507f9aedadb37945900bda076b0762..90dddce59a51a8ba5858d32796a1fb9ffcc5d139 100644 (file)
~SVGPreview();
- bool setDocument(Document *doc);
+ bool setDocument(SPDocument *doc);
bool setFileName(Glib::ustring &fileName);
/**
* The svg document we are currently showing
*/
- Document *document;
+ SPDocument *document;
/**
* The sp_svg_view widget
index 4a2cc879d4d1c1f7312225a9a2a6ccb2c240d570..0d8f0de5f7c3a1674af6eea74b648ec03b5d829f 100644 (file)
gchar *utf8string = g_utf16_to_utf8((const gunichar2*)_path_string,
_MAX_PATH, NULL, NULL, NULL);
- Document *svgDoc = sp_document_new (utf8string, true);
+ SPDocument *svgDoc = sp_document_new (utf8string, true);
g_free(utf8string);
// Check the document loaded properly
index 026af2c9f48ee5a533e29d8e97c953a45bc471ef..baf46970a697948e0f0ef64c3474ba68bee1e74b 100644 (file)
@@ -1222,7 +1222,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
if(iter) {
SPDesktop *desktop = _dialog.getDesktop();
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
SPFilter* filter = (*iter)[_columns.filter];
Inkscape::Selection *sel = sp_desktop_selection(desktop);
@@ -1255,7 +1255,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
void FilterEffectsDialog::FilterModifier::update_filters()
{
SPDesktop* desktop = _dialog.getDesktop();
- Document* document = sp_desktop_document(desktop);
+ SPDocument* document = sp_desktop_document(desktop);
const GSList* filters = sp_document_get_resource_list(document, "filter");
_model->clear();
@@ -1310,7 +1310,7 @@ void FilterEffectsDialog::FilterModifier::filter_list_button_release(GdkEventBut
void FilterEffectsDialog::FilterModifier::add_filter()
{
- Document* doc = sp_desktop_document(_dialog.getDesktop());
+ SPDocument* doc = sp_desktop_document(_dialog.getDesktop());
SPFilter* filter = new_filter(doc);
const int count = _model->children().size();
SPFilter *filter = get_selected_filter();
if(filter) {
- Document* doc = filter->document;
+ SPDocument* doc = filter->document;
sp_repr_unparent(filter->repr);
sp_document_done(doc, SP_VERB_DIALOG_FILTER_EFFECTS, _("Remove filter"));
index 28c7149054b910585a7a6dd88b3e46b25e2c837d..3fb9a46fb89568d19c140269cd5ae6a3a8b0f2c8 100644 (file)
static void on_activate_desktop(Application*, SPDesktop*, FilterModifier*);
static void on_deactivate_desktop(Application*, SPDesktop*, FilterModifier*);
- void on_document_replaced(SPDesktop*, Document*)
+ void on_document_replaced(SPDesktop*, SPDocument*)
{
update_filters();
}
index 2d7f7cb5beb782553eb78bc4f06aef2435e31b24..3a7964ba250e47bdb5546191bd5c0ae3fc9e9a64 100644 (file)
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
void GuidelinePropertiesDialog::_onDelete()
{
- Document *doc = SP_OBJECT_DOCUMENT(_guide);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(_guide);
sp_guide_remove(_guide);
sp_document_done(doc, SP_VERB_NONE,
_("Delete guide"));
index 1490e5b73dec7b771709ec2f62b2c7f0d6231136..336afc3c563f872c291358b76640062f05741678 100644 (file)
extern "C" {
// takes doc, root, icon, and icon name to produce pixels
guchar *
-sp_icon_doc_icon( Document *doc, NRArenaItem *root,
+sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
const gchar *name, unsigned int psize );
}
void IconPreviewPanel::renderPreview( SPObject* obj )
{
- Document * doc = SP_OBJECT_DOCUMENT(obj);
+ SPDocument * doc = SP_OBJECT_DOCUMENT(obj);
gchar * id = SP_OBJECT_ID(obj);
// g_message(" setting up to render '%s' as the icon", id );
index 0298042ef438e40918e956765dc2817f9d3b530d..fa47ad88d979da656760262a406f588f284442c3 100644 (file)
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -349,7 +349,7 @@ bool LayersPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIt
void LayersPanel::_layersChanged()
{
// g_message("_layersChanged()");
- Document* document = _desktop->doc();
+ SPDocument* document = _desktop->doc();
SPObject* root = document->root;
if ( root ) {
_selectedConnection.block();
}
}
-void LayersPanel::_addLayer( Document* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
+void LayersPanel::_addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
{
if ( layer && (level < _maxNestDepth) ) {
unsigned int counter = _mgr->childCount(layer);
diff --git a/src/ui/dialog/layers.h b/src/ui/dialog/layers.h
index c5f945437007e1e53914987cdd85eaf8c5de5421..16b3be3508802fc239e6d8e7e00b25ba02217b53 100644 (file)
--- a/src/ui/dialog/layers.h
+++ b/src/ui/dialog/layers.h
bool _checkForSelected(const Gtk::TreePath& path, const Gtk::TreeIter& iter, SPObject* layer);
void _layersChanged();
- void _addLayer( Document* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level );
+ void _addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level );
SPObject* _selectedLayer();
index bea8a096ebbb16f6503265a28cbffaa2c9c50e8b..dd2dc8250a4002b6ea5aa1bf54bbccced15af259 100644 (file)
if ( sel && !sel->isEmpty() ) {
SPItem *item = sel->singleItem();
if ( item && SP_IS_LPE_ITEM(item) ) {
- Document *doc = current_desktop->doc();
+ SPDocument *doc = current_desktop->doc();
const Util::EnumData<LivePathEffect::EffectType>* data = combo_effecttype.get_active_data();
if (!data) return;
index 5fc4a9134e565b649a41727a1ad0f4b8ad62c9e7..7dbb6dd4ac25477142a8deafc18809fc1df09360 100644 (file)
static_cast<PanelDialogBase *>(data)->_propagateDesktopActivated(application, desktop);
}
- inline virtual void _propagateDocumentReplaced(SPDesktop* desktop, Document *document);
+ inline virtual void _propagateDocumentReplaced(SPDesktop* desktop, SPDocument *document);
inline virtual void _propagateDesktopActivated(Inkscape::Application *, SPDesktop *);
inline virtual void _propagateDesktopDeactivated(Inkscape::Application *, SPDesktop *);
void
-PanelDialogBase::_propagateDocumentReplaced(SPDesktop *desktop, Document *document)
+PanelDialogBase::_propagateDocumentReplaced(SPDesktop *desktop, SPDocument *document)
{
_panel.signalDocumentReplaced().emit(desktop, document);
}
index 198495f74365931bb57957a6ada52afbb26567bc..d15773ecb9fa31aab81f794d2591bb720a57091b 100644 (file)
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
namespace UI {
namespace Dialog {
-Print::Print(Document *doc, SPItem *base) :
+Print::Print(SPDocument *doc, SPItem *base) :
_doc (doc),
_base (base)
{
diff --git a/src/ui/dialog/print.h b/src/ui/dialog/print.h
index e8904d744eec473c9ff9affe8aef26e6c6df9d42..ea89ebdf225c11128d4715347cf9d3c17d337780 100644 (file)
--- a/src/ui/dialog/print.h
+++ b/src/ui/dialog/print.h
*/
struct workaround_gtkmm
{
- Document *_doc;
+ SPDocument *_doc;
SPItem *_base;
Inkscape::UI::Widget::RenderingOptions *_tab;
};
class Print {
public:
- Print(Document *doc, SPItem *base);
+ Print(SPDocument *doc, SPItem *base);
Gtk::PrintOperationResult run(Gtk::PrintOperationAction, Gtk::Window &parent_window);
protected:
private:
GtkPrintOperation *_printop;
- Document *_doc;
+ SPDocument *_doc;
SPItem *_base;
Inkscape::UI::Widget::RenderingOptions _tab;
index 64ea0787761adec7f3f5de721e95af690b0ca651..5f86196b1f71e88994d912cc3160f54127d86232 100644 (file)
void SvgFontsDialog::on_kerning_value_changed(){
if (!this->kerning_pair) return;
- Document* document = sp_desktop_document(this->getDesktop());
+ SPDocument* document = sp_desktop_document(this->getDesktop());
//TODO: I am unsure whether this is the correct way of calling sp_document_maybe_done
Glib::ustring undokey = "svgfonts:hkern:k:";
void SvgFontsDialog::update_fonts()
{
SPDesktop* desktop = this->getDesktop();
- Document* document = sp_desktop_document(desktop);
+ SPDocument* document = sp_desktop_document(desktop);
const GSList* fonts = sp_document_get_resource_list(document, "font");
_model->clear();
}
}
-SPGlyph *new_glyph(Document* document, SPFont *font, const int count)
+SPGlyph *new_glyph(SPDocument* document, SPFont *font, const int count)
{
g_return_val_if_fail(font != NULL, NULL);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
void SvgFontsDialog::add_glyph(){
const int count = _GlyphsListStore->children().size();
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
/* SPGlyph* glyph =*/ new_glyph(doc, get_selected_spfont(), count+1);
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Add glyph"));
}
Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop);
- Document* doc = sp_desktop_document(desktop);
+ SPDocument* doc = sp_desktop_document(desktop);
Inkscape::Selection* sel = sp_desktop_selection(desktop);
if (sel->isEmpty()){
char *msg = _("Select a <b>path</b> to define the curves of a glyph");
}
Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop);
- Document* doc = sp_desktop_document(desktop);
+ SPDocument* doc = sp_desktop_document(desktop);
Inkscape::Selection* sel = sp_desktop_selection(desktop);
if (sel->isEmpty()){
char *msg = _("Select a <b>path</b> to define the curves of a glyph");
return;
}
- Document* doc = sp_desktop_document(desktop);
+ SPDocument* doc = sp_desktop_document(desktop);
SPObject* obj;
for (obj = get_selected_spfont()->children; obj; obj=obj->next){
if (SP_IS_MISSING_GLYPH(obj)){
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
glyph->repr->setAttribute("glyph-name", str.c_str());
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Edit glyph name"));
update_glyphs();
@@ -594,7 +594,7 @@ void SvgFontsDialog::glyph_unicode_edit(const Glib::ustring&, const Glib::ustrin
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
glyph->repr->setAttribute("unicode", str.c_str());
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph unicode"));
update_glyphs();
SPFont* font = get_selected_spfont();
sp_repr_unparent(font->repr);
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove font"));
update_fonts();
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
sp_repr_unparent(glyph->repr);
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove glyph"));
update_glyphs();
SPGlyphKerning* pair = (*i)[_KerningPairsListColumns.spnode];
sp_repr_unparent(pair->repr);
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove kerning pair"));
update_glyphs();
if (this->kerning_pair) return; //We already have this kerning pair
- Document* document = sp_desktop_document(this->getDesktop());
+ SPDocument* document = sp_desktop_document(this->getDesktop());
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
// create a new hkern node
return &kerning_vbox;
}
-SPFont *new_font(Document *document)
+SPFont *new_font(SPDocument *document)
{
g_return_val_if_fail(document != NULL, NULL);
}
void SvgFontsDialog::add_font(){
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
SPFont* font = new_font(doc);
const int count = _model->children().size();
index cdd479e9dc4b03c7f149264bb9adc79562a78803..e273a827c4c4e6211e3cab52ed5d0a9fceb42a7d 100644 (file)
if ( bounceTarget ) {
SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0;
SPDesktop* desktop = swp ? swp->getDesktop() : 0;
- Document *doc = desktop ? desktop->doc() : 0;
+ SPDocument *doc = desktop ? desktop->doc() : 0;
if (doc) {
std::string targetName(bounceTarget->def.descr);
const GSList *gradients = sp_document_get_resource_list(doc, "gradient");
if ( bounceTarget ) {
SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0;
SPDesktop* desktop = swp ? swp->getDesktop() : 0;
- Document *doc = desktop ? desktop->doc() : 0;
+ SPDocument *doc = desktop ? desktop->doc() : 0;
if (doc) {
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
{
}
-static bool bruteForce( Document* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b )
+static bool bruteForce( SPDocument* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b )
{
bool changed = false;
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop ) {
- Document* document = sp_desktop_document( desktop );
+ SPDocument* document = sp_desktop_document( desktop );
Inkscape::XML::Node *rroot = sp_document_repr_root( document );
if ( rroot ) {
_currentDesktop->connectToolSubselectionChanged(
sigc::hide(sigc::mem_fun(*this, &SwatchesPanel::_updateFromSelection)));
- sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, Document*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument);
- sigc::slot<void, Document*> base2 = first;
- sigc::slot<void,SPDesktop*, Document*> slot2 = sigc::hide<0>( base2 );
+ sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, SPDocument*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument);
+ sigc::slot<void, SPDocument*> base2 = first;
+ sigc::slot<void,SPDesktop*, SPDocument*> slot2 = sigc::hide<0>( base2 );
_documentConnection = desktop->connectDocumentReplaced( slot2 );
_setDocument( desktop->doc() );
}
}
-void SwatchesPanel::_setDocument( Document *document )
+void SwatchesPanel::_setDocument( SPDocument *document )
{
if ( document != _currentDocument ) {
if ( _currentDocument ) {
index 3ad5a38c152a943e2f541b3ff77908c5e6f71495..35bcd8c784bba864c3d46a5f71e4be7f0586117d 100644 (file)
--- a/src/ui/dialog/swatches.h
+++ b/src/ui/dialog/swatches.h
protected:
virtual void _updateFromSelection();
virtual void _handleAction( int setId, int itemId );
- virtual void _setDocument( Document *document );
+ virtual void _setDocument( SPDocument *document );
virtual void _rebuild();
private:
ColorItem* _remove;
int _currentIndex;
SPDesktop* _currentDesktop;
- Document* _currentDocument;
+ SPDocument* _currentDocument;
void* _ptr;
sigc::connection _documentConnection;
index 0e14b7d7bfde7cc6c0fc17ba9da2f0ddc99a48ae..82e04f3c941ae495d2946c176c74a36f593c7eec 100644 (file)
protected:
- Document *_document;
+ SPDocument *_document;
EventLog *_event_log;
const EventLog::EventModelColumns *_columns;
index 9619380bbdd5e74659a756d9d4be2de56b40e28c..756f4df73a72f0f6d651a5296e97ca0982a627c0 100644 (file)
namespace UI {
namespace View {
-EditWidget::EditWidget (Document *doc)
+EditWidget::EditWidget (SPDocument *doc)
: _main_window_table(4),
_viewport_table(3,3),
_act_grp(Gtk::ActionGroup::create()),
if (Inkscape::NSApplication::Editor::isDuplicatedView (_desktop))
return false;
- Document *doc = _desktop->doc();
+ SPDocument *doc = _desktop->doc();
if (doc->isModifiedSinceSave()) {
gchar *markup;
/// \todo FIXME !!! obviously this will have problems if the document
_update_s_f = true;
/* The desktop region we always show unconditionally */
- Document *doc = _desktop->doc();
+ SPDocument *doc = _desktop->doc();
Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)),
Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) );
SPObject* root = doc->root;
}
void
-EditWidget::initEdit (Document *doc)
+EditWidget::initEdit (SPDocument *doc)
{
_desktop = new SPDesktop();
_desktop->registerEditWidget (this);
index 28b4b52d2434ea1605a9099a79e83145c95e979e..2bb7083054f817c459662620a6338d42f0b32dc8 100644 (file)
#include "ui/widget/zoom-status.h"
struct SPDesktop;
-struct Document;
+struct SPDocument;
struct SPNamedView;
namespace Inkscape {
class EditWidget : public Gtk::Window,
public EditWidgetInterface {
public:
- EditWidget (Document*);
+ EditWidget (SPDocument*);
~EditWidget();
// Initialization
void initActions();
void initUIManager();
void initLayout();
- void initEdit (Document*);
+ void initEdit (SPDocument*);
void destroyEdit();
// Actions
diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp
index 07bb6d2c134427801da9b26c7db82f5bd3c1aa0e..1b498a846ec018112149d37bbeb6dd1ce5ded556 100644 (file)
--- a/src/ui/view/view.cpp
+++ b/src/ui/view/view.cpp
*
* \param doc The new document to connect the view to.
*/
-void View::setDocument(Document *doc) {
+void View::setDocument(SPDocument *doc) {
g_return_if_fail(doc != NULL);
if (_doc) {
diff --git a/src/ui/view/view.h b/src/ui/view/view.h
index 6465807d6af2cda40bf57850912d1240c8e53267..882746ceace7648d3901a6df565ce4815fbbeecf 100644 (file)
--- a/src/ui/view/view.h
+++ b/src/ui/view/view.h
}
};
-class Document;
+class SPDocument;
namespace Inkscape {
class MessageContext;
void close() { _close(); }
/// Returns a pointer to the view's document.
- Document *doc() const
+ SPDocument *doc() const
{ return _doc; }
/// Returns a pointer to the view's message stack.
Inkscape::MessageStack *messageStack() const
virtual void onDocumentResized (double, double) = 0;
protected:
- Document *_doc;
+ SPDocument *_doc;
Inkscape::MessageStack *_message_stack;
Inkscape::MessageContext *_tips_message_context;
virtual void _close();
- virtual void setDocument(Document *doc);
+ virtual void setDocument(SPDocument *doc);
sigc::signal<void,double,double> _position_set_signal;
sigc::signal<void,double,double> _resized_signal;
index f42b2976002f0e871f06cf8856cb08cffbe0f998..e9f09f574c9deb5109f7967d3dd5cdcd05d06f81 100644 (file)
}
void
-EntityLineEntry::update (Document *doc)
+EntityLineEntry::update (SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
static_cast<Gtk::Entry*>(_packable)->set_text (text ? text : "");
if (_wr->isUpdating()) return;
_wr->setUpdating (true);
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
Glib::ustring text = static_cast<Gtk::Entry*>(_packable)->get_text();
if (rdf_set_work_entity (doc, _entity, text.c_str()))
sp_document_done (doc, SP_VERB_NONE,
}
void
-EntityMultiLineEntry::update (Document *doc)
+EntityMultiLineEntry::update (SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
if (_wr->isUpdating()) return;
_wr->setUpdating (true);
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
Gtk::TextView *tv = static_cast<Gtk::TextView*>(s->get_child());
Glib::ustring text = tv->get_buffer()->get_text();
index d080787c15e49e60492b67339eeb1ec425de1f73..5bdee9a90c93c90f65a012949aa8453c6cf64a93 100644 (file)
#include <gtkmm/tooltips.h>
struct rdf_work_entity_t;
-class Document;
+class SPDocument;
namespace Gtk {
class TextBuffer;
public:
static EntityEntry* create (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
virtual ~EntityEntry() = 0;
- virtual void update (Document *doc) = 0;
+ virtual void update (SPDocument *doc) = 0;
virtual void on_changed() = 0;
Gtk::Label _label;
Gtk::Widget *_packable;
public:
EntityLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
~EntityLineEntry();
- void update (Document *doc);
+ void update (SPDocument *doc);
protected:
virtual void on_changed();
public:
EntityMultiLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
~EntityMultiLineEntry();
- void update (Document *doc);
+ void update (SPDocument *doc);
protected:
virtual void on_changed();
index ead32b4b7ba4a35aac6adb6be0930c862afc7329..6a817e30d8918417f8334472643599b7620af46a 100644 (file)
}
-bool ImageIcon::showSvgDocument(const Document *docArg)
+bool ImageIcon::showSvgDocument(const SPDocument *docArg)
{
if (document)
sp_document_unref(document);
- Document *doc = (Document *)docArg;
+ SPDocument *doc = (SPDocument *)docArg;
sp_document_ref(doc);
document = doc;
fileName = Glib::filename_to_utf8(fileName);
- Document *doc = sp_document_new (fileName.c_str(), 0);
+ SPDocument *doc = sp_document_new (fileName.c_str(), 0);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
return false;
gint len = (gint)strlen(xmlBuffer);
- Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
index 3819a3c7790b16c3917cd7467a184c06a709dc7f..803b2f53fbce2d15e15c77a722ded4ee61437d14 100644 (file)
#include <gtkmm/box.h>
-class Document;
+class SPDocument;
namespace Inkscape
{
/**
*
*/
- bool showSvgDocument(const Document *doc);
+ bool showSvgDocument(const SPDocument *doc);
/**
*
/**
* The svg document we are currently showing
*/
- Document *document;
+ SPDocument *document;
/**
* The sp_svg_view widget
index d9ef558a53237572b64a086f83c462ffcbb03f52..0b5300272bc98a8fe418a82afd7540424e6c2a5a 100644 (file)
#include "util/list.h"
class SPDesktop;
-class Document;
+class SPDocument;
class SPObject;
namespace Inkscape {
namespace XML {
index 778fbc6ccde887645b7dd1863c5f45f1f2bac3a7..a5f1d89be02b6ab48a6965c650270bef7e4dfd4e 100644 (file)
}
void
-Licensor::update (Document *doc)
+Licensor::update (SPDocument *doc)
{
/* identify the license info */
struct rdf_license_t * license = rdf_get_license (doc);
index 6738c48df59b0224943b23be03586c06d9ba3112..9f41a6d0d3fcbf896d15dc7e425293f9cb84edf4 100644 (file)
--- a/src/ui/widget/licensor.h
+++ b/src/ui/widget/licensor.h
#include <gtkmm/box.h>
-class Document;
+class SPDocument;
namespace Gtk {
class Tooltips;
Licensor();
virtual ~Licensor();
void init (Gtk::Tooltips&, Registry&);
- void update (Document *doc);
+ void update (SPDocument *doc);
protected:
EntityEntry *_eentry;
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index 1b425114386c43c3c6cda419625e9f8e80e22a4d..bfc291bc02a3e69435a2219e31a2b9ffbaf02b03 100644 (file)
if (!desktop) {
return;
}
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
if (_blocked)
return;
index 429442779e546f3d9c816dc771e5ae9376388d48..02688a55e67ac6370c31ba744e2027915ec07596 100644 (file)
_changedh_connection.block();
if (SP_ACTIVE_DESKTOP && !_widgetRegistry->isUpdating()) {
- Document *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
+ SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
double const old_height = sp_document_height(doc);
sp_document_set_width (doc, w, &_px_unit);
sp_document_set_height (doc, h, &_px_unit);
index c2fafa00106385990b3728d8ada51e8b05c466b2..93a950d1a4da33f18c860d48b86fe4cc9097ca3d 100644 (file)
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
_response_map[response_id]->set_sensitive(setting);
}
-sigc::signal<void, SPDesktop *, Document *> &
+sigc::signal<void, SPDesktop *, SPDocument *> &
Panel::signalDocumentReplaced()
{
return _signal_document_replaced;
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index 36f5ea80475a2bdd18bdebc1102f488079f90a5f..d42548f161f64744f8c25705f6fbec90f1855028 100644 (file)
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
void setDefaultResponse(int response_id);
void setResponseSensitive(int response_id, bool setting);
- virtual sigc::signal<void, SPDesktop *, Document *> &signalDocumentReplaced();
+ virtual sigc::signal<void, SPDesktop *, SPDocument *> &signalDocumentReplaced();
virtual sigc::signal<void, Inkscape::Application *, SPDesktop *> &signalActivateDesktop();
virtual sigc::signal<void, Inkscape::Application *, SPDesktop *> &signalDeactiveDesktop();
/** Signals */
sigc::signal<void, int> _signal_response;
sigc::signal<void> _signal_present;
- sigc::signal<void, SPDesktop *, Document *> _signal_document_replaced;
+ sigc::signal<void, SPDesktop *, SPDocument *> _signal_document_replaced;
sigc::signal<void, Inkscape::Application *, SPDesktop *> _signal_activate_desktop;
sigc::signal<void, Inkscape::Application *, SPDesktop *> _signal_deactive_desktop;
index f9195d1f2f78025a249ba8cec57e33de0fa3290c..7397458170e7a21c77060e7db8981ad01d4e1679 100644 (file)
const Util::EnumDataConverter<E>& c,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL )
+ SPDocument *doc_in = NULL )
: RegisteredWidget< LabelledComboBoxEnum<E> >(label, tip, c)
{
RegisteredWidget< LabelledComboBoxEnum<E> >::init_parent(key, wr, repr_in, doc_in);
index 5780f74ed69aa0ee074f62327a4021a393bb0a6a..95ddec286c4a8641d0dcacb5bb3988fa22a5b330 100644 (file)
_toggled_connection.disconnect();
}
-RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Gtk::CheckButton>()
{
init_parent(key, wr, repr_in, doc_in);
_changed_connection.disconnect();
}
-RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Labelled> (label, "" /*tooltip*/, new UnitMenu())
{
init_parent(key, wr, repr_in, doc_in);
_value_changed_connection.disconnect();
}
-RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<ScalarUnit>(label, tip, UNIT_TYPE_LINEAR, "", "", rum.getUnitMenu()),
_um(0)
{
RegisteredScalar::RegisteredScalar ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document * doc_in )
+ SPDocument * doc_in )
: RegisteredWidget<Scalar>(label, tip)
{
init_parent(key, wr, repr_in, doc_in);
RegisteredText::RegisteredText ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document * doc_in )
+ SPDocument * doc_in )
: RegisteredWidget<Text>(label, tip)
{
init_parent(key, wr, repr_in, doc_in);
const Glib::ustring& akey,
Registry& wr,
Inkscape::XML::Node* repr_in,
- Document *doc_in)
+ SPDocument *doc_in)
: RegisteredWidget<ColorPicker> (title, tip, 0, true)
{
init_parent("", wr, repr_in, doc_in);
// Use local repr here. When repr is specified, use that one, but
// if repr==NULL, get the repr of namedview of active desktop.
Inkscape::XML::Node *local_repr = repr;
- Document *local_doc = doc;
+ SPDocument *local_doc = doc;
if (!local_repr) {
// no repr specified, use active desktop's namedview's repr
SPDesktop *dt = SP_ACTIVE_DESKTOP;
_changed_connection.disconnect();
}
-RegisteredSuffixedInteger::RegisteredSuffixedInteger (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredSuffixedInteger::RegisteredSuffixedInteger (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Scalar>(label, tip, 0, suffix),
setProgrammatically(false)
{
RegisteredRadioButtonPair::RegisteredRadioButtonPair (const Glib::ustring& label,
const Glib::ustring& label1, const Glib::ustring& label2,
const Glib::ustring& tip1, const Glib::ustring& tip2,
- const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+ const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Gtk::HBox>(),
_rb1(NULL),
_rb2(NULL)
RegisteredPoint::RegisteredPoint ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document* doc_in )
+ SPDocument* doc_in )
: RegisteredWidget<Point> (label, tip)
{
init_parent(key, wr, repr_in, doc_in);
RegisteredTransformedPoint::RegisteredTransformedPoint ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document* doc_in )
+ SPDocument* doc_in )
: RegisteredWidget<Point> (label, tip),
to_svg(Geom::identity())
{
RegisteredRandom::RegisteredRandom ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document * doc_in )
+ SPDocument * doc_in )
: RegisteredWidget<Random> (label, tip)
{
init_parent(key, wr, repr_in, doc_in);
index 32d6c93fa677e940fa839182779ac8ccf007d1d9..a5c61f68a445fe57ef0b099fe074643c73e7351d 100644 (file)
#include "sp-namedview.h"
class SPUnit;
-class Document;
+class SPDocument;
namespace Gtk {
class HScale;
virtual ~RegisteredWidget() {};
- void init_parent(const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+ void init_parent(const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
{
_wr = ≀
_key = key;
// Use local repr here. When repr is specified, use that one, but
// if repr==NULL, get the repr of namedview of active desktop.
Inkscape::XML::Node *local_repr = repr;
- Document *local_doc = doc;
+ SPDocument *local_doc = doc;
if (!local_repr) {
// no repr specified, use active desktop's namedview's repr
SPDesktop* dt = SP_ACTIVE_DESKTOP;
Registry * _wr;
Glib::ustring _key;
Inkscape::XML::Node * repr;
- Document * doc;
+ SPDocument * doc;
unsigned int event_type;
Glib::ustring event_description;
bool write_undo;
class RegisteredCheckButton : public RegisteredWidget<Gtk::CheckButton> {
public:
virtual ~RegisteredCheckButton();
- RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right=true, Inkscape::XML::Node* repr_in=NULL, Document *doc_in=NULL);
+ RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right=true, Inkscape::XML::Node* repr_in=NULL, SPDocument *doc_in=NULL);
void setActive (bool);
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
void setUnit (const SPUnit*);
Unit getUnit() const { return static_cast<UnitMenu*>(_widget)->getUnit(); };
const RegisteredUnitMenu &rum,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _value_changed_connection;
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _value_changed_connection;
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _activate_connection;
const Glib::ustring& akey,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL);
+ SPDocument *doc_in = NULL);
void setRgba32 (guint32);
void closeWindow();
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
bool setProgrammatically; // true if the value was set by setValue, not changed by the user;
// if a callback checks it, it must reset it back to false
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
void setValue (bool second);
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _value_x_changed_connection;
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
// redefine setValue, because transform must be applied
void setValue(Geom::Point const & p);
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL);
+ SPDocument *doc_in = NULL);
void setValue (double val, long startseed);
index bc5b459792f782f44489f7804f4eda04c573fc15..3a36127f4d74bd733e271621fd91642bf2a9b2be 100644 (file)
_wr->setUpdating (true);
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
bool saved = sp_document_get_undo_sensitive (doc);
sp_document_set_undo_sensitive (doc, false);
Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt));
diff --git a/src/uri-references.cpp b/src/uri-references.cpp
index 33d5991802190cc1c8299c769db8bc3a55e42e09..d979fe29230da90439f3955e835504b8c8f7f067 100644 (file)
--- a/src/uri-references.cpp
+++ b/src/uri-references.cpp
/* FIXME !!! attach to owner's destroy signal to clean up in case */
}
-URIReference::URIReference(Document *owner_document)
+URIReference::URIReference(SPDocument *owner_document)
: _owner(NULL), _owner_document(owner_document), _obj(NULL), _uri(NULL)
{
g_assert(_owner_document != NULL);
void URIReference::attach(const URI &uri) throw(BadURIException)
{
- Document *document;
+ SPDocument *document;
if (_owner) {
document = SP_OBJECT_DOCUMENT(_owner);
} else if (_owner_document) {
-SPObject* sp_css_uri_reference_resolve( Document *document, const gchar *uri )
+SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri )
{
SPObject* ref = 0;
}
SPObject *
-sp_uri_reference_resolve (Document *document, const gchar *uri)
+sp_uri_reference_resolve (SPDocument *document, const gchar *uri)
{
SPObject* ref = 0;
diff --git a/src/uri-references.h b/src/uri-references.h
index 0f7a724ba3020c7e30bed0e3785eca7b88362fcd..a98c84153bf382603295d212b2f69444a4a2690d 100644 (file)
--- a/src/uri-references.h
+++ b/src/uri-references.h
* is holding a reference to the target object.
*/
URIReference(SPObject *owner);
- URIReference(Document *owner_document);
+ URIReference(SPDocument *owner_document);
/**
* Destructor. Calls shutdown() if the reference has not been
return (bool)_uri;
}
- Document *getOwnerDocument() { return _owner_document; }
+ SPDocument *getOwnerDocument() { return _owner_document; }
SPObject *getOwnerObject() { return _owner; }
protected:
private:
SPObject *_owner;
- Document *_owner_document;
+ SPDocument *_owner_document;
sigc::connection _connection;
sigc::connection _release_connection;
SPObject *_obj;
/**
* Resolves an item referenced by a URI in CSS form contained in "url(...)"
*/
-SPObject* sp_css_uri_reference_resolve( Document *document, const gchar *uri );
+SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri );
-SPObject *sp_uri_reference_resolve (Document *document, const gchar *uri);
+SPObject *sp_uri_reference_resolve (SPDocument *document, const gchar *uri);
#endif
index 133311625e970f1dc707cdffce428d8f85dafd19..ab46b21a6c955ee8c69fead5af637fa15cad043d 100644 (file)
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
}
}
-VPDrag::VPDrag (Document *document)
+VPDrag::VPDrag (SPDocument *document)
{
this->document = document;
this->selection = sp_desktop_selection(inkscape_active_desktop());
diff --git a/src/vanishing-point.h b/src/vanishing-point.h
index 31131540480bf0f9722b6128d260ceb09cac7826..9fcb6bb46d6440a0e35bf8b67311add2df68d78f 100644 (file)
--- a/src/vanishing-point.h
+++ b/src/vanishing-point.h
struct VPDrag {
public:
- VPDrag(Document *document);
+ VPDrag(SPDocument *document);
~VPDrag();
VPDragger *getDraggerFor (VanishingPoint const &vp);
bool dragging;
- Document *document;
+ SPDocument *document;
GList *draggers;
GSList *lines;
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 10f4f3accf370965e18c16790e81bb495396da16..43ddc1459ad016eb98ddac80dceb8d7b33575d2c 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
}
void
-Verb::sensitive(Document *in_doc, bool in_sensitive)
+Verb::sensitive(SPDocument *in_doc, bool in_sensitive)
{
// printf("Setting sensitivity of \"%s\" to %d\n", _name, in_sensitive);
if (_actions != NULL) {
}
void
-Verb::name(Document *in_doc, Glib::ustring in_name)
+Verb::name(SPDocument *in_doc, Glib::ustring in_name)
{
if (_actions != NULL) {
for (ActionTable::iterator cur_action = _actions->begin();
/* These aren't used, but are here to remind people not to use
the CURRENT_DOCUMENT macros unless they really have to. */
Inkscape::UI::View::View *current_view = sp_action_get_view(action);
- Document *current_document = current_view->doc();
+ SPDocument *current_document = current_view->doc();
#endif
SPDesktop *desktop = dynamic_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
return;
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
(void)doc;
Inkscape::XML::Node *repr = SP_OBJECT_REPR(dt->namedview);
(void)repr;
return;
SPEventContext *ec = dt->event_context;
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
Inkscape::XML::Node *repr = SP_OBJECT_REPR(dt->namedview);
/* These aren't used, but are here to remind people not to use
the CURRENT_DOCUMENT macros unless they really have to. */
Inkscape::UI::View::View *current_view = sp_action_get_view(action);
- // Document *current_document = SP_VIEW_DOCUMENT(current_view);
+ // SPDocument *current_document = SP_VIEW_DOCUMENT(current_view);
Inkscape::Extension::Effect *effect = Inkscape::Extension::Effect::get_last_effect();
if (effect == NULL) return;
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt) return;
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
if (!doc) return;
switch ((long) data) {
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt) return;
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
if (!doc) return;
switch ((long) data) {
diff --git a/src/verbs.h b/src/verbs.h
index de9eae68ab338e47bef8a13548d77f4e825b189c..c3b88918b7bac4311e2639d6523f00d557b4edc9 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 (Inkscape::XML::DocumentTree * in_doc = NULL, bool in_sensitive = true);
- void name (Inkscape::XML::DocumentTree * in_doc = NULL, Glib::ustring in_name = "");
+ void sensitive (SPDocument * in_doc = NULL, bool in_sensitive = true);
+ void name (SPDocument * in_doc = NULL, Glib::ustring in_name = "");
// Yes, multiple public, protected and private sections are bad. We'll clean that up later
protected:
index fc2e8272200eaed0201c42d95aaa73d643fcf34c..a2f88c16d184ae07597f58a706d2744199e1d980 100644 (file)
g_assert(desktop != NULL);
if (inkscape_is_sole_desktop_for_document(*desktop)) {
- Document *doc = desktop->doc();
+ SPDocument *doc = desktop->doc();
if (doc->isModifiedSinceSave()) {
GtkWidget *dialog;
dtw->update = 1;
/* The desktop region we always show unconditionally */
- Document *doc = dtw->desktop->doc();
+ SPDocument *doc = dtw->desktop->doc();
Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)),
Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) );
SPObject* root = doc->root;
index 683b041b0e872f01a671a69061d82c7da33b5a81..5e9d30bcdbe6cd651eb6f3aecde17cac628f1c2c 100644 (file)
if (!desktop) {
return;
}
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
index 15b65c239c2297ac9d13b4fa118a56d9ceb446fa..f24a6781b134509b05ebf494edff50d73ebee6a2 100644 (file)
}
void
-sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector)
+sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector)
{
g_return_if_fail (sel != NULL);
g_return_if_fail (SP_IS_GRADIENT_SELECTOR (sel));
@@ -307,7 +307,7 @@ sp_gradient_selector_edit_vector_clicked (GtkWidget */*w*/, SPGradientSelector *
static void
sp_gradient_selector_add_vector_clicked (GtkWidget */*w*/, SPGradientSelector *sel)
{
- Document *doc = sp_gradient_vector_selector_get_document (
+ SPDocument *doc = sp_gradient_vector_selector_get_document (
SP_GRADIENT_VECTOR_SELECTOR (sel->vectors));
if (!doc)
index 63e18554dbc9b4019318a0d185293dd50f59d8e1..e68dfecfcbbe406ff6ecd9f943645c83e2e7950d 100644 (file)
void sp_gradient_selector_set_mode (SPGradientSelector *sel, guint mode);
void sp_gradient_selector_set_units (SPGradientSelector *sel, guint units);
void sp_gradient_selector_set_spread (SPGradientSelector *sel, guint spread);
-void sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector);
+void sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector);
void sp_gradient_selector_set_bbox (SPGradientSelector *sel, gdouble x0, gdouble y0, gdouble x1, gdouble y1);
SPGradientUnits sp_gradient_selector_get_units (SPGradientSelector *sel);
index f64dc7bd8df304ed92fbf8f48d547081bbb79776..ddd9fd96a04ebe3befd53a8302fd7a8252c8db23 100644 (file)
GtkWidget *
gr_vector_list (SPDesktop *desktop, bool selection_empty, SPGradient *gr_selected, bool gr_multi)
{
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
GtkWidget *om = gtk_option_menu_new ();
GtkWidget *m = gtk_menu_new ();
gr_change_widget (SPDesktop *desktop)
{
Inkscape::Selection *selection = sp_desktop_selection (desktop);
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
SPEventContext *ev = sp_desktop_event_context (desktop);
SPGradient *gr_selected = NULL;
index c6a7b37f460e43a09c8c6d9150f764c3be634a34..1f0c077546bc6aa409e3e8a1a140cfddaa68fbb2 100644 (file)
}
GtkWidget *
-sp_gradient_vector_selector_new (Document *doc, SPGradient *gr)
+sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr)
{
GtkWidget *gvs;
}
void
-sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr)
+sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr)
{
static gboolean suppress = FALSE;
@@ -220,7 +220,7 @@ sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Documen
/* The case of setting NULL -> NULL is not very interesting */
}
-Document *
+SPDocument *
sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs)
{
g_return_val_if_fail (gvs != NULL, NULL);
@@ -1037,7 +1037,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient
// Once the user edits a gradient, it stops being auto-collectable
if (SP_OBJECT_REPR(gradient)->attribute("inkscape:collect")) {
- Document *document = SP_OBJECT_DOCUMENT (gradient);
+ SPDocument *document = SP_OBJECT_DOCUMENT (gradient);
bool saved = sp_document_get_undo_sensitive(document);
sp_document_set_undo_sensitive (document, false);
SP_OBJECT_REPR(gradient)->setAttribute("inkscape:collect", NULL);
index aa544475579d68b355e3837f20a8c103a357a1f0..ea1f5159fee1390b4c224c87bafe2e24218a1d9d 100644 (file)
guint idlabel : 1;
- Document *doc;
+ SPDocument *doc;
SPGradient *gr;
/* Vector menu */
GType sp_gradient_vector_selector_get_type(void);
-GtkWidget *sp_gradient_vector_selector_new (Document *doc, SPGradient *gradient);
+GtkWidget *sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gradient);
-void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr);
+void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr);
-Document *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs);
+SPDocument *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs);
SPGradient *sp_gradient_vector_selector_get_gradient (SPGradientVectorSelector *gvs);
/* fixme: rethink this (Lauris) */
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 56602962d373ac0889e8a4351b2a8325654fdf0a..5824b102c9dd8551b7462437187b9ec3942eeecd 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -908,7 +908,7 @@ GdkPixbuf *sp_icon_image_load_pixmap(gchar const *name, unsigned /*lsize*/, unsi
// takes doc, root, icon, and icon name to produce pixels
extern "C" guchar *
-sp_icon_doc_icon( Document *doc, NRArenaItem *root,
+sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
gchar const *name, unsigned psize )
{
bool const dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpSvg");
struct svg_doc_cache_t
{
- Document *doc;
+ SPDocument *doc;
NRArenaItem *root;
};
static guchar *load_svg_pixels(gchar const *name,
unsigned /*lsize*/, unsigned psize)
{
- Document *doc = NULL;
+ SPDocument *doc = NULL;
NRArenaItem *root = NULL;
svg_doc_cache_t *info = NULL;
index d203e094f33131a76400dc59df724c1f0bb4b579..a101b9eeb32bb159671d8d8fa03d1ec04719975e 100644 (file)
* Returns NULL if there are no patterns in the document.
*/
GSList *
-ink_pattern_list_get (Document *source)
+ink_pattern_list_get (SPDocument *source)
{
if (source == NULL)
return NULL;
* Adds menu items for pattern list - derived from marker code, left hb etc in to make addition of previews easier at some point.
*/
static void
-sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, Document */*source*/)
+sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, SPDocument */*source*/)
{
for (; pattern_list != NULL; pattern_list = pattern_list->next) {
@@ -813,7 +813,7 @@ sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, Document */*source*/)
*
*/
static void
-sp_pattern_list_from_doc (GtkWidget *m, Document *current_doc, Document *source, Document *pattern_doc)
+sp_pattern_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *source, SPDocument *pattern_doc)
{
(void)current_doc;
(void)pattern_doc;
@@ -838,9 +838,9 @@ sp_pattern_list_from_doc (GtkWidget *m, Document *current_doc, Document *source,
static void
-ink_pattern_menu_populate_menu(GtkWidget *m, Document *doc)
+ink_pattern_menu_populate_menu(GtkWidget *m, SPDocument *doc)
{
- static Document *patterns_doc = NULL;
+ static SPDocument *patterns_doc = NULL;
// find and load patterns.svg
if (patterns_doc == NULL) {
/* Create new menu widget */
GtkWidget *m = gtk_menu_new();
gtk_widget_show(m);
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (!doc) {
GtkWidget *i;
index 6d28f80e52aae7e0eb99af087e84b105a5027737..f168cedeb3d779b8e6659dabacea369e7fd1e499 100644 (file)
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
sp_document_ensure_up_to_date (document);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
index e0002e5c2b09dfe9e1a056e0d04a94a1770bd842..f502f87d30056c941514065ccc6eb21c6d700124 100644 (file)
sigc::connection marker_mid_menu_connection;
sigc::connection marker_end_menu_connection;
-static SPObject *ink_extract_marker_name(gchar const *n, Document *doc);
+static SPObject *ink_extract_marker_name(gchar const *n, SPDocument *doc);
static void ink_markers_menu_update(Gtk::Container* spw, SPMarkerLoc const which);
static Inkscape::UI::Cache::SvgPreview svg_preview_cache;
g_object_set_data (G_OBJECT (spw), "update", GINT_TO_POINTER (TRUE));
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
@@ -550,7 +550,7 @@ sp_stroke_style_widget_transientize_callback(Inkscape::Application */*inkscape*/
*/
static Gtk::Image *
sp_marker_prev_new(unsigned psize, gchar const *mname,
- Document *source, Document *sandbox,
+ SPDocument *source, SPDocument *sandbox,
gchar const *menu_id, NRArena const */*arena*/, unsigned /*visionkey*/, NRArenaItem *root)
{
// Retrieve the marker named 'mname' from the source SVG document
* Returns NULL if there are no markers in the document.
*/
GSList *
-ink_marker_list_get (Document *source)
+ink_marker_list_get (SPDocument *source)
{
if (source == NULL)
return NULL;
* Adds previews of markers in marker_list to the given menu widget
*/
static void
-sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, Document *source, Document *sandbox, gchar const *menu_id)
+sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, SPDocument *source, SPDocument *sandbox, gchar const *menu_id)
{
// Do this here, outside of loop, to speed up preview generation:
NRArena const *arena = NRArena::create();
@@ -695,7 +695,7 @@ sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, Document *source, Docum
*
*/
static void
-sp_marker_list_from_doc (Gtk::Menu *m, Document */*current_doc*/, Document *source, Document */*markers_doc*/, Document *sandbox, gchar const *menu_id)
+sp_marker_list_from_doc (Gtk::Menu *m, SPDocument */*current_doc*/, SPDocument *source, SPDocument */*markers_doc*/, SPDocument *sandbox, gchar const *menu_id)
{
GSList *ml = ink_marker_list_get(source);
GSList *clean_ml = NULL;
@@ -716,7 +716,7 @@ sp_marker_list_from_doc (Gtk::Menu *m, Document */*current_doc*/, Document *sour
/**
* Returns a new document containing default start, mid, and end markers.
*/
-Document *
+SPDocument *
ink_markers_preview_doc ()
{
gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
@@ -749,9 +749,9 @@ gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=
}
static void
-ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, Document *doc, Document *sandbox)
+ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, SPDocument *doc, SPDocument *sandbox)
{
- static Document *markers_doc = NULL;
+ static SPDocument *markers_doc = NULL;
// add "None"
Gtk::MenuItem *i = new Gtk::MenuItem();
@@ -804,10 +804,10 @@ ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, Document *doc, D
* Creates a menu widget to display markers from markers.svg
*/
static Gtk::OptionMenu *
-ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, Document *sandbox)
+ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, SPDocument *sandbox)
{
SPDesktop *desktop = inkscape_active_desktop();
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Gtk::OptionMenu *mnu = new Gtk::OptionMenu();
/* Create new menu widget */
@@ -850,7 +850,7 @@ sp_marker_select(Gtk::OptionMenu *mnu, Gtk::Container *spw, SPMarkerLoc const wh
}
SPDesktop *desktop = inkscape_active_desktop();
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
if (!document) {
return;
}
static void
ink_markers_menu_update(Gtk::Container* /*spw*/, SPMarkerLoc const which) {
SPDesktop *desktop = inkscape_active_desktop();
- Document *document = sp_desktop_document(desktop);
- Document *sandbox = ink_markers_preview_doc ();
+ SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *sandbox = ink_markers_preview_doc ();
Gtk::Menu *m;
int pos;
// TODO: this code can be shortened by iterating over the possible menus!
// doing this here once, instead of for each preview, to speed things up
- Document *sandbox = ink_markers_preview_doc ();
+ SPDocument *sandbox = ink_markers_preview_doc ();
// TRANSLATORS: Path markers are an SVG feature that allows you to attach arbitrary shapes
// (arrowheads, bullets, faces, whatever) to the start, end, or middle nodes of a path.
Gtk::Adjustment *ml = static_cast<Gtk::Adjustment *>(spw->get_data("miterlimit"));
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
@@ -1833,7 +1833,7 @@ sp_stroke_style_update_marker_menus(Gtk::Container *spw, GSList const *objects)
* the caller should free the buffer when they no longer need it.
*/
static SPObject*
-ink_extract_marker_name(gchar const *n, Document *doc)
+ink_extract_marker_name(gchar const *n, SPDocument *doc)
{
gchar const *p = n;
while (*p != '\0' && *p != '#') {
index c13ad9ba65e95bfbde504e33917480cf3ea50565..8bb15ae6fb826f4b16ff5f43f43a7b094e38ac22 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -1886,7 +1886,7 @@ void toggle_snap_callback (GtkToggleAction *act, gpointer data) { //data points
SPDesktop *dt = reinterpret_cast<SPDesktop*>(ptr);
SPNamedView *nv = sp_desktop_namedview(dt);
- Document *doc = SP_OBJECT_DOCUMENT(nv);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(nv);
if (dt == NULL || nv == NULL) {
g_warning("No desktop or namedview specified (in toggle_snap_callback)!");
box3d_angle_value_changed(GtkAdjustment *adj, GObject *dataKludge, Proj::Axis axis)
{
SPDesktop *desktop = (SPDesktop *) g_object_get_data( dataKludge, "desktop" );
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
// quit if run by the attr_changed or selection changed listener
if (g_object_get_data( dataKludge, "freeze" )) {
@@ -3407,7 +3407,7 @@ static void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions,
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
EgeAdjustmentAction* eact = 0;
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Persp3D *persp = document->current_persp3d;
EgeAdjustmentAction* box3d_angle_x = 0;
static void connector_spacing_changed(GtkAdjustment *adj, GObject* tbl)
{
SPDesktop *desktop = (SPDesktop *) g_object_get_data( tbl, "desktop" );
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
if (!sp_document_get_undo_sensitive(doc))
{
diff --git a/src/xml/document.h b/src/xml/document.h
index a5f457fe89f8738635fd69918cf4c95d5ceb2491..2b9ea5cc3c8ebd12648af2d8cdbfbd51ff1747c7 100644 (file)
--- a/src/xml/document.h
+++ b/src/xml/document.h
*
*/
-#ifndef SEEN_INKSCAPE_XML_SP_REPR_DOCTREE_H
-#define SEEN_INKSCAPE_XML_SP_REPR_DOCTREE_H
+#ifndef SEEN_INKSCAPE_XML_SP_REPR_DOC_H
+#define SEEN_INKSCAPE_XML_SP_REPR_DOC_H
#include "xml/xml-forward.h"
#include "xml/node.h"
* "restore point" by calling beginTransaction() again. There can be only one active
* transaction at a time for a given document.
*/
-class DocumentTree : virtual public Node {
+struct Document : virtual public Node {
public:
/**
* @name Document transactions
diff --git a/src/xml/node.h b/src/xml/node.h
index 38f006d5c1acb379ae47c12c43374c9d1e77cd64..abcccdb9a68483123cbc293fb2d366b8d6c572bf 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.
index 0fa5c03373b0ec29d82b94aff0a037398026c410..ec43bb178b99fc6f6cefb1f935fb794d4f67fadf 100644 (file)
--- a/src/xml/rebase-hrefs.cpp
+++ b/src/xml/rebase-hrefs.cpp
#include "xml/rebase-hrefs.h"
#include "dir-util.h"
-#include "document.h" /* Unfortunately there's a separate xml/document.h. */
+#include "../document.h" /* Unfortunately there's a separate xml/document.h. */
#include "io/sys.h"
#include "sp-object.h"
#include "streq.h"
*
* \param spns True iff doc should contain sodipodi:absref attributes.
*/
-void Inkscape::XML::rebase_hrefs(Inkscape::XML::Document *doc, gchar const *const new_base, bool const spns)
+void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_base, bool const spns)
{
- gchar *const old_abs_base = calc_abs_doc_base((Inkscape::XML::Document *)(doc)->base);
+ gchar *const old_abs_base = calc_abs_doc_base(doc->base);
gchar *const new_abs_base = calc_abs_doc_base(new_base);
/* TODO: Should handle not just image but also:
@@ -224,7 +224,7 @@ void Inkscape::XML::rebase_hrefs(Inkscape::XML::Document *doc, gchar const *cons
*
* Note also that Inkscape only supports fragment hrefs (href="#pattern257") for many of these
* cases. */
- GSList const *images = sp_document_get_resource_list((Inkscape::XML::Document *)doc, "image");
+ GSList const *images = sp_document_get_resource_list(doc, "image");
for (GSList const *l = images; l != NULL; l = l->next) {
Inkscape::XML::Node *ir = SP_OBJECT_REPR(l->data);
diff --git a/src/xml/rebase-hrefs.h b/src/xml/rebase-hrefs.h
index 36de6ba6e2e102153016a2ee23106f76b7856904..b4f288c4dfcc47830fa415b5a20e15eb1fab0d20 100644 (file)
--- a/src/xml/rebase-hrefs.h
+++ b/src/xml/rebase-hrefs.h
#include <glib/gtypes.h>
#include "util/list.h"
#include "xml/attribute-record.h"
-#include "document.h"
+struct SPDocument;
namespace Inkscape {
namespace XML {
-//struct Document;
gchar *calc_abs_doc_base(gchar const *doc_base);
-void rebase_hrefs(Inkscape::XML::Document *doc, gchar const *new_base, bool spns);
+void rebase_hrefs(SPDocument *doc, gchar const *new_base, bool spns);
Inkscape::Util::List<AttributeRecord const> rebase_href_attrs(
gchar const *old_abs_base,
diff --git a/src/xml/repr-css.cpp b/src/xml/repr-css.cpp
index a7e9138532f4eafe4feedf75165387cba47e6686..be125f45358481f40259bb75bbc6ad297897872f 100644 (file)
--- a/src/xml/repr-css.cpp
+++ b/src/xml/repr-css.cpp
using Inkscape::XML::SimpleNode;
using Inkscape::XML::Node;
using Inkscape::XML::NodeType;
-//using Inkscape::XML::Document;
+using Inkscape::XML::Document;
struct SPCSSAttrImpl : public SimpleNode, public SPCSSAttr {
public:
- SPCSSAttrImpl(Inkscape::XML::Document *doc)
+ SPCSSAttrImpl(Document *doc)
: SimpleNode(g_quark_from_static_string("css"), doc) {}
- SPCSSAttrImpl(SPCSSAttrImpl const &other, Inkscape::XML::Document *doc)
- : SimpleNode(other, (Inkscape::XML::Document *)doc) {}
+ SPCSSAttrImpl(SPCSSAttrImpl const &other, Document *doc)
+ : SimpleNode(other, doc) {}
NodeType type() const { return Inkscape::XML::ELEMENT_NODE; }
protected:
- SimpleNode *_duplicate(Inkscape::XML::Document* doc) const { return new SPCSSAttrImpl(*this, (Inkscape::XML::Document *)doc); }
+ SimpleNode *_duplicate(Document* doc) const { return new SPCSSAttrImpl(*this, doc); }
};
static void sp_repr_css_add_components(SPCSSAttr *css, Node *repr, gchar const *attr);
diff --git a/src/xml/repr.h b/src/xml/repr.h
index b40fe63a9876a1582c38cdacec3340e1ea8abf1b..549822e4e1a4c82e7509d51eb2ec805ee3ffe965 100644 (file)
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
gchar const *value);
-inline Inkscape::XML::Node *sp_repr_document_first_child(Inkscape::XML::DocumentTree const *doc) {
+inline Inkscape::XML::Node *sp_repr_document_first_child(Inkscape::XML::Document const *doc) {
return const_cast<Inkscape::XML::Node *>(doc->firstChild());
}
diff --git a/src/xml/xml-forward.h b/src/xml/xml-forward.h
index e3ebad1838fab22fcfd582dee0147a42fe0a6d9f..33218c8ae2378131c88559fca59125d9af1f1066 100644 (file)
--- a/src/xml/xml-forward.h
+++ b/src/xml/xml-forward.h
struct AttributeRecord;
struct CommentNode;
class CompositeNodeObserver;
-class Document;
+struct Document;
class ElementNode;
class Event;
class EventAdd;