Index: src/Common/SharpMap.UI/Tools/IMapTool.cs
===================================================================
diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a
--- src/Common/SharpMap.UI/Tools/IMapTool.cs (.../IMapTool.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9)
+++ src/Common/SharpMap.UI/Tools/IMapTool.cs (.../IMapTool.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a)
@@ -14,12 +14,59 @@
{
IMapControl MapControl { get; set; }
+ ///
+ /// Indicates whether what the tool renders in world or screen coordinates.
+ /// When tool renders in screen coordinates - results of render are unaffected by dragging, resize, etc.
+ /// Otherwise results of rendering are related to world coordinates (e.g. specific features, like for selections, tooltips)
+ ///
+ bool RendersInScreenCoordinates { get; }
+
+ ///
+ /// Returns true if tool is currently busy (working).
+ ///
+ bool IsBusy { get; }
+
+ ///
+ /// True when tool is currently active (can be used).
+ ///
+ bool IsActive { get; set; }
+
+ ///
+ /// True when tool is currently enabled.
+ ///
+ bool Enabled { get; }
+
+ ///
+ /// Returns true if tool is always active, e.g. mouse wheel zoom,. fixed zoom in/out, zoom to map extent ...
+ ///
+ /// If tool is AlwaysActive - Execute() method should be used and not ActivateTool().
+ ///
+ bool AlwaysActive { get; }
+
+ ///
+ /// User readable name of tool.
+ ///
+ string Name { get; set; }
+
+ ///
+ /// Map tool may be applied only to a set of layers. This property allows to define a filter for these layers.
+ /// Then the layers can be obtained using property.
+ ///
+ Func LayerFilter { get; set; }
+
+ ///
+ /// Returns layers which satisfy .
+ ///
+ IEnumerable Layers { get; }
+
+ Cursor Cursor { get; }
+
void OnMouseDown(ICoordinate worldPosition, MouseEventArgs e);
-
+
void OnBeforeMouseMove(ICoordinate worldPosition, MouseEventArgs e, ref bool handled);
void OnMouseMove(ICoordinate worldPosition, MouseEventArgs e);
-
+
void OnMouseUp(ICoordinate worldPosition, MouseEventArgs e);
void OnMouseWheel(ICoordinate worldPosition, MouseEventArgs e);
@@ -45,13 +92,6 @@
///
void Render(Graphics graphics, Map mapBox);
- ///
- /// Indicates whether what the tool renders in world or screen coordinates.
- /// When tool renders in screen coordinates - results of render are unaffected by dragging, resize, etc.
- /// Otherwise results of rendering are related to world coordinates (e.g. specific features, like for selections, tooltips)
- ///
- bool RendersInScreenCoordinates { get; }
-
void OnMapLayerRendered(Graphics g, ILayer layer);
void OnMapPropertyChanged(object sender, PropertyChangedEventArgs e);
@@ -65,28 +105,6 @@
void OnDragDrop(DragEventArgs e);
///
- /// Returns true if tool is currently busy (working).
- ///
- bool IsBusy { get; }
-
- ///
- /// True when tool is currently active (can be used).
- ///
- bool IsActive { get; set; }
-
- ///
- /// True when tool is currently enabled.
- ///
- bool Enabled { get; }
-
- ///
- /// Returns true if tool is always active, e.g. mouse wheel zoom,. fixed zoom in/out, zoom to map extent ...
- ///
- /// If tool is AlwaysActive - Execute() method should be used and not ActivateTool().
- ///
- bool AlwaysActive { get; }
-
- ///
/// Used for AlwaysActive tools.
///
void Execute();
@@ -96,25 +114,6 @@
///
void Cancel();
- ///
- /// User readable name of tool.
- ///
- string Name { get; set; }
-
- ///
- /// Map tool may be applied only to a set of layers. This property allows to define a filter for these layers.
- /// Then the layers can be obtained using property.
- ///
- Func LayerFilter { get; set; }
-
- ///
- /// Returns layers which satisfy .
- ///
- IEnumerable Layers { get; }
-
- Cursor Cursor { get; }
-
void ActiveToolChanged(IMapTool newTool); // TODO: remove, why tool should know about changes of active tool
-
}
}
\ No newline at end of file