summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fba422d)
raw | patch | inline | side by side (parent: fba422d)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 13 Mar 2008 12:04:23 +0000 (12:04 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 13 Mar 2008 12:04:23 +0000 (12:04 +0000) |
src/display/snap-indicator.cpp | patch | blob | history |
index ba9c10ef2dfc99668793b77ce603c167cb398a3c..b6046e88c5ea504f60515c6474e4c53267b64084 100644 (file)
namespace Inkscape {\r
namespace Display {\r
\r
-/** lifetime is measured in milliseconds\r
- */\r
SnapIndicator::SnapIndicator(SPDesktop * desktop)\r
: tempitem(NULL),\r
desktop(desktop)\r
{\r
remove_snappoint();\r
\r
- SPCanvasItem * canvasitem = sp_canvas_item_new( sp_desktop_tempgroup (desktop),\r
- SP_TYPE_CTRL,\r
- "anchor", GTK_ANCHOR_CENTER,\r
- "size", 6.0,\r
- "stroked", TRUE,\r
- "stroke_color", 0xf000f0ff,\r
- "mode", SP_KNOT_MODE_XOR,\r
- "shape", SP_KNOT_SHAPE_CROSS,\r
- NULL );\r
- SP_CTRL(canvasitem)->moveto ( p );\r
- tempitem = desktop->add_temporary_canvasitem(canvasitem, 1000);\r
+ bool enabled = false; // TODO add preference for snap indicator.\r
+ if (enabled) {\r
+ // TODO add many different kinds of snap indicator :-)\r
+ SPCanvasItem * canvasitem = sp_canvas_item_new( sp_desktop_tempgroup (desktop),\r
+ SP_TYPE_CTRL,\r
+ "anchor", GTK_ANCHOR_CENTER,\r
+ "size", 10.0,\r
+ "stroked", TRUE,\r
+ "stroke_color", 0xf000f0ff,\r
+ "mode", SP_KNOT_MODE_XOR,\r
+ "shape", SP_KNOT_SHAPE_CROSS,\r
+ NULL );\r
+ SP_CTRL(canvasitem)->moveto ( p );\r
+ tempitem = desktop->add_temporary_canvasitem(canvasitem, 1000); // TODO add preference for snap indicator timeout\r
+ }\r
}\r
\r
void\r