User Tools

Site Tools


api:dk11:delphi:giseditor.tgis_editor.mousebegin_tpoint_boolean

Table of Contents

TGIS_Editor.MouseBegin method

DK11 for Delphi | GisEditor.TGIS_Editor.MouseBegin | Constructors | Methods | Properties | Events

Start the editing of a point at the location given by _pt.

Available also on: .NET | Java | ActiveX.

Syntax

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
  );

Parameters

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.

Remarks

If a point exists near _pt, then it will be moved /if movement occurs/, or otherwise deleted.

Editing must be started by EditShape.

Example

Delphi

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;
2020/05/07 01:07

Page Tools