mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 14:00:18 +02:00
MG: started mouse bugfix and completed Makefile.fpc
git-svn-id: trunk@942 -
This commit is contained in:
parent
a3eb66ce49
commit
60b602e30a
@ -600,6 +600,7 @@ procedure TControl.WndPRoc(var Message : TLMessage);
|
|||||||
Var
|
Var
|
||||||
Form : TCustomForm;
|
Form : TCustomForm;
|
||||||
begin
|
begin
|
||||||
|
//writeln('CCC TControl.WndPRoc ',Name,':',ClassName);
|
||||||
if (csDesigning in ComponentState) then
|
if (csDesigning in ComponentState) then
|
||||||
begin
|
begin
|
||||||
Form := GetParentForm(Self);
|
Form := GetParentForm(Self);
|
||||||
@ -647,26 +648,30 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
case Message.Msg of
|
case Message.Msg of
|
||||||
|
|
||||||
LM_MOUSEMOVE:
|
LM_MOUSEMOVE:
|
||||||
begin
|
begin
|
||||||
Application.HintMouseMessage(Self, Message);
|
Application.HintMouseMessage(Self, Message);
|
||||||
if Dragging then DragObject.MouseMsg(Message);
|
if Dragging then DragObject.MouseMsg(Message);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
LM_LBUTTONDOWN,
|
LM_LBUTTONDOWN,
|
||||||
LM_LBUTTONDBLCLK: begin
|
LM_LBUTTONDBLCLK:
|
||||||
if FDragMode = dmAutomatic
|
begin
|
||||||
then begin
|
if FDragMode = dmAutomatic
|
||||||
Assert(False, 'Trace:Begin AutoDrag called');
|
then begin
|
||||||
BeginAutoDrag;
|
Assert(False, 'Trace:Begin AutoDrag called');
|
||||||
Exit;
|
BeginAutoDrag;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Include(FControlState,csLButtonDown);
|
||||||
end;
|
end;
|
||||||
Include(FControlState,csLButtonDown);
|
|
||||||
end;
|
|
||||||
LM_LBUTTONUP:
|
LM_LBUTTONUP:
|
||||||
Begin
|
begin
|
||||||
Exclude(FControlState, csLButtonDown);
|
Exclude(FControlState, csLButtonDown);
|
||||||
if Dragging then DragObject.MouseMsg(Message);
|
if Dragging then DragObject.MouseMsg(Message);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -701,11 +706,13 @@ end;
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
{ TControl DoMouseDown "Event Handler" }
|
{ TControl DoMouseDown "Event Handler" }
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
procedure TControl.DoMouseDown(var Message: TLMMouse; Button: TMOuseButton; Shift:TShiftState);
|
procedure TControl.DoMouseDown(var Message: TLMMouse; Button: TMOuseButton;
|
||||||
|
Shift:TShiftState);
|
||||||
begin
|
begin
|
||||||
if not (csNoStdEvents in ControlStyle) then
|
if not (csNoStdEvents in ControlStyle) then
|
||||||
Begin
|
Begin
|
||||||
with Message do MouseDown(Button, KeysToShiftState(Keys) + Shift, XPos, YPos);
|
with Message do
|
||||||
|
MouseDown(Button, KeysToShiftState(Keys) + Shift, XPos, YPos);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -715,7 +722,8 @@ end;
|
|||||||
procedure TControl.DoMouseUp(var Message: TLMMouse; Button: TMouseButton);
|
procedure TControl.DoMouseUp(var Message: TLMMouse; Button: TMouseButton);
|
||||||
begin
|
begin
|
||||||
if not (csNoStdEvents in ControlStyle)
|
if not (csNoStdEvents in ControlStyle)
|
||||||
then with Message do MouseUp(Button, KeysToShiftState(Keys), XPos, YPos);
|
then with Message do
|
||||||
|
MouseUp(Button, KeysToShiftState(Keys), XPos, YPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -727,11 +735,13 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TControl.WMLButtonDown(var Message: TLMLButtonDown);
|
procedure TControl.WMLButtonDown(var Message: TLMLButtonDown);
|
||||||
begin
|
begin
|
||||||
// Writeln('TCONTROL WMLBUTTONDOWN 1');
|
{$IFDEF VerboseMouseBugfix}
|
||||||
|
Writeln('TCONTROL WMLBUTTONDOWN A ',Name,':',ClassName);
|
||||||
|
{$ENDIF}
|
||||||
if csCaptureMouse in ControlStyle then MouseCapture := True;
|
if csCaptureMouse in ControlStyle then MouseCapture := True;
|
||||||
if csClickEvents in ControlStyle then Include(FControlState, csClicked);
|
if csClickEvents in ControlStyle then Include(FControlState, csClicked);
|
||||||
DoMouseDown(Message, mbLeft, []);
|
DoMouseDown(Message, mbLeft, []);
|
||||||
// Writeln('TCONTROL WMLBUTTONDOWN 2');
|
//Writeln('TCONTROL WMLBUTTONDOWN B ',Name,':',ClassName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1351,8 +1361,8 @@ end;
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
Procedure TControl.WMDragStart(Var Message: TLMessage);
|
Procedure TControl.WMDragStart(Var Message: TLMessage);
|
||||||
Begin
|
Begin
|
||||||
//do this here?
|
//do this here?
|
||||||
BeginDrag(true);
|
BeginDrag(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1362,9 +1372,12 @@ end;
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
Procedure TControl.WMMouseMove(Var Message: TLMMouseMove);
|
Procedure TControl.WMMouseMove(Var Message: TLMMouseMove);
|
||||||
Begin
|
Begin
|
||||||
if not (csNoStdEvents in COntrolStyle)
|
{$IFDEF VerboseMouseBugfix}
|
||||||
|
writeln('[TControl.WMMouseMove] ',Name,':',ClassName);
|
||||||
|
{$ENDIF}
|
||||||
|
if not (csNoStdEvents in ControlStyle)
|
||||||
then with Message do
|
then with Message do
|
||||||
MouseMove(KeystoShiftState(Keys), XPos, YPos);
|
MouseMove(KeystoShiftState(Keys), XPos, YPos);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
@ -1375,7 +1388,7 @@ End;
|
|||||||
Procedure TControl.MouseDown(Button: TMouseButton; Shift:TShiftState;
|
Procedure TControl.MouseDown(Button: TMouseButton; Shift:TShiftState;
|
||||||
X, Y: Integer);
|
X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnMOuseDown) then FOnMOuseDOwn(Self, Button, Shift, X,Y);
|
if Assigned(FOnMouseDown) then FOnMouseDown(Self, Button, Shift, X,Y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
@ -1385,7 +1398,7 @@ end;
|
|||||||
|
|
||||||
Procedure TControl.MouseMove(Shift:TShiftState; X, Y: Integer);
|
Procedure TControl.MouseMove(Shift:TShiftState; X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnMOuseMove) then FOnMOuseMove(Self, Shift, X,Y);
|
if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, X,Y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
@ -1396,7 +1409,7 @@ end;
|
|||||||
Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;
|
Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;
|
||||||
X, Y: Integer);
|
X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnMOuseUp) then FOnMOuseUp(Self, Button, Shift, X,Y);
|
if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, X,Y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
@ -1727,6 +1740,9 @@ end;
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.52 2002/05/24 07:16:31 lazarus
|
||||||
|
MG: started mouse bugfix and completed Makefile.fpc
|
||||||
|
|
||||||
Revision 1.51 2002/05/20 11:25:29 lazarus
|
Revision 1.51 2002/05/20 11:25:29 lazarus
|
||||||
MG: readded ssTriple/ssQuad compiler directives
|
MG: readded ssTriple/ssQuad compiler directives
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user