unit SchemeVisualCursor;

type

  TSchemeDataObjectDragDrop =
    procedure(Sender,VisualSender:TObject;
    Shift: TShiftState;
    AObject: TAbstractPaintObject;
    X,Y,OffsetX,OffsetY:extended;
    var AEnabled:boolean) of object;

  TSchemeDataObjectAfterDragDrop =
    procedure(Sender,VisualSender:TObject;
    Shift: TShiftState;
    AObject: TAbstractPaintObject;X,Y,OffsetX,OffsetY:extended) of object;


  TSchemeVisualEditorCursor = class(TSchemeVisual)
  public
    constructor Create(AOwner: TComponent); override;
    procedure   CancelObjectMoving(ARepaint:boolean);
    property    ObjectDragging:boolean read FDragging;
  published
    property DragCursor:TCursor read FDragCursor write SetDragCursor;
    property MinZoomForResize:extended read FMinZoomForResize write FMinZoomForResize;
    property EditEnabled:boolean read FEditEnabled write FEditEnabled;
  end;


  TSchemeDataEditorCursor = class(TSchemeDataEditor)
  public
    procedure CanDrop(VisualSender:TObject;
      Shift: TShiftState;
      AObject:TAbstractPaintObject;
      X,Y,OffsetX,OffsetY: extended;
      var AEnabled:boolean);
    procedure ObjectStartDrag(VisualSender:TObject;
      Shift: TShiftState;
      AObject:TAbstractPaintObject;X,Y,OffsetX,OffsetY: extended;
      var AEnabled:boolean);
    procedure ObjectAfterDragDrop(VisualSender:TObject;
      Shift: TShiftState;
      AObject:TAbstractPaintObject;X,Y,OffsetX,OffsetY: extended);
    procedure ObjectBeforeDragDrop(VisualSender:TObject;
      Shift: TShiftState;
      AObject:TAbstractPaintObject;X,Y,OffsetX,OffsetY: extended;
      var AEnabled:boolean);
  published
    property OnObjectStartDrag     :TSchemeDataObjectDragDrop read FOnObjectStartDrag write FOnObjectStartDrag;
    property OnObjectAfterDragDrop :TSchemeDataObjectAfterDragDrop read FOnObjectAfterDragDrop write FOnObjectAfterDragDrop;
    property OnObjectBeforeDragDrop:TSchemeDataObjectDragDrop read FOnObjectBeforeDragDrop write FOnObjectBeforeDragDrop;
    property OnObjectCanDrop       :TSchemeDataObjectDragDrop read FOnObjectCanDrop write FOnObjectCanDrop;
  end;


procedure Register;
