The virtual function table of mItemManager, which derived from mItemClass.
More...
#include <mitem_manager.h>
The virtual function table of mItemManager, which derived from mItemClass.
- NCS_CB_CMPITEM (*setItemCmpFunc)(mItemManager *self, NCS_CB_CMPITEM func);
The function set item's comparison function. - Parameters
-
func | The new item's comparison function. |
- Returns
- The old item's comparison function.
- int (*moveItem)(mItemManager 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 comparison function.
- int (*insertItem)(mItemManager *self, HITEM hItem, HITEM prev, HITEM next, int index, int *pos);
The function is used to insert a item to mItemManager. 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)(mItemManager *self, HITEM prev, HITEM next, int index, int *pos);
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. |
- Returns
- The handle to new item.
- int (*inItem)(mItemManager *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)(mItemManager *self, NCS_CB_CMPSTR func);
The function sets string comparison function. - Parameters
-
func | The new string comparison function. |
- Returns
- The old string comparison function.
- NCS_CB_CMPSTR (*getStrCmpFunc)(mItemManager *self);
The function gets current string comparison function.
- int (*getItemYPos)(mItemManager *self, HITEM hItem);
The function gets the specified item's starting y position.
- void (*setAutoSortItem) (mItemManager *self, BOOL sort);
The function sets or cancels the NCSF_ITMMNG_AUTOSORT style.
- int (*getTotalHeight)(mItemManager *self);
The function gets the item's total height.
- int (*adjustItemsHeight)(mItemManager *self, int diff);
The function offsets the total height.
- BOOL (*freeze)(mItemManager *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)(mItemManager *self);
The function determines whether manager is frozen.
- HITEM (*getFirstItem)(mItemManager *self);
The function is used to get first item.
- list_t* (*getQueue)(mItemManager *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)(mItemManager *self);
The function determines whether manager is empty.
- int (*removeItem)(mItemManager *self, HITEM hItem);
The function is used to remove a item from manager. - Parameters
-
- Returns
- 0 on success, otherwise -1.
- int (*sortItems)(mItemManager *self, NCS_CB_CMPITEM pfn);
The function sorts items that uses the specified comparison function.
- BOOL (*removeAll)(mItemManager *self);
The function deletes all items.
- int (*indexOf)(mItemManager *self, HITEM hItem);
The function gets the index of the specifed item. - Parameters
-
- Returns
- The item index on success, otherwise -1.
- int (*setHeight)(mItemManager *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)(mItemManager *self, HITEM hItem);
The function gets the height of the specified item.
- HITEM (*getItem)(mItemManager *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 (*getNext)(mItemManager *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 (*getPrev)(mItemManager *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)(mItemManager *self, HITEM hItem);
The function determines whether the specified item is selected or not.
- BOOL (*isEnabled)(mItemManager *self, HITEM hItem);
The function determines whether the specified item is enabled or not.
- BOOL (*enable)(mItemManager *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)(mItemManager *self);
The function selects all items.
- void (*deselectAll)(mItemManager *self);
The function deselects all items.
- BOOL (*select)(mItemManager *self, HITEM hItem, BOOL sel);
The function selects the specified item or not. - Parameters
-
hItem | The handle to the specified item. |
sel | The selected status:TRUE for select, FALSE for deselect. |
- Returns
- TRUE on success, otherwise FALSE.
- HITEM (*hilight)(mItemManager *self, HITEM hItem);
The function hilights the specified item.
- HITEM (*getHilight)(mItemManager *self);
The function gets the hilighted item. - Returns
- The handle to old hilighted item on success, otherwise 0.
- BOOL (*isHilight)(mItemManager *self, HITEM hItem);
The function determines whether the specified item is hilighted or not.
- int (*getItemCount)(mItemManager *self);
The function is used to get the number of items. - Returns
- The number of items.
- void (*setAddData)(mItemManager *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)(mItemManager *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)(mItemManager *self, HITEM hItem);
The function gets the additional data of the specified item.
- DWORD (*getImage)(mItemManager *self, HITEM hItem);
The function gets the image of the specified item.
- void (*setFlags)(mItemManager *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)(mItemManager *self, HITEM hItem);
The function gets the flags of the specified item.
- BOOL (*setText)(mItemManager *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)(mItemManager *self, HITEM hItem);
The function gets the text of the specified item. - Parameters
-
- Returns
- The text.
- int (*getTextLen)(mItemManager *self, HITEM hItem);
The function gets the text length of the specified item. - Parameters
-
- Returns
- The text length.
- BOOL (*getSelection)(mItemManager *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)(mItemManager *self);
The function gets the number of selected items.
The documentation for this struct was generated from the following file: