diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-28 15:35:56 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-28 15:35:56 +0100 |
commit | a490cd3b653b20bf4d28d70d62e7a6a7f03738ac (patch) | |
tree | bc342d2d034bd07c56b2836fe05c70ec265e95b1 | |
parent | a1e092637a3ef239557009d807b59c7f4ba42ced (diff) | |
download | fpGUI-a490cd3b653b20bf4d28d70d62e7a6a7f03738ac.tar.xz |
TfpgWidget: Implements a new OnMouseScroll event
-rw-r--r-- | src/corelib/fpg_widget.pas | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/fpg_widget.pas b/src/corelib/fpg_widget.pas index 50bb0295..108c9238 100644 --- a/src/corelib/fpg_widget.pas +++ b/src/corelib/fpg_widget.pas @@ -55,6 +55,7 @@ type FOnMouseExit: TNotifyEvent; FOnMouseMove: TMouseMoveEvent; FOnMouseUp: TMouseButtonEvent; + FOnMouseScroll: TMouseWheelEvent; FOnPaint: TPaintEvent; FOnKeyPress: TKeyPressEvent; FOnResize: TNotifyEvent; @@ -151,6 +152,7 @@ type property OnMouseExit: TNotifyEvent read FOnMouseExit write FOnMouseExit; property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove; property OnMouseUp: TMouseButtonEvent read FOnMouseUp write FOnMouseUp; + property OnMouseScroll: TMouseWheelEvent read FOnMouseScroll write FOnMouseScroll; property OnPaint: TPaintEvent read FOnPaint write FOnPaint; property OnResize: TNotifyEvent read FOnResize write FOnResize; property OnShowHint: THintEvent read GetOnShowHint write SetOnShowHint; @@ -1180,7 +1182,8 @@ end; procedure TfpgWidget.HandleMouseScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); begin - // do nothing yet + if Assigned(FOnMouseScroll) then + FOnMouseScroll(self, shiftstate, delta, Point(x, y)); end; function TfpgWidget.FindFocusWidget(startwg: TfpgWidget; direction: TFocusSearchDirection): TfpgWidget; |