X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flpe-tool-context.h;h=478989e0ba809eb2e94f7fa0e303488edd74cb37;hb=29e772ffc37a63e0992420b7c9dd6de1dcaf3b14;hp=54716cddf97a38ee06ddf60d2f92ac56539f9bcf;hpb=0953296ad36af782e4f0eadbea0e25d12ecaaf25;p=inkscape.git diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h index 54716cddf..478989e0b 100644 --- a/src/lpe-tool-context.h +++ b/src/lpe-tool-context.h @@ -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)) @@ -29,13 +30,22 @@ class SPLPEToolContextClass; /* This is the list of subtools from which the toolbar of the LPETool is built automatically */ extern const int num_subtools; -extern Inkscape::LivePathEffect::EffectType lpesubtools[]; +struct SubtoolEntry { + Inkscape::LivePathEffect::EffectType type; + gchar const *icon_name; +}; + +extern SubtoolEntry lpesubtools[]; enum LPEToolState { LPETOOL_STATE_PEN, LPETOOL_STATE_NODE }; +namespace Inkscape { +class Selection; +} + class ShapeEditor; struct SPLPEToolContext : public SPPenContext { @@ -43,13 +53,26 @@ struct SPLPEToolContext : public SPPenContext { SPCanvasItem *canvas_bbox; Inkscape::LivePathEffect::EffectType mode; + std::map *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); @@ -64,4 +87,4 @@ GType sp_lpetool_context_get_type(void); fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :