mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
Robert Shearman <[email protected]> - Implement the drag list control. - Fix tabs in LBItemFromPt. - Move string functions to separate file. - Implement string functions in comctl32. - Use CompareString in shlwapi wherever possible instead of ugly helpers. - Forward some wrapper functions since we don't care about compatibility with Win98 in this case. - Documentation update. - Update common control function documentation. - Don't allocate space for text when nMaxTextRows = 0. - Support custom check background. - Reduce number of parameters needed for DrawString function. - Fix some traces. - The TBM_GET*HOTLIST functions take imagelist ID in wParam. - Implement TBM_GETSTRING{A,W}. - Implement undocumented 0x462 message. Alexandre Julliard - Removed a couple of unneeded helper functions. Maxime BellengT <[email protected]> - Fix a regression in ImageList_Create when creating a dibsection. Ulrich Czekalla <[email protected]> - Use dibsections for the images. Dimitrie O. Paun <[email protected]> - LVN_BEGINRDRAG is implemented now. Fix typo. Aric Stewart <[email protected]> - Implemented LISTVIEW_ApproximateViewRect for LVS_REPORT. Fabian Cenedese <[email protected]> - ListView should behave in OWNERDRAW as in FULLROWSELECT. This allows to select cells not in the first column in REPORT mode with OWNERDRAW style set. Matt Chapman <[email protected]> - Fix a reentrancy issue in the property sheet implementation by not caching a pointer that can change. - REBAR_Layout should respect the minimum size of bands even when RBBS_FIXEDSIZE is not set. - REBAR_ShowBand needs to force layout of the rebar after a band is hidden/unhidden. Vitaliy Margolen <[email protected]> - Adjust all dimensions to match native. - Invalidate whole tab area when multi-line. - In vertical tab placement go from top to bottom. - Fix annoying visual artifacts. Huw Davies <[email protected]> - If TBSTYLE_EX_HIDECLIPPEDBUTTONS is set then invalidate the area that changes in a resize. - Don't call SWP unless we're actually adjusting anything. Christian Costa <[email protected]> - Accept null module instance, Loadstring can handle it. Steve Lustbader <[email protected]> - Handle the firstVisible item being NULL in Mike Hearn <[email protected]> - Grow the treeview control expander button by 1px in each direction to match the native look. svn path=/trunk/; revision=8639
137 lines
3.8 KiB
C
137 lines
3.8 KiB
C
/*
|
|
* Undocumented SmoothScrollWindow function from COMCTL32.DLL
|
|
*
|
|
* Copyright 2000 Marcus Meissner <[email protected]>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
* TODO
|
|
* - actually add smooth scrolling
|
|
*/
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include "windef.h"
|
|
#include "winbase.h"
|
|
#include "winreg.h"
|
|
#include "winerror.h"
|
|
#include "wingdi.h"
|
|
#include "winuser.h"
|
|
#include "winnls.h"
|
|
#include "commctrl.h"
|
|
#include "wine/debug.h"
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
|
|
|
static DWORD smoothscroll = 2;
|
|
|
|
typedef BOOL (CALLBACK *SCROLLWINDOWEXPROC)(HWND,INT,INT,LPRECT,LPRECT,HRGN,LPRECT,DWORD);
|
|
typedef struct tagSMOOTHSCROLLSTRUCT {
|
|
DWORD dwSize;
|
|
DWORD x2;
|
|
HWND hwnd;
|
|
DWORD dx;
|
|
|
|
DWORD dy;
|
|
LPRECT lpscrollrect;
|
|
LPRECT lpcliprect;
|
|
HRGN hrgnupdate;
|
|
|
|
LPRECT lpupdaterect;
|
|
DWORD flags;
|
|
DWORD stepinterval;
|
|
DWORD dx_step;
|
|
|
|
DWORD dy_step;
|
|
SCROLLWINDOWEXPROC scrollfun; /* same parameters as ScrollWindowEx */
|
|
} SMOOTHSCROLLSTRUCT;
|
|
|
|
/**************************************************************************
|
|
* SmoothScrollWindow [COMCTL32.382]
|
|
*
|
|
* Lots of magic for smooth scrolling windows.
|
|
*
|
|
* RETURNS
|
|
* Success: TRUE
|
|
* Failure: FALSE
|
|
*
|
|
* BUGS
|
|
* Currently only scrolls ONCE. The comctl32 implementation uses GetTickCount
|
|
* and what else to do smooth scrolling.
|
|
*/
|
|
BOOL WINAPI SmoothScrollWindow( SMOOTHSCROLLSTRUCT *smooth ) {
|
|
LPRECT lpupdaterect = smooth->lpupdaterect;
|
|
HRGN hrgnupdate = smooth->hrgnupdate;
|
|
RECT tmprect;
|
|
BOOL ret = TRUE;
|
|
DWORD flags = smooth->flags;
|
|
|
|
if (smooth->dwSize!=sizeof(SMOOTHSCROLLSTRUCT))
|
|
return FALSE;
|
|
|
|
if (!lpupdaterect)
|
|
lpupdaterect = &tmprect;
|
|
SetRectEmpty(lpupdaterect);
|
|
|
|
if (!(flags & 0x40000)) { /* no override, use system wide defaults */
|
|
if (smoothscroll == 2) {
|
|
HKEY hkey;
|
|
|
|
smoothscroll = 0;
|
|
if (!RegOpenKeyA(HKEY_CURRENT_USER,"Control Panel\\Desktop",&hkey)) {
|
|
DWORD len = 4;
|
|
|
|
RegQueryValueExA(hkey,"SmoothScroll",0,0,(LPBYTE)&smoothscroll,&len);
|
|
RegCloseKey(hkey);
|
|
}
|
|
}
|
|
if (!smoothscroll)
|
|
flags |= 0x20000;
|
|
}
|
|
|
|
if (flags & 0x20000) { /* are we doing jump scrolling? */
|
|
if ((smooth->x2 & 1) && smooth->scrollfun)
|
|
return smooth->scrollfun(
|
|
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
|
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
|
flags & 0xffff
|
|
);
|
|
else
|
|
return ScrollWindowEx(
|
|
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
|
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
|
flags & 0xffff
|
|
);
|
|
}
|
|
|
|
FIXME("(hwnd=%p,flags=%lx,x2=%lx): should smooth scroll here.\n",
|
|
smooth->hwnd,flags,smooth->x2
|
|
);
|
|
/* FIXME: do timer based smooth scrolling */
|
|
if ((smooth->x2 & 1) && smooth->scrollfun)
|
|
return smooth->scrollfun(
|
|
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
|
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
|
flags & 0xffff
|
|
);
|
|
else
|
|
return ScrollWindowEx(
|
|
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
|
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
|
flags & 0xffff
|
|
);
|
|
return ret;
|
|
}
|