using System.Collections.Generic; using DelftTools.Utils.Editing; using GeoAPI.Extensions.Feature; using GeoAPI.Geometries; using SharpMap.Api.Delegates; using SharpMap.Api.Layers; namespace SharpMap.Api.Editors { /// /// Feature interaction using trackers. See also . /// public interface IFeatureInteractor { /// /// original feature (geometry in coordinate system of Layer) /// IFeature SourceFeature { get; } /// /// a clone of the original feature used during the editing process (geometry in coordinate system of Layer) /// IFeature TargetFeature { get; } /// /// TODO: get rid of this event! Add GetRelatedFeatures in IRelatedFeatureEditor instead /// event WorkerFeatureCreated WorkerFeatureCreated; /// /// tolerance in world coordinates used by the editor when no CoordinateConverter is available /// double Tolerance { get; set; } /// /// TODO: remove dependency on layer! /// ILayer Layer { get; } /// /// Fall-Off policy used during edit. /// IFallOffPolicy FallOffPolicy { get; set; } /// /// Trackers available for the current feature (geometry in coordinate system of Layer). /// /// IList Trackers { get; } /// /// Moves selected trackers. is leading and will be used as source for /// falloff policy. /// bool MoveTracker(TrackerFeature trackerFeature, double deltaX, double deltaY, SnapResult snapResult = null); /// /// Deletes selected trackers. /// bool RemoveTracker(TrackerFeature trackerFeature); /// /// Adds a tracker. /// bool InsertTracker(ICoordinate coordinate, int index); /// /// Sets the selection state of a tracker. /// /// /// void SetTrackerSelection(TrackerFeature trackerFeature, bool select); /// /// Returns the track at the given position, or may return the AllTracker for line-like geometries. /// /// /// TrackerFeature GetTrackerAtCoordinate(ICoordinate worldPos); /// /// TODO: remove it ?!?!? /// Synchronizes the location of the the tracker with the location of the geometry /// of the feature. /// e.g. when a structure is moved the tracker is set at the center of the structure. /// /// void UpdateTracker(IGeometry geometry); /// /// Starts the change operation of the feature. /// void Start(); /// /// Stops the change operation of the feature. Enables the editor to cleanup. /// void Stop(); /// /// Stops the change operation of the feature. Enables the editor to cleanup. /// /// contains a snap result that can be used by the editor to connect the feature to other features. void Stop(SnapResult snapResult); void Add(IFeature feature); void Delete(); bool AllowMove(); bool AllowDeletion(); bool AllowSingleClickAndMove(); /// /// TODO: YAGNI, do it using feature, somewhere else /// IEditableObject EditableObject { get; set; } } }