2015-12-18 11:00:46 -06:00
|
|
|
// 18 december 2015
|
|
|
|
|
|
|
|
// TODOs
|
|
|
|
// - things look very wrong on initial draw
|
|
|
|
// - initial scrolling is not set properly
|
|
|
|
// - should background be inherited from parent control?
|
|
|
|
|
|
|
|
struct uiArea {
|
|
|
|
uiWindowsControl c;
|
|
|
|
HWND hwnd;
|
|
|
|
uiAreaHandler *ah;
|
|
|
|
|
|
|
|
BOOL scrolling;
|
2016-06-13 20:05:40 -05:00
|
|
|
int scrollWidth;
|
|
|
|
int scrollHeight;
|
2016-06-13 21:00:18 -05:00
|
|
|
int hscrollpos;
|
|
|
|
int vscrollpos;
|
2015-12-18 11:00:46 -06:00
|
|
|
int hwheelCarry;
|
|
|
|
int vwheelCarry;
|
|
|
|
|
|
|
|
clickCounter cc;
|
|
|
|
BOOL capturing;
|
|
|
|
|
2015-12-18 17:06:45 -06:00
|
|
|
BOOL inside;
|
2015-12-18 18:38:21 -06:00
|
|
|
BOOL tracking;
|
2015-12-18 17:06:45 -06:00
|
|
|
|
2015-12-18 11:00:46 -06:00
|
|
|
ID2D1HwndRenderTarget *rt;
|
|
|
|
};
|
|
|
|
|
2016-04-23 14:39:51 -05:00
|
|
|
// areadraw.cpp
|
2015-12-18 11:00:46 -06:00
|
|
|
extern BOOL areaDoDraw(uiArea *a, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *lResult);
|
|
|
|
extern void areaDrawOnResize(uiArea *, RECT *);
|
|
|
|
|
2016-04-23 14:39:51 -05:00
|
|
|
// areascroll.cpp
|
2015-12-18 11:00:46 -06:00
|
|
|
extern BOOL areaDoScroll(uiArea *a, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *lResult);
|
2015-12-19 13:43:34 -06:00
|
|
|
extern void areaScrollOnResize(uiArea *, RECT *);
|
2015-12-18 11:00:46 -06:00
|
|
|
extern void areaUpdateScroll(uiArea *a);
|
|
|
|
|
2016-04-23 14:39:51 -05:00
|
|
|
// areaevents.cpp
|
2015-12-18 11:00:46 -06:00
|
|
|
extern BOOL areaDoEvents(uiArea *a, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *lResult);
|
2015-12-18 20:15:40 -06:00
|
|
|
|
2016-04-23 14:39:51 -05:00
|
|
|
// areautil.cpp
|
2015-12-18 20:38:27 -06:00
|
|
|
extern void loadAreaSize(uiArea *a, ID2D1RenderTarget *rt, double *width, double *height);
|
|
|
|
extern void pixelsToDIP(uiArea *a, double *x, double *y);
|
|
|
|
extern void dipToPixels(uiArea *a, double *x, double *y);
|