Lines Matching refs:nb_items

76     INT         nb_items;       /* Number of items */  member
167 if ((descr->style & LBS_NODATA) && descr->u.nodata_items && items_size > descr->nb_items) in resize_storage()
169 memset(descr->u.nodata_items + descr->nb_items, 0, in resize_storage()
170 (items_size - descr->nb_items) * get_sizeof_item(descr)); in resize_storage()
233 if (index < descr->nb_items) in insert_item_data()
234 memmove(p + size, p, (descr->nb_items - index) * size); in insert_item_data()
244 if (index < descr->nb_items) in remove_item_data()
245 memmove(p, p + size, (descr->nb_items - index) * size); in remove_item_data()
257 for (i = descr->top_item, height = 0; i < descr->nb_items; i++) in LISTBOX_GetCurrentPageSize()
278 for (max = descr->nb_items - 1; max >= 0; max--) in LISTBOX_GetMaxTopIndex()
280 if (max < descr->nb_items - 1) max++; in LISTBOX_GetMaxTopIndex()
285 max = (descr->nb_items + descr->page_size - 1) / descr->page_size; in LISTBOX_GetMaxTopIndex()
290 max = descr->nb_items - descr->page_size; in LISTBOX_GetMaxTopIndex()
328 info.nMax = (descr->nb_items - 1) / descr->page_size; in LISTBOX_UpdateScroll()
345 info.nMax = descr->nb_items - 1; in LISTBOX_UpdateScroll()
503 if (index && (index >= descr->nb_items)) in LISTBOX_GetItemRect()
523 if ((index >= 0) && (index < descr->nb_items)) in LISTBOX_GetItemRect()
562 if (!descr->nb_items) return -1; /* No items */ in LISTBOX_GetItemFromPoint()
568 while (index < descr->nb_items) in LISTBOX_GetItemFromPoint()
595 if (index >= descr->nb_items) return -1; in LISTBOX_GetItemFromPoint()
611 if (index < descr->nb_items) in LISTBOX_PaintItem()
625 if (index >= descr->nb_items) in LISTBOX_PaintItem()
630 … ERR("called with an out of bounds index %d(%d) in owner draw, Not good.\n",index,descr->nb_items); in LISTBOX_PaintItem()
721 if ((descr->top_item + descr->page_size) > descr->nb_items) in LISTBOX_SetRedraw()
723 descr->top_item = descr->nb_items - descr->page_size; in LISTBOX_SetRedraw()
799 static LRESULT LISTBOX_InitStorage( LB_DESCR *descr, INT nb_items ) in LISTBOX_InitStorage() argument
801 UINT new_size = descr->nb_items + nb_items; in LISTBOX_InitStorage()
848 if ((index < 0) || (index >= descr->nb_items)) in LISTBOX_GetText()
906 if (!descr->nb_items || !(descr->style & LBS_SORT)) return -1; /* Add it at the end */ in LISTBOX_FindStringPos()
909 max = descr->nb_items - 1; in LISTBOX_FindStringPos()
953 max = descr->nb_items; in LISTBOX_FindFileStrPos()
997 if (start >= descr->nb_items) start = 0; in LISTBOX_FindString()
1003 for (i = 0, index = start; i < descr->nb_items; i++, index++) in LISTBOX_FindString()
1005 if (index == descr->nb_items) index = 0; in LISTBOX_FindString()
1016 for (i = 0, index = start; i < descr->nb_items; i++, index++) in LISTBOX_FindString()
1018 if (index == descr->nb_items) index = 0; in LISTBOX_FindString()
1037 for (i = 0, index = start; i < descr->nb_items; i++, index++) in LISTBOX_FindString()
1039 if (index == descr->nb_items) index = 0; in LISTBOX_FindString()
1057 for (i = count = 0; i < descr->nb_items; i++) in LISTBOX_GetSelCount()
1071 for (i = count = 0; (i < descr->nb_items) && (count < max); i++) in LISTBOX_GetSelItems()
1105 if (!descr->nb_items && (descr->focus_item != -1) && descr->caret_on && in LISTBOX_Paint()
1119 for (i = descr->top_item; i < descr->nb_items; i++) in LISTBOX_Paint()
1275 if (descr->style & LBS_OWNERDRAWVARIABLE && descr->nb_items > 0) in LISTBOX_GetItemHeight()
1277 if ((index < 0) || (index >= descr->nb_items)) in LISTBOX_GetItemHeight()
1300 if ((index < 0) || (index >= descr->nb_items)) in LISTBOX_SetItemHeight()
1480 if ((index < 0) || (index >= descr->nb_items)) return LB_ERR; in LISTBOX_SetCaretIndex()
1512 if (!descr->nb_items) return LB_OKAY; in LISTBOX_SelectItemRange()
1514 if (last == -1 || last >= descr->nb_items) last = descr->nb_items - 1; in LISTBOX_SelectItemRange()
1553 if ((index < -1) || (index >= descr->nb_items)) return LB_ERR; in LISTBOX_SetSelection()
1557 return LISTBOX_SelectItemRange( descr, 0, descr->nb_items, on ); in LISTBOX_SetSelection()
1570 if (send_notify && descr->nb_items) SEND_NOTIFICATION( descr, in LISTBOX_SetSelection()
1589 if ((index < 0) || (index >= descr->nb_items)) in LISTBOX_MoveCaret()
1637 if (index == -1) index = descr->nb_items; in LISTBOX_InsertItem()
1638 else if ((index < 0) || (index > descr->nb_items)) return LB_ERR; in LISTBOX_InsertItem()
1639 if (!resize_storage(descr, descr->nb_items + 1)) return LB_ERR; in LISTBOX_InsertItem()
1642 descr->nb_items++; in LISTBOX_InsertItem()
1673 if (descr->nb_items == 1) in LISTBOX_InsertItem()
1713 if (index == -1) index = descr->nb_items; in LISTBOX_InsertString()
1761 if ((index < 0) || (index >= descr->nb_items)) return LB_ERR; in LISTBOX_RemoveItem()
1766 if (descr->nb_items == 1) in LISTBOX_RemoveItem()
1771 descr->nb_items--; in LISTBOX_RemoveItem()
1775 if (descr->anchor_item == descr->nb_items) descr->anchor_item--; in LISTBOX_RemoveItem()
1776 resize_storage(descr, descr->nb_items); in LISTBOX_RemoveItem()
1783 if (descr->nb_items == descr->page_size) in LISTBOX_RemoveItem()
1799 if (descr->focus_item >= descr->nb_items) in LISTBOX_RemoveItem()
1801 descr->focus_item = descr->nb_items - 1; in LISTBOX_RemoveItem()
1816 for (i = descr->nb_items - 1; i >= 0; i--) LISTBOX_DeleteItem(descr, i); in LISTBOX_ResetContent()
1818 descr->nb_items = 0; in LISTBOX_ResetContent()
1833 UINT orig_num = descr->nb_items; in LISTBOX_SetCount()
1839 descr->nb_items = count; in LISTBOX_SetCount()
1987 LISTBOX_SetTopItem( descr, descr->nb_items, TRUE ); in LISTBOX_HandleVScroll()
2040 LISTBOX_SetTopItem( descr, descr->nb_items, TRUE ); in LISTBOX_HandleHScroll()
2241 descr->lphc->droppedIndex = descr->nb_items ? descr->selected_item : -1; in LISTBOX_HandleLButtonDownCombo()
2313 if ((descr->style & LBS_NOTIFY) && descr->nb_items) in LISTBOX_HandleLButtonUp()
2340 if (index >= descr->nb_items) index = descr->nb_items - 1; in LISTBOX_HandleTimer()
2343 if (index + descr->page_size < descr->nb_items) in LISTBOX_HandleTimer()
2457 caret = min(descr->focus_item + descr->page_size, descr->nb_items - 1); in LISTBOX_HandleKeyDown()
2463 if (caret >= descr->nb_items) caret = descr->nb_items - 1; in LISTBOX_HandleKeyDown()
2484 if (caret >= descr->nb_items) caret = descr->nb_items - 1; in LISTBOX_HandleKeyDown()
2490 caret = descr->nb_items - 1; in LISTBOX_HandleKeyDown()
2525 if (descr->nb_items) SEND_NOTIFICATION( descr, LBN_SELCHANGE ); in LISTBOX_HandleKeyDown()
2557 if ((descr->style & LBS_NOTIFY) && descr->nb_items) in LISTBOX_HandleChar()
2584 descr->nb_items = 0; in LISTBOX_Create()
2722 return descr->nb_items; in LISTBOX_WindowProc()
2730 if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items)) in LISTBOX_WindowProc()
2738 if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items)) in LISTBOX_WindowProc()
2748 return descr->nb_items; in LISTBOX_WindowProc()
2754 if ((INT)wParam >= descr->nb_items || (INT)wParam < 0) in LISTBOX_WindowProc()
2763 if (descr->nb_items == 0) in LISTBOX_WindowProc()
2792 if(descr->nb_items == 0) in LISTBOX_WindowProc()
2813 index = descr->nb_items - 1; in LISTBOX_WindowProc()
2864 if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items)) in LISTBOX_WindowProc()
2915 if (((INT)wParam < -1) || ((INT)wParam >= descr->nb_items)) in LISTBOX_WindowProc()