Changes between Initial Version and Version 1 of Ticket #76, comment 5


Ignore:
Timestamp:
Dec 22, 2017, 2:30:08 AM (7 years ago)
Author:
Alfredo Fernández Díaz

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #76, comment 5

    initial v1  
    1 OK, after some research and more PM message tracing I think I am pretty clear on how all of this works; I'm documenting it here to start working later. First some clarifications just in case. Terminology for parameters, etc. adopted from IBM's PM reference:
     1After some research and more PM message tracing I think I am pretty clear on how all of this works; I'll be documenting it here to start working later. First some clarifications just in case. Terminology for parameters, etc. adopted from IBM's PM reference:
    22
    331) 'MB3 drag scrolling' (MB3DS) is a feature present in newer Mozilla and other applications, such as the XWorkPlace WPS extension, or the older !HotScroll. The description in XWP reference is quoted above. Scroll on PM windows with scroll bars starts when MB3 goes down while the mouse pointer is on the window interior, and the mouse is dragged. Content then scrolls following the mouse movement just like the regular scroll bars were used. This has the advantage of not having to reach for them.
     
    1111OTOH Clicking the regular scrollbar bottom arrow will keep sending WM_VSCROLL messages where uscmd = SB_LINEDOWN as long as MB1 is held; releasing the arrow will send another WM_VSCROLL message with uscmd = SB_ENDSCROLL; sslider value is 0 at all times.
    1212
    13 So the difference between MB3DS and regular PM scrolling seems to lie in the sslide value.
     13Thus the difference between MB3DS and regular PM scrolling with arrows seems to lie in the sslide value. Apparently SB_LINE* messages are ignored by eFTE code when sslider = 0, and this MB3DS style does not work on it.
    1414
    15153.1b Scrolling upwards behaves exactly the same, replacing SB_LINEDOWN with SB_LINEUP.
     
    19193.2) When MB3DS is in 'amplified' mode:
    2020
    21 Dragging the mouse sends a WM_VSCROLL message where uscmd = SB_SLIDERTRACK, and sslider varies as the mouse is dragged up and down while MB3 is down.
     21Dragging the mouse sends WM_VSCROLL messages where uscmd = SB_SLIDERTRACK, and sslider varies as the mouse is dragged up and down while MB3 is down.
    2222
    2323When MB3 is released, scrolling is terminated, and a WM_VSCROLL is sent with uscmd = SB_SLIDERPOSITION and the last slider position in sslider.
     24
     25As for bar-based scrolling, when clicking on the slider and dragging the mouse, WM_VSCROLL generated messages have usmd = SB_SLIDERTRACK, and sslider reflects the slider position within the bar (1 = top). When the mouse button is released, the scrolling stops and a WM_VSCROLL message is sent with ucmd = SB_SLIDERPOSITION, and the last slider position in sslider.
     26
     27These are exactly the same messages that MB3DS 'amplified' mode sends, and, as one might expect, both scrolling methods work exactly the same in eFTEPM.
    2428----
    25 So, in principle, all that's left to do :) is accommodate these not-so-special PM messages in the WM_VSCROLL handling block of g_pm.cpp, starting ca. line 1410 and make eFTE2 react to them with the corresponding evCommand / cmVScrollMove, etc. Specific MB3 code (currently some, commented out) can be left for the future, if any specific use for it is found.
     29So, in principle, "all that's left to do" :) is accommodate these not-so-special PM messages in the WM_VSCROLL handling block of g_pm.cpp, starting ca. line 1410 and make eFTE2 react to them with the corresponding evCommand / cmVScrollMove, etc. Specific MB3 code (it seems there is currently some, commented out) can be left for the future, if any specific use for it is found.