SavvyUI C++ UI Library
Loading...
Searching...
No Matches
Scrollbar.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4
6{
7public:
8
9 virtual void scrollBarActivity(__int64 firstVisibleItem) = 0;
10 virtual void scrollBarRepaint() = 0;
11};
12
14{
15 Bounds _sbRect, _thumbRect, _upArrowRect, _downArrowRect;
16 __int64 _totalItemCount;
17 __int64 _firstVisibleItem;
18 long _pageSize;
19
20 wstring _orientation;
21
22 ScrollbarListener* _listener;
23
24 wstring _clickedButton;
25 long _thumbLastHitY;
26
27 HDWP _hDwp;
28
29private:
30
31 void thumbPosToRow(int thumbPos);
32
33public:
34
36 virtual ~Scrollbar();
37
38 void setOrientation(const wstring& orientation = L"VERT");
39
42
43 void paint(Graphics* g, const Bounds& rect, __int64 totalItemCount, __int64 firstVisibleItem, long maxVisibleItems);
44
45 BOOL onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed);
46 BOOL onMouseReleased(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed);
47 BOOL onMouseMoved(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed);
48
50};
HWND WinHandle
Definition Common.h:16
Definition Common.h:21
Definition Graphics.h:171
void addListener(ScrollbarListener *l)
long getVScrollbarWidth()
void paint(Graphics *g, const Bounds &rect, __int64 totalItemCount, __int64 firstVisibleItem, long maxVisibleItems)
void setOrientation(const wstring &orientation=L"VERT")
virtual ~Scrollbar()
long getHScrollbarHeight()
BOOL onMouseReleased(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed)
BOOL onMouseMoved(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed)
BOOL onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed)
Definition Scrollbar.h:6
virtual void scrollBarRepaint()=0
virtual void scrollBarActivity(__int64 firstVisibleItem)=0