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

Contents of /trunk/Include/wptListView.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations)
Thu Apr 14 12:55:33 2005 UTC (19 years, 10 months ago) by twoaday
File MIME type: text/plain
File size: 2435 byte(s)
* Updated valid GPG commands.
* Defined DEFAULT_KEYSIZE.


1 /* 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
46 int listview_add_item( listview_ctrl_t ctx, const char *text );
47 int listview_add_item2( listview_ctrl_t ctx, const char * text, void * magic );
48 void listview_add_sub_item( listview_ctrl_t ctx, int pos, int col,
49 const char *text );
50 int listview_count_items( listview_ctrl_t ctx, int curr_sel );
51 int listview_del_item( listview_ctrl_t ctx, int pos );
52 int listview_del_all( listview_ctrl_t ctx );
53 int listview_get_item_state( listview_ctrl_t ctx, int pos );
54 int listview_sort_items( listview_ctrl_t ctx, int sortby,
55 listview_cmp sort_cb );
56 int listview_get_curr_pos( listview_ctrl_t ctx );
57 int listview_get_item_text (listview_ctrl_t ctx, int entry, int pos,
58 char *text, int maxbytes);
59 void listview_set_ext_style( listview_ctrl_t ctx );
60 int listview_set_column_order( listview_ctrl_t ctx, int *array );
61 int listview_del_items( listview_ctrl_t ctx );
62 void listview_select_all( listview_ctrl_t ctx );
63
64 #endif /* WPT_LISTVIEW_H */

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26