summaryrefslogtreecommitdiffstats
path: root/src/connector-context.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-13 16:13:17 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-13 16:13:17 +0000
commitfbdc8b84ff670c684dafc7d7d403ed01e7077e70 (patch)
tree964a82e4e94d8d6602e90893ac51ac9e2f7ec362 /src/connector-context.cpp
parentMade factory a template. (diff)
downloadinkscape-fbdc8b84ff670c684dafc7d7d403ed01e7077e70.tar.gz
inkscape-fbdc8b84ff670c684dafc7d7d403ed01e7077e70.zip
Replaced casting macros for EventContext tree; added contructors.
(bzr r11608.1.96)
Diffstat (limited to 'src/connector-context.cpp')
-rw-r--r--src/connector-context.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/connector-context.cpp b/src/connector-context.cpp
index 5c7bf97c8..d5a628d46 100644
--- a/src/connector-context.cpp
+++ b/src/connector-context.cpp
@@ -171,6 +171,21 @@ static Inkscape::XML::NodeEventVector layer_repr_events = {
NULL /* order_changed */
};
+
+#include "sp-factory.h"
+
+namespace {
+ SPEventContext* createConnectorContext() {
+ return new SPConnectorContext();
+ }
+
+ bool connectorContextRegistered = ToolFactory::instance().registerObject("/tools/connector", createConnectorContext);
+}
+
+const std::string& CConnectorContext::getPrefsPath() {
+ return SPConnectorContext::prefsPath;
+}
+
const std::string SPConnectorContext::prefsPath = "/tools/connector";
G_DEFINE_TYPE(SPConnectorContext, sp_connector_context, SP_TYPE_EVENT_CONTEXT);
@@ -200,6 +215,7 @@ SPConnectorContext::SPConnectorContext() : SPEventContext() {
cc->cconnectorcontext = new CConnectorContext(cc);
delete cc->ceventcontext;
cc->ceventcontext = cc->cconnectorcontext;
+ types.insert(typeid(SPConnectorContext));
cc->red_curve = 0;
cc->isOrthogonal = false;