summaryrefslogtreecommitdiffstats
path: root/src/document.h
diff options
context:
space:
mode:
authorAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
committerAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
commit8867de5daf309e4cdd3fce177b408618490be4f3 (patch)
tree19a528d472e7a63f9cab97daa5c979d977db821b /src/document.h
parentminor fix in Dutch translation of win32 installer (diff)
downloadinkscape-8867de5daf309e4cdd3fce177b408618490be4f3.tar.gz
inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.zip
This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options].
(bzr r9546.1.1)
Diffstat (limited to 'src/document.h')
-rw-r--r--src/document.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/document.h b/src/document.h
index e70582006..2f9da7817 100644
--- a/src/document.h
+++ b/src/document.h
@@ -64,10 +64,11 @@ namespace Proj {
class SPDocumentPrivate;
/// Typed SVG document implementation.
-struct SPDocument : public Inkscape::GC::Managed<>,
+class 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;
@@ -180,13 +181,17 @@ public:
sigc::connection _desktop_activated_connection;
void fitToRect(Geom::Rect const &rect, bool with_margins = false);
+ static SPDocument *createDoc(const gchar *uri, unsigned int keepalive, bool make_new = false);
+ static SPDocument *createDocFromMem(const gchar *buffer, gint length, unsigned int keepalive);
+ SPDocument *doRef();
+ SPDocument *doUnref();
};
-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);
+//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);
-SPDocument *sp_document_ref(SPDocument *doc);
-SPDocument *sp_document_unref(SPDocument *doc);
+//SPDocument *sp_document_ref(SPDocument *doc);
+//SPDocument *sp_document_unref(SPDocument *doc);
SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive);