using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using GeoAPI.Extensions.Feature; using SharpMap.UI.Tools; namespace SharpMap.UI.Forms { public interface IMapControl { event MouseEventHandler MouseUp; event KeyEventHandler KeyUp; event KeyEventHandler KeyDown; event EventHandler SelectedFeaturesChanged; Map Map { get; set; } Image Image { get; } IList Tools { get; } MoveTool MoveTool { get; } SelectTool SelectTool { get; } SnapTool SnapTool { get; } IEnumerable SelectedFeatures { get; set; } // common control methods Cursor Cursor { get; set; } Color BackColor { get; } Size ClientSize { get; } Size Size { get; } int Height { get; } int Width { get; } Rectangle ClientRectangle { get; } /// /// True if map control is busy processing something in a separate thread. /// bool IsProcessing { get; } /// /// Gets the , matching on . /// /// Name of the tool. /// An instance of IMapTool matching the given name, or null if no match was found. /// Do not throw ArgumentOutOfRangeException UI handlers (button checked) can ask for not existing tool IMapTool GetToolByName(string toolName); T GetToolByType() where T : class; void ActivateTool(IMapTool tool); /// /// Does a refresh when the timer ticks. /// void Refresh(); Graphics CreateGraphics(); Point PointToScreen(Point location); Point PointToClient(Point p); void Invalidate(Rectangle rectangle); } }