mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:31:40 +00:00
[CLIPBRD] Improvements for the Clipboard Viewer.
- Improve the scrolling support for bitmaps, DIBs and text formats. This completes the work started in CORE-10679 by Ricardo Hanke. Includes scrolling with the keyboard and the mouse wheel. - Add support for the CF_DSP* clipboard formats, as well as CF_TEXT and CF_OEMTEXT. - Add support for owner-display clipboard format CF_OWNERDISPLAY. - Realize any palette found in the clipboard (CF_PALETTE) before displaying the clipboard data format we want. - Remove dead code. - Update the file headers.
This commit is contained in:
parent
5a00192870
commit
ebe3d5273e
12 changed files with 1000 additions and 546 deletions
|
@ -1,22 +1,31 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Clipboard Viewer
|
||||
* FILE: base/applications/clipbrd/scrollutils.h
|
||||
* PURPOSE: Scrolling related helper functions.
|
||||
* PROGRAMMERS: Ricardo Hanke
|
||||
* PROJECT: ReactOS Clipboard Viewer
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: Scrolling related helper functions.
|
||||
* COPYRIGHT: Copyright 2015-2018 Ricardo Hanke
|
||||
* Copyright 2015-2018 Hermes Belusca-Maito
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef struct _SCROLLSTATE
|
||||
{
|
||||
int CurrentX;
|
||||
int CurrentY;
|
||||
int MaxX;
|
||||
int MaxY;
|
||||
UINT uLinesToScroll; /* Number of lines to scroll on one wheel rotation movement (== one "click" == WHEEL_DELTA ticks) */
|
||||
INT iWheelCarryoverX; /* Unused wheel ticks (< WHEEL_DELTA) */
|
||||
INT iWheelCarryoverY;
|
||||
INT nPageX; /* Number of lines per page */
|
||||
INT nPageY;
|
||||
INT CurrentX; /* Current scrollbar position */
|
||||
INT CurrentY;
|
||||
INT MaxX; /* Maximum scrollbar position */
|
||||
INT MaxY;
|
||||
INT nMaxWidth; /* Maximum span of displayed data */
|
||||
INT nMaxHeight;
|
||||
} SCROLLSTATE, *LPSCROLLSTATE;
|
||||
|
||||
void HandleKeyboardScrollEvents(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
void HandleMouseScrollEvents(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
|
||||
void HandleHorizontalScrollEvents(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
|
||||
void HandleVerticalScrollEvents(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
|
||||
void UpdateWindowScrollState(HWND hWnd, HBITMAP hBmp, LPSCROLLSTATE lpState);
|
||||
BOOL ScrollBlt(PAINTSTRUCT ps, HBITMAP hBmp, SCROLLSTATE state);
|
||||
void OnKeyScroll(HWND hWnd, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
|
||||
void OnMouseScroll(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
|
||||
void OnScroll(HWND hWnd, INT nBar, WPARAM wParam, INT iDelta, LPSCROLLSTATE state);
|
||||
|
||||
void UpdateLinesToScroll(LPSCROLLSTATE state);
|
||||
void UpdateWindowScrollState(HWND hWnd, INT nMaxWidth, INT nMaxHeight, LPSCROLLSTATE lpState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue