mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:59:06 +02:00
change formatting in some units: decapitalize keywords, spacing
git-svn-id: trunk@13387 -
This commit is contained in:
parent
17a72ca27b
commit
c711f7fcfc
@ -402,7 +402,7 @@ type
|
||||
protected
|
||||
Procedure EndDrag(Target: TObject; X, Y: Integer); Virtual;
|
||||
procedure Finished(Target: TObject; X, Y: Integer; Accepted: Boolean); override;
|
||||
Public
|
||||
public
|
||||
constructor Create(AControl: TControl); virtual;
|
||||
procedure Assign(Source: TDragObject); override;
|
||||
property Control: TControl read FControl write FControl;
|
||||
|
@ -66,8 +66,8 @@ var
|
||||
P: TPoint;
|
||||
begin
|
||||
// start a drag operation, if not already running
|
||||
if (DragControl = nil) then begin
|
||||
|
||||
if (DragControl = nil) then
|
||||
begin
|
||||
// if the last mouse down was not followed by a mouse up, simulate a
|
||||
// mouse up. This way applications need only to react to mouse up to
|
||||
// clean up.
|
||||
@ -76,7 +76,8 @@ begin
|
||||
{$endif}
|
||||
if Immediate then
|
||||
SetCaptureControl(nil);
|
||||
if csLButtonDown in ControlState then begin
|
||||
if csLButtonDown in ControlState then
|
||||
begin
|
||||
GetCursorPos(p);
|
||||
P := ScreenToClient(p);
|
||||
Perform(LM_LBUTTONUP, 0, Integer(PointToSmallPoint(p)));
|
||||
@ -3139,7 +3140,7 @@ end;
|
||||
TControl WMMouseMove
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TControl.WMMouseMove(Var Message: TLMMouseMove);
|
||||
Begin
|
||||
begin
|
||||
{$IFDEF VerboseMouseBugfix}
|
||||
DebugLn(['[TControl.WMMouseMove] ',Name,':',ClassName,' ',Message.XPos,',',Message.YPos]);
|
||||
{$ENDIF}
|
||||
@ -3148,24 +3149,26 @@ Begin
|
||||
if not (csNoStdEvents in ControlStyle)
|
||||
then with Message do
|
||||
MouseMove(KeystoShiftState(Keys), XPos, YPos);
|
||||
End;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
TControl MouseDown
|
||||
------------------------------------------------------------------------------}
|
||||
Procedure TControl.MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
procedure TControl.MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
var
|
||||
P: TPoint;
|
||||
Form: TCustomForm;
|
||||
begin
|
||||
if (not (Self is TWinControl)) or (not TWinControl(Self).CanFocus) then begin
|
||||
if (not (Self is TWinControl)) or (not TWinControl(Self).CanFocus) then
|
||||
begin
|
||||
Form := GetParentForm(Self);
|
||||
if (Form <> nil) and (Form.ActiveControl <> nil) then
|
||||
Form.ActiveControl.EditingDone;
|
||||
end;
|
||||
|
||||
if (Button in [mbLeft,mbRight]) and (DragObject<>nil) then begin
|
||||
if (Button in [mbLeft, mbRight]) and (DragObject <> nil) then
|
||||
begin
|
||||
P := ClientToScreen(Point(X,Y));
|
||||
DragObject.MouseDown(Button, Shift, P.X, P.Y);
|
||||
end;
|
||||
@ -3175,15 +3178,15 @@ end;
|
||||
{------------------------------------------------------------------------------
|
||||
TControl MouseMove
|
||||
------------------------------------------------------------------------------}
|
||||
Procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||
procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
P: TPoint;
|
||||
DragObjectDragging : Boolean;
|
||||
begin
|
||||
if DragObject <> nil then
|
||||
DragObjectDragging := true else
|
||||
DragObjectDragging := false;
|
||||
if DragObjectDragging then begin
|
||||
DragObjectDragging := DragObject <> nil;
|
||||
|
||||
if DragObjectDragging then
|
||||
begin
|
||||
P := ClientToScreen(Point(X, Y));
|
||||
DragObject.MouseMove(Shift, P.X, P.Y);
|
||||
end;
|
||||
@ -3193,16 +3196,16 @@ end;
|
||||
{------------------------------------------------------------------------------
|
||||
TControl MouseUp
|
||||
------------------------------------------------------------------------------}
|
||||
Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;
|
||||
procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;
|
||||
X, Y: Integer);
|
||||
var
|
||||
P: TPoint;
|
||||
DragObjectDragging : Boolean;
|
||||
begin
|
||||
if DragObject <> nil then
|
||||
DragObjectDragging := true else
|
||||
DragObjectDragging := false;
|
||||
if (Button in [mbLeft,mbRight]) and DragObjectDragging then begin
|
||||
DragObjectDragging := DragObject <> nil;
|
||||
|
||||
if (Button in [mbLeft, mbRight]) and DragObjectDragging then
|
||||
begin
|
||||
P := ClientToScreen(Point(X, Y));
|
||||
DragObject.MouseUp(Button, Shift, P.X, P.Y);
|
||||
end;
|
||||
|
@ -23,7 +23,7 @@ var
|
||||
DragThreshold: Integer;// treshold before the drag becomes activated
|
||||
DragImages: TDragImageList; // DragObject.GetDragImages
|
||||
|
||||
Procedure DragTo(const Position: TPoint); forward;
|
||||
procedure DragTo(const Position: TPoint); forward;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
function HostDockSiteManagerAvailable(HostDockSite: TWinControl): boolean;
|
||||
@ -132,7 +132,7 @@ end;
|
||||
it will be started when the user moves the mouse more than DragThreshold
|
||||
pixel.
|
||||
-------------------------------------------------------------------------------}
|
||||
Procedure DragInitControl(Control: TControl; Immediate: Boolean;
|
||||
procedure DragInitControl(Control: TControl; Immediate: Boolean;
|
||||
Threshold: Integer);
|
||||
var
|
||||
ok: boolean;
|
||||
@ -237,12 +237,12 @@ end;
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------}
|
||||
Procedure DragTo(const Position: TPoint);
|
||||
procedure DragTo(const Position: TPoint);
|
||||
var
|
||||
TargetControl: TControl;
|
||||
ADragCursor: TCursor;
|
||||
AAccepted: Boolean;
|
||||
Begin
|
||||
begin
|
||||
{$IFDEF VerboseDrag}
|
||||
DebugLn('DragTo P=', IntToStr(Position.X), ',', IntToStr(Position.Y));
|
||||
{$ENDIF}
|
||||
@ -317,7 +317,7 @@ end;
|
||||
Frees the DragObject if autocreated by the LCL,
|
||||
Finish: DragSave.Finished
|
||||
-------------------------------------------------------------------------------}
|
||||
Procedure DragDone(Drop : Boolean);
|
||||
procedure DragDone(Drop : Boolean);
|
||||
var
|
||||
Accepted: Boolean;
|
||||
OldDragObject: TDragObject;
|
||||
@ -368,7 +368,7 @@ Begin
|
||||
|
||||
// drop
|
||||
if (OldDragObject<>nil) and (OldDragObject.DragTarget <> nil) then
|
||||
Begin
|
||||
begin
|
||||
DragMsg := dmDragDrop;
|
||||
if not Accepted then begin
|
||||
DragMsg := dmDragCancel;
|
||||
|
@ -152,7 +152,8 @@ end;
|
||||
function TDragControlObject.GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor;
|
||||
begin
|
||||
if Accepted then
|
||||
Result := Control.DragCursor else
|
||||
Result := Control.DragCursor
|
||||
else
|
||||
Result := crNoDrop;
|
||||
end;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user