diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-08-18 00:38:00 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-08-18 00:38:00 +0000 |
| commit | 0bf5619e6388466b8caaddaf490acc557804f236 (patch) | |
| tree | 5eee95e6e05bdce8ba31f607ebab9bed0f563356 /src/event-context.cpp | |
| parent | Don't draw anchors in LPEToolContext (diff) | |
| download | inkscape-0bf5619e6388466b8caaddaf490acc557804f236.tar.gz inkscape-0bf5619e6388466b8caaddaf490acc557804f236.zip | |
Add a ShapeEditor to LPEToolContext which allows us to edit nodes (switching selections doesn't work right yet; changing the cursor would also be nice)
(bzr r6656)
Diffstat (limited to 'src/event-context.cpp')
| -rw-r--r-- | src/event-context.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/event-context.cpp b/src/event-context.cpp index 450d1994d..b1c4f87ef 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -53,6 +53,8 @@ #include "attributes.h" #include "rubberband.h" #include "selcue.h" +#include "node-context.h" +#include "lpe-tool-context.h" #include "event-context.h" @@ -1036,6 +1038,19 @@ sp_event_context_over_item (SPDesktop *desktop, SPItem *item, NR::Point const p) return item_at_point; } +ShapeEditor * +sp_event_context_get_shape_editor (SPEventContext *ec) +{ + if (SP_IS_NODE_CONTEXT(ec)) { + return SP_NODE_CONTEXT(ec)->shape_editor; + } else if (SP_IS_LPETOOL_CONTEXT(ec)) { + return SP_LPETOOL_CONTEXT(ec)->shape_editor; + } else { + g_warning("ShapeEditor only exists in Node and Geometric Tool."); + return NULL; + } +} + /** * Called when SPEventContext subclass node attribute changed. */ |
