/[winpt]/trunk/Src/wptListView.cpp
ViewVC logotype

Diff of /trunk/Src/wptListView.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 205 by twoaday, Thu Apr 27 12:46:03 2006 UTC revision 236 by twoaday, Wed Jun 28 06:59:30 2006 UTC
# Line 38  Line 38 
38  #include "resource.h"  #include "resource.h"
39    
40    
41  int  void
42  listview_new (listview_ctrl_t *ctx)  listview_new (listview_ctrl_t *ctx, HWND ctrl)
43  {  {
44      struct listview_ctrl_s *c;      struct listview_ctrl_s *c;
45    
# Line 48  listview_new (listview_ctrl_t *ctx) Line 48  listview_new (listview_ctrl_t *ctx)
48          BUG (NULL);          BUG (NULL);
49      c->cols = 0;      c->cols = 0;
50      c->items = 0;      c->items = 0;
51      c->ctrl = NULL;      c->ctrl = ctrl? ctrl : NULL;
52      c->hil = NULL;      c->hil = NULL;
53      c->ext_chkbox = 0;      c->ext_chkbox = 0;
54      *ctx = c;      *ctx = c;
     return 0;  
55  }  }
56    
57    
# Line 295  listview_get_item_state (listview_ctrl_t Line 294  listview_get_item_state (listview_ctrl_t
294    
295    
296  int  int
297  listview_sort_items( listview_ctrl_t ctx, int sortby, listview_cmp sort_cb )  listview_sort_items (listview_ctrl_t ctx, int sortby, listview_cmp sort_cb)
298  {        {      
299      HWND hheader;      HWND hheader;
300      HDITEM hdi;      HDITEM hdi;
# Line 331  listview_sort_items( listview_ctrl_t ctx Line 330  listview_sort_items( listview_ctrl_t ctx
330      /* Set image to currently sorted field */      /* Set image to currently sorted field */
331      memset (&hdi, 0, sizeof(hdi));      memset (&hdi, 0, sizeof(hdi));
332      hdi.mask = HDI_IMAGE | HDI_FORMAT;      hdi.mask = HDI_IMAGE | HDI_FORMAT;
333      Header_GetItem (hheader, idx, &hdi);      Header_GetItem (hheader, idx, &hdi);  
334      hdi.fmt |= HDF_IMAGE | HDF_BITMAP_ON_RIGHT;      hdi.fmt |= HDF_IMAGE | HDF_BITMAP_ON_RIGHT;
335      hdi.iImage = imagelist_getindex((sortby & KEYLIST_SORT_DESC) ?      if (!ctx->ext_chkbox)
336                                      IMI_SORT_DOWNARROW : IMI_SORT_UPARROW);          hdi.iImage = imagelist_getindex((sortby & KEYLIST_SORT_DESC) ?
337                                            IMI_SORT_DOWNARROW : IMI_SORT_UPARROW);
338        else
339            hdi.iImage = (sortby & KEYLIST_SORT_DESC)? 2 : 3;
340      Header_SetItem (hheader, idx, &hdi);      Header_SetItem (hheader, idx, &hdi);
341      return 0;      return 0;
342  }  }
# Line 419  listview_scroll (listview_ctrl_t ctx, in Line 421  listview_scroll (listview_ctrl_t ctx, in
421    
422    
423  int  int
424  listview_find (listview_ctrl_t ctx, const char * str)  listview_find (listview_ctrl_t ctx, const char *str)
425  {  {
426      LVFINDINFO inf;      LVFINDINFO inf;
427      int pos;      int pos;
428    
429        /* XXX: allow to make a substring search. */
430      memset (&inf, 0, sizeof (inf));      memset (&inf, 0, sizeof (inf));
431      inf.flags = LVFI_STRING|LVFI_PARTIAL;      inf.flags = LVFI_STRING|LVFI_PARTIAL;
432      inf.psz = str;      inf.psz = str;

Legend:
Removed from v.205  
changed lines
  Added in v.236

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26