View Issue Details

IDProjectCategoryView StatusLast Update
0012081FPCTextmode IDEpublic2019-02-06 03:44
ReporterGerhard MesenichAssigned ToMarco van de Voort 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.10Product Build 
Target VersionFixed in Version3.3.1 
Summary0012081: Mousewheel support in text IDE is missing
DescriptionIn the text IDE editor mousewheel support is missing, which would be very nice to have.
Additional InformationJust redirecing the mousewheel to emulate the up/down keys should be sufficient. Scrolling 3-5 lines per wheel impulse would be apporopriate.
TagsNo tags attached.
Fixed in Revision40832
FPCOldBugId0
FPCTarget
Attached Files
  • scrollide.patch (2,310 bytes)
    Index: packages/fv/src/drivers.pas
    ===================================================================
    --- packages/fv/src/drivers.pas	(revision 40764)
    +++ packages/fv/src/drivers.pas	(working copy)
    @@ -229,10 +229,13 @@
     {                         MOUSE BUTTON STATE MASKS                          }
     {---------------------------------------------------------------------------}
     CONST
    -   mbLeftButton   = $01;                              { Left mouse button }
    -   mbRightButton  = $02;                              { Right mouse button }
    -   mbMiddleButton = $04;                              { Middle mouse button }
    +   mbLeftButton      = $01;                           { Left mouse button }
    +   mbRightButton     = $02;                           { Right mouse button }
    +   mbMiddleButton    = $04;                           { Middle mouse button }
    +   mbScrollWheelDown = $08;                           { Scroll wheel down}
    +   mbScrollWheelUp   = $10;                           { Scroll wheel up }
     
    +
     {---------------------------------------------------------------------------}
     {                         SCREEN CRT MODE CONSTANTS                         }
     {---------------------------------------------------------------------------}
    Index: packages/ide/weditor.pas
    ===================================================================
    --- packages/ide/weditor.pas	(revision 40764)
    +++ packages/ide/weditor.pas	(working copy)
    @@ -3422,6 +3422,7 @@
       E: TEvent;
       OldEvent : PEvent;
       CCAction: TCCAction;
    +  LinesScroll : sw_integer;
     begin
       CCAction:=ccClear;
       E:=Event;
    @@ -3437,6 +3438,18 @@
       case Event.What of
         evMouseDown :
           if MouseInView(Event.Where) then
    +       if (Event.Buttons=mbScrollWheelUp) then { mouse scroll up}
    +         begin
    +           LinesScroll:=1;
    +           if Event.Double then LinesScroll:=LinesScroll+4;
    +           ScrollTo(Delta.X, Delta.Y + LinesScroll);
    +         end else
    +       if (Event.Buttons=mbScrollWheelDown) then  { mouse scroll down }
    +         begin
    +           LinesScroll:=-1;
    +           if Event.Double then LinesScroll:=LinesScroll-4;
    +           ScrollTo(Delta.X, Delta.Y + LinesScroll);
    +         end else
            if (Event.Buttons=mbRightButton) then
              begin
                MakeLocal(Event.Where,P); Inc(P.X); Inc(P.Y);
    
    scrollide.patch (2,310 bytes)

Activities

Marģers

2019-01-05 01:46

reporter  

scrollide.patch (2,310 bytes)
Index: packages/fv/src/drivers.pas
===================================================================
--- packages/fv/src/drivers.pas	(revision 40764)
+++ packages/fv/src/drivers.pas	(working copy)
@@ -229,10 +229,13 @@
 {                         MOUSE BUTTON STATE MASKS                          }
 {---------------------------------------------------------------------------}
 CONST
-   mbLeftButton   = $01;                              { Left mouse button }
-   mbRightButton  = $02;                              { Right mouse button }
-   mbMiddleButton = $04;                              { Middle mouse button }
+   mbLeftButton      = $01;                           { Left mouse button }
+   mbRightButton     = $02;                           { Right mouse button }
+   mbMiddleButton    = $04;                           { Middle mouse button }
+   mbScrollWheelDown = $08;                           { Scroll wheel down}
+   mbScrollWheelUp   = $10;                           { Scroll wheel up }
 
+
 {---------------------------------------------------------------------------}
 {                         SCREEN CRT MODE CONSTANTS                         }
 {---------------------------------------------------------------------------}
Index: packages/ide/weditor.pas
===================================================================
--- packages/ide/weditor.pas	(revision 40764)
+++ packages/ide/weditor.pas	(working copy)
@@ -3422,6 +3422,7 @@
   E: TEvent;
   OldEvent : PEvent;
   CCAction: TCCAction;
+  LinesScroll : sw_integer;
 begin
   CCAction:=ccClear;
   E:=Event;
@@ -3437,6 +3438,18 @@
   case Event.What of
     evMouseDown :
       if MouseInView(Event.Where) then
+       if (Event.Buttons=mbScrollWheelUp) then { mouse scroll up}
+         begin
+           LinesScroll:=1;
+           if Event.Double then LinesScroll:=LinesScroll+4;
+           ScrollTo(Delta.X, Delta.Y + LinesScroll);
+         end else
+       if (Event.Buttons=mbScrollWheelDown) then  { mouse scroll down }
+         begin
+           LinesScroll:=-1;
+           if Event.Double then LinesScroll:=LinesScroll-4;
+           ScrollTo(Delta.X, Delta.Y + LinesScroll);
+         end else
        if (Event.Buttons=mbRightButton) then
          begin
            MakeLocal(Event.Where,P); Inc(P.X); Inc(P.Y);
scrollide.patch (2,310 bytes)

Marģers

2019-01-05 01:48

reporter   ~0113176

patch - simple scroll support (only in code editor window).

Marco van de Voort

2019-01-10 11:51

manager   ~0113298

Committed, thanks

Issue History

Date Modified Username Field Change
2008-09-06 14:03 Gerhard Mesenich New Issue
2008-09-06 17:12 Jonas Maebe FPCOldBugId => 0
2008-09-06 17:12 Jonas Maebe Severity minor => feature
2019-01-05 01:46 Marģers File Added: scrollide.patch
2019-01-05 01:48 Marģers Note Added: 0113176
2019-01-10 11:51 Marco van de Voort Fixed in Revision => 40832
2019-01-10 11:51 Marco van de Voort Note Added: 0113298
2019-01-10 11:51 Marco van de Voort Status new => resolved
2019-01-10 11:51 Marco van de Voort Fixed in Version => 3.3.1
2019-01-10 11:51 Marco van de Voort Resolution open => fixed
2019-01-10 11:51 Marco van de Voort Assigned To => Marco van de Voort