42 #ifndef _MGUI_CTRL_ITEMVIEW_H 43 #define _MGUI_CTRL_ITEMVIEW_H 59 #define NCSCTRL_ITEMVIEW NCSCLASSNAME("itemview") 87 typedef struct _NCS_CB_ITEMOPS
107 #define NCSS_ITEMV_AUTOSORT (0x0002<<NCSS_SWGT_SHIFT) 113 #define NCSS_ITEMV_LOOP (0x0004<<NCSS_SWGT_SHIFT) 119 #define NCSS_ITEMV_SINGLE (0x0000<<NCSS_SWGT_SHIFT) 125 #define NCSS_ITEMV_MULTIPLE (0x0008<<NCSS_SWGT_SHIFT) 131 #define NCSS_ITEMV_SHIFT (NCSS_SWGT_SHIFT+4) 133 #define pItemList (self->itemList) 135 #define mItemViewHeader(className) \ 136 mScrollWidgetHeader(className) \ 137 NCS_CB_ITEMOPS itemOps; \ 138 mItemManager *itemList; \ 158 mItemViewHeader(mItemView)
161 #define mItemViewClassHeader(clsName, parentClass) \ 162 mScrollWidgetClassHeader(clsName, parentClass) \ 163 int (*onRButtonDown)(clsName*, int x, int y, DWORD keyFlags); \ 164 int (*onRButtonUp)(clsName*, int x, int y, DWORD keyFlags); \ 165 int (*onLButtonDBClk)(clsName*, int x, int y, DWORD keyFlags); \ 166 NCS_CB_DRAWITEM (*setItemDraw)(clsName*, NCS_CB_DRAWITEM func); \ 167 NCS_CB_INITITEM (*setItemInit)(clsName*, NCS_CB_INITITEM func); \ 168 NCS_CB_DSTRITEM (*setItemDestroy)(clsName*, \ 169 NCS_CB_DSTRITEM func); \ 171 NCS_CB_CMPITEM (*setItemCmpFunc)(clsName*, NCS_CB_CMPITEM func); \ 172 HWND (*createItem)(clsName*, HITEM prev, HITEM next, int index, \ 173 int height, const char* text, DWORD addData, int *pos, BOOL adjust); \ 174 int (*insertItem)(clsName*, HITEM hItem, HITEM prev, HITEM next, \ 175 int index, int *pos); \ 176 int (*removeItem)(clsName*, HITEM hItem); \ 177 int (*inItem)(clsName*, int mouseX, int mouseY, HITEM *pRet, POINT *pt);\ 178 NCS_CB_CMPSTR (*setStrCmpFunc)(clsName*, NCS_CB_CMPSTR func); \ 179 NCS_CB_CMPSTR (*getStrCmpFunc)(clsName*); \ 180 void (*setAutoSortItem)(clsName*, BOOL sort); \ 181 int (*getTotalHeight)(clsName*); \ 182 int (*adjustItemsHeight)(clsName*, int diff); \ 183 void (*freeze)(clsName*, BOOL lock); \ 184 BOOL (*isFrozen)(clsName*); \ 185 list_t* (*getQueue)(clsName*); \ 186 HITEM (*getListEntry)(clsName*, list_t* entry); \ 187 HITEM (*getFirstItem)(clsName*); \ 188 int (*isEmpty)(clsName*); \ 189 void (*sortItems)(clsName*, NCS_CB_CMPITEM func); \ 190 BOOL (*removeAll)(clsName*); \ 191 int (*indexOf)(clsName*, HITEM hItem); \ 192 int (*setItemHeight)(clsName*, HITEM hItem, int height); \ 193 int (*getItemHeight)(clsName*, HITEM hItem); \ 194 HITEM (*getNext)(clsName*, HITEM hItem); \ 195 HITEM (*getPrev)(clsName*, HITEM hItem); \ 196 HITEM (*getItem)(clsName*, int index); \ 197 BOOL (*isSelected)(clsName*, HITEM hItem); \ 198 BOOL (*isEnabled)(clsName*, HITEM hItem); \ 199 BOOL (*enable)(clsName*, HITEM hItem, BOOL enable); \ 200 void (*selectAll)(clsName*); \ 201 void (*deselectAll)(clsName*); \ 202 int (*hilight)(clsName*, HITEM hItem); \ 203 HITEM (*getHilight)(clsName*); \ 204 BOOL (*isHilight)(clsName*, HITEM hItem); \ 205 int (*getItemCount)(clsName*); \ 206 DWORD (*getAddData)(clsName*, HITEM hItem); \ 207 void (*setAddData)(clsName*, HITEM hItem, DWORD addData); \ 208 void (*setImage)(clsName*, HITEM hItem, DWORD image); \ 209 DWORD (*getImage)(clsName*, HITEM hItem); \ 210 void (*setFlags)(clsName*, HITEM hItem, DWORD flags); \ 211 DWORD (*getFlags)(clsName*, HITEM hItem); \ 212 BOOL (*setText)(clsName*, HITEM hItem, const char* text); \ 213 const char* (*getText)(clsName*, HITEM hItem); \ 214 int (*getTextLen)(clsName*, HITEM hItem); \ 215 int (*getSelectionCount)(clsName*); \ 216 BOOL (*getSelection)(clsName*, HITEM *pRet, int count); \ 218 BOOL (*select)(clsName*, HITEM hItem); \ 219 BOOL (*deselect)(clsName*, HITEM hItem); \ 220 BOOL (*setTextByIdx)(clsName*, int index, const char* text); \ 221 const char* (*getTextByIdx)(clsName*, int index); \ 223 int (*getFirstVisItem)(clsName*); \ 224 void (*resetContent)(clsName*); \ 225 int (*getRect)(clsName*, HITEM hItem, RECT *rcItem, BOOL bConv); \ 226 int (*getCurSel)(clsName*); \ 227 int (*setCurSel)(clsName*, int newSel); \ 228 void (*refreshItem)(clsName*, HITEM hItem, const RECT *rcInv); \ 229 BOOL (*showItemByIdx)(clsName*, int index); \ 230 BOOL (*showItem)(clsName*, HITEM hItem); 519 struct _mItemViewClass
524 #define mItemViewRendererHeader(clsName, parentClass) \ 525 mScrollWidgetRendererHeader(clsName, parentClass) 532 struct _mItemViewRenderer {
The structure of mItemView renderer, which inheried from mScrollWidgetRenderer.
The virtual function table of mItemView, which derived from mScrollWidgetClass.
The structure of NCS_CB_ITEMOPS. The Item operations interface.
The structure of mItemView control, which derived from mScrollWidget. It is the abstract superclass o...