From 17fc8249170e813e894645da3cbbed8044a62b4c Mon Sep 17 00:00:00 2001 From: Margers Date: Tue, 24 Sep 2024 11:23:04 +0000 Subject: [PATCH] Mouse scroll (fast) Compiler Messages and Messages windows --- packages/ide/wviews.pas | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/packages/ide/wviews.pas b/packages/ide/wviews.pas index 3ab2f04d35..f1854e5d43 100644 --- a/packages/ide/wviews.pas +++ b/packages/ide/wviews.pas @@ -1510,15 +1510,35 @@ end; procedure TLocalMenuListBox.HandleEvent(var Event: TEvent); var DontClear: boolean; P: TPoint; + + PROCEDURE MoveFocus (Req: Sw_Integer); + BEGIN + FocusItemNum(Req); { Focus req item } + DrawView; { Redraw focus box } + END; + begin case Event.What of evMouseDown : - if MouseInView(Event.Where) and (Event.Buttons=mbRightButton) then + if MouseInView(Event.Where) then + begin + if (Event.Buttons=mbRightButton) then begin MakeLocal(Event.Where,P); Inc(P.X); Inc(P.Y); LocalMenu(P); ClearEvent(Event); - end; + end else + if (Event.Buttons=mbScrollUp) then { mouse scroll up} + begin + if Event.Double then MoveFocus(Focused+6) else MoveFocus(Focused+1); + ClearEvent(Event); + end else + if (Event.Buttons=mbScrollDown) then { mouse scroll down } + begin + if Event.Double then MoveFocus(Focused-6) else MoveFocus(Focused-1); + ClearEvent(Event); + end; + end; evKeyDown : begin DontClear:=false;