summaryrefslogtreecommitdiffstats
path: root/src/document.h
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-06-04 02:45:55 +0000
committerJon A. Cruz <jon@joncruz.org>2011-06-04 02:45:55 +0000
commit3638efba5bec8a6afc9211aa6bbe289767d20b38 (patch)
treecbf344e828109b1c37e2feee53cddd0c68a8cf83 /src/document.h
parentgerman translation update (diff)
downloadinkscape-3638efba5bec8a6afc9211aa6bbe289767d20b38.tar.gz
inkscape-3638efba5bec8a6afc9211aa6bbe289767d20b38.zip
Removed outdated/unsafe SP_DOCUMENT_DEFS macro and reduced usage of SP_ROOT() gtk type function/macro.
(bzr r10254)
Diffstat (limited to 'src/document.h')
-rw-r--r--src/document.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/document.h b/src/document.h
index 2eb5e2e09..e3c70b2c6 100644
--- a/src/document.h
+++ b/src/document.h
@@ -44,6 +44,7 @@ struct SPDesktop;
struct SPItem;
struct SPObject;
struct SPGroup;
+struct SPRoot;
namespace Inkscape {
struct Application;
@@ -57,9 +58,11 @@ namespace Inkscape {
}
}
+class SPDefs;
class SP3DBox;
class Persp3D;
class Persp3DImpl;
+class SPItemCtx;
namespace Proj {
class TransfMat3x4;
@@ -72,6 +75,8 @@ class SPDocument : public Inkscape::GC::Managed<>,
public Inkscape::GC::Finalized,
public Inkscape::GC::Anchored
{
+// Note: multiple public and private sections is not a good practice, but happens
+// in this class as transitional to fixing encapsulation:
public:
typedef sigc::signal<void, SPObject *> IDChangedSignal;
typedef sigc::signal<void> ResourcesChangedSignal;
@@ -91,7 +96,9 @@ public:
Inkscape::XML::Document *rdoc; ///< Our Inkscape::XML::Document
Inkscape::XML::Node *rroot; ///< Root element of Inkscape::XML::Document
- SPObject *root; ///< Our SPRoot
+private:
+ SPRoot *root; ///< Our SPRoot
+public:
CRCascade *style_cascade;
protected:
@@ -122,7 +129,7 @@ public:
bool oldSignalsConnected;
/** Returns our SPRoot */
- SPObject *getRoot() { return root; }
+ SPRoot *getRoot() { return root; }
Inkscape::XML::Node *getReprRoot() { return rroot; }
@@ -141,6 +148,9 @@ public:
/** basename(uri) or other human-readable label for the document. */
gchar const* getName() const { return name; }
+ /** Return the main defs object for the document. */
+ SPDefs *getDefs();
+
void setCurrentPersp3D(Persp3D * const persp);
inline void setCurrentPersp3DImpl(Persp3DImpl * const persp_impl) { current_persp3d_impl = persp_impl; }
@@ -248,6 +258,7 @@ public:
private:
void do_change_uri(gchar const *const filename, bool const rebase);
+ void setupViewport(SPItemCtx *ctx);
};
struct SPUnit;