/[winpt]/trunk/Include/wptListView.h
ViewVC logotype

Annotation of /trunk/Include/wptListView.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations)
Mon Jan 31 11:02:21 2005 UTC (20 years, 1 month ago) by twoaday
File MIME type: text/plain
File size: 2429 byte(s)
WinPT initial checkin.


1 twoaday 2 /* wptListView.h - Dynamic list view control
2     * Copyright (C) 2001-2005 Timo Schulz
3     *
4     * This file is part of WinPT.
5     *
6     * WinPT is free software; you can redistribute it and/or
7     * modify it under the terms of the GNU General Public License
8     * as published by the Free Software Foundation; either version 2
9     * of the License, or (at your option) any later version.
10     *
11     * WinPT is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14     * General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with WinPT; if not, write to the Free Software Foundation,
18     * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19     */
20    
21     #ifndef WPT_LISTVIEW_H
22     #define WPT_LISTVIEW_H
23    
24     #define KEYLIST_SORT_DESC 0x8000
25    
26     typedef int (CALLBACK *listview_cmp) (LPARAM lParam1, LPARAM lParam2,
27     LPARAM lParamSort);
28     struct listview_column_s {
29     int pos;
30     int width;
31     char *fieldname;
32     };
33     typedef struct listview_column_s * listview_column_t;
34    
35     struct listview_ctrl_s {
36     HWND ctrl;
37     int cols;
38     int items;
39     };
40     typedef struct listview_ctrl_s * listview_ctrl_t;
41    
42     int listview_new( listview_ctrl_t *ctx );
43     void listview_release( listview_ctrl_t ctx );
44     int listview_add_column( listview_ctrl_t ctx, listview_column_t col );
45     int listview_add_item( listview_ctrl_t ctx, const char *text );
46     int listview_add_item2( listview_ctrl_t ctx, const char * text, void * magic );
47     void listview_add_sub_item( listview_ctrl_t ctx, int pos, int col,
48     const char *text );
49     int listview_count_items( listview_ctrl_t ctx, int curr_sel );
50     int listview_del_item( listview_ctrl_t ctx, int pos );
51     int listview_del_all( listview_ctrl_t ctx );
52     int listview_get_item_state( listview_ctrl_t ctx, int pos );
53     int listview_sort_items( listview_ctrl_t ctx, int sortby,
54     listview_cmp sort_cb );
55     int listview_get_curr_pos( listview_ctrl_t ctx );
56     int listview_get_item_text (listview_ctrl_t ctx, int entry, int pos,
57     char *text, int maxbytes);
58     void listview_set_ext_style( listview_ctrl_t ctx );
59     int listview_set_column_order( listview_ctrl_t ctx, int *array );
60     int listview_del_items( listview_ctrl_t ctx );
61     void listview_select_all( listview_ctrl_t ctx );
62    
63     #endif /* WPT_LISTVIEW_H */

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26