2018-06-09 23:49:44 -05:00
|
|
|
// 10 june 2018
|
|
|
|
|
|
|
|
// table.cpp
|
|
|
|
#define uiprivNumLVN_GETDISPINFOSkip 3
|
|
|
|
struct uiTableModel {
|
|
|
|
uiTableModelHandler *mh;
|
|
|
|
std::vector<uiTable *> *tables;
|
|
|
|
};
|
|
|
|
typedef struct uiprivTableColumnParams uiprivTableColumnParams;
|
|
|
|
struct uiprivTableColumnParams {
|
|
|
|
int textModelColumn;
|
|
|
|
int textEditableColumn;
|
|
|
|
uiTableTextColumnOptionalParams textParams;
|
|
|
|
|
|
|
|
int imageModelColumn;
|
|
|
|
|
|
|
|
int checkboxModelColumn;
|
|
|
|
int checkboxEditableColumn;
|
|
|
|
|
|
|
|
int progressBarModelColumn;
|
|
|
|
|
|
|
|
int buttonModelColumn;
|
|
|
|
int buttonClickableModelColumn;
|
|
|
|
};
|
|
|
|
struct uiTable {
|
|
|
|
uiWindowsControl c;
|
|
|
|
uiTableModel *model;
|
|
|
|
HWND hwnd;
|
|
|
|
std::vector<uiprivTableColumnParams *> *columns;
|
|
|
|
WPARAM nColumns;
|
|
|
|
int backgroundColumn;
|
2018-06-15 22:00:39 -05:00
|
|
|
// TODO make sure replacing images while selected in the listview is even allowed
|
|
|
|
HIMAGELIST imagelist;
|
2018-06-09 23:49:44 -05:00
|
|
|
};
|
2018-06-12 06:58:27 -05:00
|
|
|
typedef struct uiprivSubitemDrawParams uiprivSubitemDrawParams;
|
|
|
|
struct uiprivSubitemDrawParams {
|
2018-06-13 20:06:08 -05:00
|
|
|
bool selected;
|
2018-06-13 20:46:28 -05:00
|
|
|
LRESULT bitmapMargin;
|
2018-06-12 06:58:27 -05:00
|
|
|
RECT bounds;
|
|
|
|
RECT icon;
|
|
|
|
RECT label;
|
|
|
|
};
|
2018-06-13 20:06:08 -05:00
|
|
|
|
|
|
|
// tabletext.cpp
|
|
|
|
extern HRESULT uiprivLVN_GETDISPINFOText(uiTable *t, NMLVDISPINFOW *nm, uiprivTableColumnParams *p);
|
|
|
|
|
2018-06-10 09:43:29 -05:00
|
|
|
// tableimages.cpp
|
2018-06-09 23:49:44 -05:00
|
|
|
extern HRESULT uiprivLVN_GETDISPINFOImagesCheckboxes(uiTable *t, NMLVDISPINFOW *nm, uiprivTableColumnParams *p);
|
2018-06-12 07:17:31 -05:00
|
|
|
extern HRESULT uiprivNM_CUSTOMDRAWImagesCheckboxes(uiTable *t, NMLVCUSTOMDRAW *nm, uiprivSubitemDrawParams *dp);
|
2018-06-15 09:04:32 -05:00
|
|
|
|
|
|
|
// tabledraw.cpp
|
|
|
|
extern HRESULT uiprivTableHandleNM_CUSTOMDRAW(uiTable *t, NMLVCUSTOMDRAW *nm, LRESULT *lResult);
|
2018-06-15 21:50:19 -05:00
|
|
|
extern HRESULT uiprivUpdateImageListSize(uiTable *t);
|