started OnMouseEnter and OnMouseLeave

git-svn-id: trunk@1373 -
This commit is contained in:
mattias 2002-02-09 01:48:20 +00:00
parent c1efaaae33
commit 5e9a551598
2 changed files with 34 additions and 9 deletions

View File

@ -489,6 +489,7 @@ type
FLastResizeClientWidth: integer;
FLastWidth : Integer;
FLeft: Integer;
FMouseEntered: boolean;
FOnActivate : TNotifyEvent;
FOnResize: TNotifyEvent;
FOnClick: TNotifyEvent;
@ -503,6 +504,8 @@ type
FOnMouseDown : TMouseEvent;
FOnMouseMove : TMouseMoveEvent;
FOnMouseUp: TMouseEvent;
FOnMouseEnter: TNotifyEvent;
FOnMouseLeave: TNotifyEvent;
FOnStartDrag: TStartDragEvent;
FParent: TWinControl;
FParentColor : Boolean;
@ -516,6 +519,7 @@ type
FWindowProc: TWndMethod;
FVisible: Boolean;
FTabStop : Boolean;
procedure DoBeforeMouseMessage;
procedure DoConstrainedResize(var NewWidth, NewHeight : integer);
procedure CheckMenuPopup(const P : TSmallPoint);
function GetClientHeight: Integer;
@ -655,6 +659,8 @@ type
property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown;
property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove;
property OnMouseUp: TMouseEvent read FOnMouseUp write FOnMouseUp;
property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;
property OnStartDrag: TStartDragEvent read FOnStartDrag write FOnStartDrag;
property TabStop : Boolean read FTabStop write SetTabStop;
@ -1442,6 +1448,9 @@ end.
{ =============================================================================
$Log$
Revision 1.91 2002/11/21 18:49:52 mattias
started OnMouseEnter and OnMouseLeave
Revision 1.90 2002/11/09 15:02:06 lazarus
MG: fixed LM_LVChangedItem, OnShowHint, small bugs

View File

@ -243,10 +243,9 @@ begin
CaptureControl := GetCaptureControl;
if FMouseControl <> CurrentControl then
begin
if CaptureControl = nil
then IsOther := FMouseControl <> nil
else IsOther := FMouseControl = CaptureControl;
IsOther:=((FMouseControl <> nil) and (CaptureControl = nil)) or
((CaptureControl <> nil) and (FMouseControl = CaptureControl));
if IsOther and (FMouseControl<>nil) then
FMouseControl.Perform(CM_MOUSELEAVE, 0, 0);
FMouseControl := CurrentControl;
@ -787,11 +786,25 @@ begin
FOnUserInputHandler.Remove(TMethod(AnOnUserInputHandler));
end;
{------------------------------------------------------------------------------}
{ TApplication CreateForm }
{ Create a Form instance and sets the pointer to the internal form }
{ variable and loads the form into the application forms list }
{------------------------------------------------------------------------------}
{------------------------------------------------------------------------------
procedure TApplication.DoBeforeMouseMessage(CurMouseControl: TControl);
------------------------------------------------------------------------------}
procedure TApplication.DoBeforeMouseMessage(CurMouseControl: TControl);
begin
if (FMouseControl<>CurMouseControl) then begin
if (FMouseControl<>nil) then
FMouseControl.Perform(CM_MOUSELEAVE, 0, 0);
FMouseControl := CurMouseControl;
if (FMouseControl<>nil) then
FMouseControl.Perform(CM_MOUSEENTER, 0, 0);
end;
end;
{------------------------------------------------------------------------------
TApplication CreateForm
Create a Form instance and sets the pointer to the internal form
variable and loads the form into the application forms list
------------------------------------------------------------------------------}
procedure TApplication.CreateForm(InstanceClass: TComponentClass;
var Reference);
var
@ -837,6 +850,9 @@ end;
{ =============================================================================
$Log$
Revision 1.38 2002/11/21 18:49:52 mattias
started OnMouseEnter and OnMouseLeave
Revision 1.37 2002/11/15 23:40:39 mattias
added combobox createhandle old list assign