Code

fix pasting style after copying a text span
[inkscape.git] / src / lpe-tool-context.h
index dc609ac278391ff99ed18d7b9d840ff9dcef212e..320fa51896d8dad9a60f6e819e212b907cd9f612 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include "pen-context.h"
+#include "helper/units.h"
 
 #define SP_TYPE_LPETOOL_CONTEXT (sp_lpetool_context_get_type())
 #define SP_LPETOOL_CONTEXT(o) (GTK_CHECK_CAST((o), SP_TYPE_LPETOOL_CONTEXT, SPLPEToolContext))
@@ -36,18 +37,38 @@ enum LPEToolState {
     LPETOOL_STATE_NODE
 };
 
+namespace Inkscape {
+class Selection;
+}
+
 class ShapeEditor;
 
 struct SPLPEToolContext : public SPPenContext {
-    //int tool_state;
-
     ShapeEditor* shape_editor;
+    SPCanvasItem *canvas_bbox;
+    Inkscape::LivePathEffect::EffectType mode;
+
+    std::map<SPPath *, SPCanvasItem*> *measuring_items;
+
+    Inkscape::MessageContext *_lpetool_message_context;
 
     sigc::connection sel_changed_connection;
+    sigc::connection sel_modified_connection;
 };
 
 struct SPLPEToolContextClass : public SPEventContextClass{};
 
+int lpetool_mode_to_index(Inkscape::LivePathEffect::EffectType const type);
+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(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);
+void lpetool_update_measuring_items(SPLPEToolContext *lc);
+void lpetool_show_measuring_info(SPLPEToolContext *lc, bool show = true);
+
 GType sp_lpetool_context_get_type(void);
 
 #endif // SP_LPETOOL_CONTEXT_H_SEEN