99 |
rc = 1; |
rc = 1; |
100 |
ctx->cols++; |
ctx->cols++; |
101 |
return rc; |
return rc; |
102 |
} /* listview_add_column */ |
} |
103 |
|
|
104 |
|
|
105 |
int |
int |
131 |
rc = 1; |
rc = 1; |
132 |
ctx->items++; |
ctx->items++; |
133 |
return rc; |
return rc; |
134 |
} /* listview_add_item */ |
} |
135 |
|
|
136 |
|
|
137 |
int |
int |
167 |
rc = 1; |
rc = 1; |
168 |
ctx->items++; |
ctx->items++; |
169 |
return rc; |
return rc; |
170 |
} /* listview_add_item2 */ |
} |
171 |
|
|
172 |
|
|
173 |
void* |
void* |
201 |
listview_add_sub_item( listview_ctrl_t ctx, int pos, int col, const char *text ) |
listview_add_sub_item( listview_ctrl_t ctx, int pos, int col, const char *text ) |
202 |
{ |
{ |
203 |
ListView_SetItemText( ctx->ctrl, pos, col, (char *)text ); |
ListView_SetItemText( ctx->ctrl, pos, col, (char *)text ); |
204 |
} /* listview_add_sub_item */ |
} |
205 |
|
|
206 |
|
|
207 |
int |
int |
212 |
n = curr_sel? ListView_GetSelectedCount( ctx->ctrl ) : |
n = curr_sel? ListView_GetSelectedCount( ctx->ctrl ) : |
213 |
ListView_GetItemCount( ctx->ctrl ); |
ListView_GetItemCount( ctx->ctrl ); |
214 |
return n; |
return n; |
215 |
} /* listview_count_items */ |
} |
216 |
|
|
217 |
|
|
218 |
int |
int |
336 |
IMI_SORT_DOWNARROW : IMI_SORT_UPARROW); |
IMI_SORT_DOWNARROW : IMI_SORT_UPARROW); |
337 |
Header_SetItem (hheader, idx, &hdi); |
Header_SetItem (hheader, idx, &hdi); |
338 |
return 0; |
return 0; |
339 |
} /* listview_sort_items */ |
} |
340 |
|
|
341 |
|
|
342 |
int |
int |
343 |
listview_get_curr_pos( listview_ctrl_t ctx ) |
listview_get_curr_pos( listview_ctrl_t ctx ) |
344 |
{ |
{ |
345 |
return ListView_GetNextItem( ctx->ctrl, -1, LVNI_SELECTED ); |
return ListView_GetNextItem( ctx->ctrl, -1, LVNI_SELECTED ); |
346 |
} /* listview_get_curr_pos */ |
} |
347 |
|
|
348 |
|
|
349 |
int |
int |
357 |
} |
} |
358 |
ListView_GetItemText (ctx->ctrl, pos, col, text, maxbytes); |
ListView_GetItemText (ctx->ctrl, pos, col, text, maxbytes); |
359 |
return 0; |
return 0; |
360 |
} /* listview_get_item_text */ |
} |
361 |
|
|
362 |
|
|
363 |
/* Use extended style with checkboxes for each item. */ |
/* Use extended style with checkboxes for each item. */ |
381 |
listview_set_column_order( listview_ctrl_t ctx, int *array ) |
listview_set_column_order( listview_ctrl_t ctx, int *array ) |
382 |
{ |
{ |
383 |
return ListView_SetColumnOrderArray( ctx->ctrl, ctx->cols, array ); |
return ListView_SetColumnOrderArray( ctx->ctrl, ctx->cols, array ); |
384 |
} /* listview_set_column_order */ |
} |
385 |
|
|
386 |
|
|
387 |
void |
void |
388 |
listview_select_all (listview_ctrl_t ctx) |
listview_select_all (listview_ctrl_t ctx) |
389 |
{ |
{ |
390 |
ListView_SetItemState( ctx->ctrl, -1, LVIS_SELECTED, LVIS_SELECTED ); |
ListView_SetItemState( ctx->ctrl, -1, LVIS_SELECTED, LVIS_SELECTED ); |
391 |
} /* listview_select_all */ |
} |
392 |
|
|
393 |
|
|
394 |
void |
void |
456 |
ImageList_AddIcon (hil, ico[i]); |
ImageList_AddIcon (hil, ico[i]); |
457 |
ListView_SetImageList (ctx->ctrl, hil, LVSIL_SMALL); |
ListView_SetImageList (ctx->ctrl, hil, LVSIL_SMALL); |
458 |
} |
} |
|
|
|