The virtual function table of mItemView, which derived from mScrollWidgetClass.
More...
#include <mitemview.h>
The virtual function table of mItemView, which derived from mScrollWidgetClass.
- NCS_CB_CMPITEM (*setItemCmpFunc)(mItemView *self, NCS_CB_CMPITEM func);
The function set item's compare function. - Parameters
-
func | The new item's compare function. |
- Returns
- The old item's compare function.
- int (*moveItem)(mItemView *self, mItem *curItem, int count, mItem *prevItem);
The function move the specified items to the specified position. - Parameters
-
curItem | The handle to first moved item. |
count | The count of moved items. |
prevItem | The handle to target item. |
- Returns
- The old compare function.
- int (*insertItem)(mItemView *self, HITEM hItem, HITEM prev, HITEM next, int index, int *pos);
The function is used to insert a item to mItemView. If has NCSF_ITMMNG_AUTOSORT flag, will insert item to sort position. Otherwise, the priority of prev is higher than next, the next is higher than index. - Parameters
-
hItem | The item handle. |
prev | The specified previous position. |
next | The specified next position. |
index | The specified insert position. |
pos | The position in which item has been inserted. It can be NULL. |
- Returns
- 0 on success, otherwise -1.
- HITEM (*createItem)(mItemView *self, HITEM prev, HITEM next, int index, int height, const char* text, DWORD addData, int *pos, BOOL adjust);
The function creates a new item and inserts it to specified position. - Parameters
-
prev | The specified previous position. |
next | The specified next position. |
index | The specified insert position. |
pos | The position in which item has been inserted. It can be NULL. |
adjust | Whether adjust total height or not. |
- Returns
- The handle to new item.
- int (*inItem)(mItemView *self, int mouseX, int mouseY, HITEM *pRet, POINT *pt);
The function gets the item that mouse is in it. - Parameters
-
mouesX | The mouse x position. |
mouseY | The mouse y position. |
pRet | The handle to current item. |
pt | The left-top point of item. |
- Returns
- The index of item on success, otherwise -1.
- NCS_CB_CMPSTR (*setStrCmpFunc)(mItemView *self, NCS_CB_CMPSTR func);
The function sets string compare function. - Parameters
-
func | The new string compare function. |
- Returns
- The old string compare function.
- NCS_CB_CMPSTR (*getStrCmpFunc)(mItemView *self);
The function gets current string compare function.
- int (*getItemYPos)(mItemView *self, HITEM hItem);
The function gets the specified item's starting y position.
- void (*setAutoSortItem) (mItemView *self, BOOL sort);
The function sets or cancels the NCSF_ITMMNG_AUTOSORT style.
- int (*getTotalHeight)(mItemView *self);
The function gets the item's total height.
- int (*adjustItemsHeight)(mItemView *self, int diff);
The function offsets the total height.
- BOOL (*freeze)(mItemView *self, BOOL lock);
The function is used to freeze the item manager or not. If manager is frozen, it will not refresh items until unfroze it.
- BOOL (*isFrozen)(mItemView *self);
The function determines whether manager is frozen.
- HITEM (*getFirstItem)(mItemView *self);
The function is used to get first item.
- list_t* (*getQueue)(mItemView *self);
The function is used to get the header of item list.
- HITEM (*getListEntry)(list_t* entry);
The function is used to get item handle by list entry.
- int (*isEmpty)(mItemView *self);
The function determines whether manager is empty.
- int (*removeItem)(mItemView *self, HITEM hItem);
The function is used to remove a item from manager. - Parameters
-
- Returns
- 0 on success, otherwise -1.
- int (*sortItems)(mItemView *self, NCS_CB_CMPITEM pfn);
The function sorts items that uses the specified compare function.
- BOOL (*removeAll)(mItemView *self);
The function deletes all items.
- int (*indexOf)(mItemView *self, HITEM hItem);
The function gets the index of the specifed item. - Parameters
-
- Returns
- The item index on success, otherwise -1.
- int (*setHeight)(mItemView *self, HITEM hItem, int height);
The function sets the height of the specified item. - Parameters
-
hItem | The handle to item. |
height | The new height of item. |
- Returns
- The difference value in old and new height on success, otherwise -1.
- int (*getHeight)(mItemView *self, HITEM hItem);
The function gets the height of the specified item.
- HITEM (*getItem)(mItemView *self, int index);
The function gets the item handle of the specified index. - Parameters
-
index | The specified index. |
- Returns
- The handle to item on success, otherwise NULL.
- HITEM (*getPrev)(mItemView *self, HITEM hItem);
The function gets the previous item. - Parameters
-
hItem | The handle to the specified item. |
- Returns
- The handle to previous item on success, otherwise NULL.
- HITEM (*getNext)(mItemView *self, HITEM hItem);
The function gets the next item. - Parameters
-
hItem | The handle to the specified item. |
- Returns
- The handle to next item on success, otherwise NULL.
- BOOL (*isSelected)(mItemView *self, HITEM hItem);
The function determines whether the specified item is selected or not.
- BOOL (*isEnabled)(mItemView *self, HITEM hItem);
The function determines whether the specified item is enabled or not.
- BOOL (*enable)(mItemView *self, HITEM hItem, BOOL enable);
The function enables the specified item or not. - Parameters
-
hItem | The handle to the specified item. |
enable | The enable status:TRUE for enable, FALSE for disable. |
- Returns
- TRUE on success, otherwise FALSE.
- void (*selectAll)(mItemView *self);
The function selects all items.
- void (*deselectAll)(mItemView *self);
The function deselects all items.
- int (*hilight)(mItemView *self, HITEM hItem);
The function hilights the specified item.
- HITEM (*getHilight)(mItemView *self);
The function gets the hilighted item. - Returns
- The handle to old hilighted item on success, otherwise 0.
- BOOL (*isHilight)(mItemView *self, HITEM hItem);
The function determines whether the specified item is hilighted or not.
- int (*getItemCount)(mItemView *self);
The function is used to get the number of items. - Returns
- The number of items.
- void (*setAddData)(mItemView *self, HITEM hItem, DWORD addData);
The function sets the additional data of the specified item. - Parameters
-
hItem | The handle to the specified item. |
addData | The new additional data. |
- void (*setImage)(mItemView *self, HITEM hItem, DWORD image);
The function sets the image of the specified item. - Parameters
-
hItem | The handle to the specified item. |
image | The new image. |
- DWORD (*getAddData)(mItemView *self, HITEM hItem);
The function gets the additional data of the specified item.
- DWORD (*getImage)(mItemView *self, HITEM hItem);
The function gets the image of the specified item.
- void (*setFlags)(mItemView *self, HITEM hItem, DWORD flags);
The function sets the flags of the specified item. - Parameters
-
hItem | The handle to the specified item. |
flags | The new flags. |
- DWORD (*getFlags)(mItemView *self, HITEM hItem);
The function gets the flags of the specified item.
- BOOL (*setText)(mItemView *self, HITEM hItem, const char* text);
The function sets the text of the specified item. - Parameters
-
hItem | The handle to item. |
text | The next text. |
- Returns
- TRUE on success, otherwise FALSE.
- const char* (*getText)(mItemView *self, HITEM hItem);
The function gets the text of the specified item. - Parameters
-
- Returns
- The text.
- int (*getTextLen)(mItemView *self, HITEM hItem);
The function gets the text length of the specified item. - Parameters
-
- Returns
- The text length.
- BOOL (*getSelection)(mItemView *self, HITEM *pRet, int count);
Get the array of item handles for the selected items. - Parameters
-
pRet | The array of handles. |
count | The maximum size of array. |
- Returns
- TRUE on success, otherwise FALSE.
- int (*getSelectionCount)(mItemView *self);
The function gets the number of selected items.
- BOOL (*select)(mItemView *self, HITEM hItem);
The function selects the specified item. - Parameters
-
hItem | The handle to the specified item. |
- Returns
- TRUE on success, otherwise FALSE.
- BOOL (*deselect)(mItemView *self, HITEM hItem);
The function deselects the specified item. - Parameters
-
hItem | The handle to the specified item. |
- Returns
- TRUE on success, otherwise FALSE.
- NCS_CB_DRAWITEM (*setItemDraw)(mItemView *self, NCS_CB_DRAWITEM func);
Sets the user-defined function of drawing item. - Parameters
-
- Returns
- The old function.
- NCS_CB_INITITEM (*setItemInit)(mItemView *self, NCS_CB_INITITEM func);
Sets the user-defined function of initializing item. - Parameters
-
- Returns
- The old function.
- NCS_CB_DSTRITEM (*setItemDestroy)(mItemView *self, NCS_CB_DSTRITEM func);
Sets the user-defined function of destroying item. - Parameters
-
- Returns
- The old function.
- int (*getFirstVisItem)(mItemView *self);
Gets the first visible item index.
- BOOL (*setTextByIdx)(mItemView self, int index, const char text);
Sets text of item by index. - Parameters
-
- Returns
- TRUE on success, FALSE for failure.
- const char* (*getTextByIdx)(mItemView *self, int index);
Gets text of item by index. - Parameters
-
- Returns
- The string of item on success, otherwise NULL.
- int (*getRect)(mItemView *self, HITEM hItem, RECT *rcItem, BOOL bConv);
Get the specified item's rectangle. - Parameters
-
hItem | The handle to the specified item. |
index | The index of item. |
- Returns
- 0 on success, otherwise -1.
- void (*refreshItem)(mItemView *self, HITEM hItem, const RECT *rcInv);
Refresh the specified item. - Parameters
-
hItem | The handle to the specified item. |
rcInv | The pointer to a RECT structure which defines the invalid rectangle. NULL for the whole item. |
- BOOL (*showItemByIdx)(mItemView *self, int index);
Show item by index.
- BOOL (*showItem)(mItemView *self, HITEM hItem);
Shows the specified item.
- int (*setCurSel)(mItemView *self, int newSel);
Selects an item in a multiple-selection list box and scroll it into viewport. - Parameters
-
newSel | The index of the item. |
flag | Indicates the changes to be made to the listbox item, can be one of the following values:
- -1
If the item has been selected, makes it unselected, vice versa.
- 0
Makes the item unselected.
- other
Makes the item selected.
|
- Returns
- 0 on success, else -1 to indicates you passed an invalid index or the list box has no NCSS_ITEMV_MULTIPLE style.
- int (*getCurSel)(mItemView *self);
Get the index of current selected item. - Returns
- The index of current selected item on success, otherwise -1.
- void (*resetContent)(mItemView *self);
Reset all property and remove all items.
The documentation for this struct was generated from the following file: