2 * PROJECT: ReactOS Clipboard Viewer
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Scrolling related helper functions.
5 * COPYRIGHT: Copyright 2015-2018 Ricardo Hanke
6 * Copyright 2015-2018 Hermes Belusca-Maito
11 typedef struct _SCROLLSTATE
13 UINT uLinesToScroll
; /* Number of lines to scroll on one wheel rotation movement (== one "click" == WHEEL_DELTA ticks) */
14 INT iWheelCarryoverX
; /* Unused wheel ticks (< WHEEL_DELTA) */
16 INT nPageX
; /* Number of lines per page */
18 INT CurrentX
; /* Current scrollbar position */
20 INT MaxX
; /* Maximum scrollbar position */
22 INT nMaxWidth
; /* Maximum span of displayed data */
24 } SCROLLSTATE
, *LPSCROLLSTATE
;
26 void OnKeyScroll(HWND hWnd
, WPARAM wParam
, LPARAM lParam
, LPSCROLLSTATE state
);
27 void OnMouseScroll(HWND hWnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
, LPSCROLLSTATE state
);
28 void OnScroll(HWND hWnd
, INT nBar
, WPARAM wParam
, INT iDelta
, LPSCROLLSTATE state
);
30 void UpdateLinesToScroll(LPSCROLLSTATE state
);
31 void UpdateWindowScrollState(HWND hWnd
, INT nMaxWidth
, INT nMaxHeight
, LPSCROLLSTATE lpState
);