DK11 for Delphi | GisEditor.TGIS_Editor.MouseBegin | Constructors | Methods | Properties | Events
Start the editing of a point at the location given by _pt.
Implements IGIS_Editor.MouseBegin.
// Delphi public procedure MouseBegin( const _pt : TPoint; const _nearest : Boolean );
// C++ Builder public: void MouseBegin( TPoint* const _pt, const bool _nearest );
Name | Type | Description |
---|---|---|
_pt | TPoint | start point defined in screen coordinates |
_nearest | Boolean | if true, then nearest insertion point will be chosen; could be overwritten by Mode property. |
If a point exists near _pt, then it will be moved /if movement occurs/, or otherwise deleted.
Editing must be started by EditShape.
procedure MyClass.GISMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var ll : TGIS_LayerVector ; shp : TGIS_Shape ; begin // start editing of some shape from sidekicks ll := TGIS_LayerVector( GIS.Get('sidekicks') ); shp := ll.Locate( GIS.ScreenToMap( Point(x,y) ), 100/GIS.Zoom ) ; if shp = nil then exit ; // we are not changing the GIS.Mode to TGIS_ViewerMode.Edit because we want to // control editing on our own, so instead we will call MouseBegin, // MouseMove and MouseEnd "manually" GIS.Editor.MouseBegin( Point(x,y), True ); end;