90 #define INITIAL_DELAY 500 91 #define REPEAT_DELAY 50 102 OffsetRect(&rcWindow, -rcWindow.left, -rcWindow.top);
104 *prcTopLeft = *prcBottomRight = rcWindow;
184 return infoPtr->
nPos;
205 return infoPtr->
clrBk;
222 infoPtr->
nWidth = nmpgcs.iWidth;
224 infoPtr->
nHeight = nmpgcs.iHeight;
226 TRACE(
"[%p] PGN_CALCSIZE returns %dx%d\n", infoPtr->
hwndSelf, nmpgcs.iWidth, nmpgcs.iHeight );
235 int nPos = infoPtr->
nPos;
246 if (infoPtr->
nWidth < wndSize)
247 infoPtr->
nWidth = wndSize;
259 if (infoPtr->
nHeight < wndSize)
281 INT wndSize, childSize;
290 childSize = infoPtr->
nWidth;
298 TRACE(
"childSize = %d, wndSize = %d\n", childSize, wndSize);
299 if (childSize > wndSize)
300 scrollRange = childSize - wndSize + infoPtr->
nButtonSize;
315 RECT rcTopLeft, rcBottomRight;
324 if (infoPtr->
nPos > 0)
329 else if (!hideGrayBtns &&
PtInRect(&rcTopLeft,
pt))
334 if (scrollRange <= 0)
339 else if (infoPtr->
nPos < scrollRange)
344 else if (!hideGrayBtns &&
PtInRect(&rcBottomRight,
pt))
360 repaintBtns = (oldTLbtnState != infoPtr->
TLbtnState) ||
372 if ((scrollRange <= 0) || (newPos < 0))
374 else if (newPos > scrollRange)
375 infoPtr->
nPos = scrollRange;
377 infoPtr->
nPos = newPos;
381 if (infoPtr->
nPos != oldPos)
412 if (scrollRange <= 0)
430 infoPtr->
clrBk = clrBk;
523 TRACE(
"[%p] PGN_SCROLL returns iScroll=%d\n", infoPtr->
hwndSelf, nmpgScroll.iScroll);
525 if (nmpgScroll.iScroll > 0)
560 infoPtr = heap_alloc_zero (
sizeof(*infoPtr));
561 if (!infoPtr)
return -1;
565 infoPtr->hwndSelf =
hwnd;
566 infoPtr->hwndChild =
NULL;
568 infoPtr->dwStyle = lpcs->
style;
570 infoPtr->nBorder = 0;
571 infoPtr->nButtonSize = 12;
574 infoPtr->nHeight = 0;
575 infoPtr->bForward =
FALSE;
576 infoPtr->bCapture =
FALSE;
579 infoPtr->direction = -1;
582 FIXME(
"[%p] Drag and Drop style is not implemented yet.\n", infoPtr->hwndSelf);
599 RECT rcChild, rcWindow;
616 infoPtr->
nWidth = lpRect->right - lpRect->left;
617 infoPtr->
nHeight = lpRect->bottom - lpRect->top;
645 RECT rcBottomRight, rcTopLeft;
670 RECT clientRect, rcTopLeft, rcBottomRight;
686 TRACE(
"PGB_TOPORLEFT\n");
691 TRACE(
"PGB_BOTTOMORRIGHT\n");
756 TRACE(
"[%p] draw btn (%s), Capture %s, style %08x\n",
758 (infoPtr->
bCapture) ?
"TRUE" :
"FALSE",
923 TRACE(
"[%p] TIMERID1: style=%08x, dir=%d\n",
986 TRACE(
"(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
1066 case WM_STYLECHANGED:
BOOL WINAPI OffsetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
#define PGB_BOTTOMORRIGHT
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define NM_RELEASEDCAPTURE
GLint GLint GLint GLint GLint x
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define GetWindowLongPtrW
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
DWORD WINAPI GetSysColor(_In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HWND WINAPI GetCapture(void)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define PGM_SETBUTTONSIZE
const char * wine_dbgstr_rect(const RECT *rect)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define PGM_GETBUTTONSIZE
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
HWND WINAPI SetCapture(_In_ HWND hWnd)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDC WINAPI GetWindowDC(_In_opt_ HWND)
GLint GLint GLint GLint GLint GLint y
HWND WINAPI WindowFromPoint(_In_ POINT)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI ReleaseCapture(void)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
GLuint GLuint GLsizei GLenum type
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
static BOOL heap_free(void *mem)
#define PGM_GETBUTTONSTATE