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

Annotation of /trunk/Include/wptCommonCtl.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: 2992 byte(s)
WinPT initial checkin.


1 twoaday 2 /* wptCommonCtl.h - Win32 Imagelist headerfile
2     * Copyright (C) 2003 Andreas Jobs
3     * Copyright (C) 2004, 2005 Timo Schulz
4     *
5     * This file is part of WinPT.
6     *
7     * WinPT is free software; you can redistribute it and/or
8     * modify it under the terms of the GNU General Public License
9     * as published by the Free Software Foundation; either version 2
10     * of the License, or (at your option) any later version.
11     *
12     * WinPT is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15     * General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with WinPT; if not, write to the Free Software Foundation,
19     * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20     */
21    
22     #ifndef WPT_COMMONCTL_H
23     #define WPT_COMMONCTL_H
24    
25     #include <commctrl.h>
26    
27     enum {
28     IMI_KEY_DELETE = 0,
29     IMI_KEY_PROPS,
30     IMI_KEY_SIGN,
31     IMI_KEY_IMPORT,
32     IMI_KEY_EXPORT,
33     IMI_SORT_UPARROW,
34     IMI_SORT_DOWNARROW,
35     IMI_EXIT,
36     IMAGELIST_NUMIMAGES
37     };
38    
39     /*-- List View --*/
40     #define KEYLIST_SORT_DESC 0x8000
41    
42     typedef int (CALLBACK *listview_cmp) (LPARAM lParam1, LPARAM lParam2,
43     LPARAM lParamSort);
44     struct listview_column_s {
45     int pos;
46     int width;
47     char *fieldname;
48     };
49     typedef struct listview_column_s * listview_column_t;
50    
51     struct listview_ctrl_s {
52     HWND ctrl;
53     int cols;
54     int items;
55     };
56     typedef struct listview_ctrl_s * listview_ctrl_t;
57    
58     int listview_new (listview_ctrl_t *ctx);
59     void listview_release (listview_ctrl_t ctx);
60     int listview_add_column (listview_ctrl_t ctx, listview_column_t col);
61     int listview_add_item (listview_ctrl_t ctx, const char *text);
62     int listview_add_item2 (listview_ctrl_t ctx, const char * text, void * magic);
63     void listview_add_sub_item (listview_ctrl_t ctx, int pos, int col,
64     const char *text);
65     int listview_count_items (listview_ctrl_t ctx, int curr_sel);
66     int listview_del_item (listview_ctrl_t ctx, int pos);
67     int listview_del_all (listview_ctrl_t ctx);
68     int listview_get_item_state (listview_ctrl_t ctx, int pos);
69     int listview_sort_items (listview_ctrl_t ctx, int sortby,
70     listview_cmp sort_cb);
71     int listview_get_curr_pos (listview_ctrl_t ctx);
72     int listview_get_item_text (listview_ctrl_t ctx, int entry, int pos,
73     char *text, int maxbytes);
74     void listview_set_ext_style (listview_ctrl_t ctx);
75     int listview_set_column_order (listview_ctrl_t ctx, int *array);
76     int listview_del_items (listview_ctrl_t ctx);
77     void listview_select_all (listview_ctrl_t ctx);
78     void listview_select_one (listview_ctrl_t ctx, int pos);
79     int listview_find (listview_ctrl_t ctx, const char * str);
80    
81     /*-- Image List --*/
82     extern HIMAGELIST glob_imagelist;
83    
84    
85    
86    
87     int imagelist_load (HWND hwnd);
88     int imagelist_destroy (void);
89     int imagelist_getindex (int icon);
90    
91     #endif /*WPT_COMMONCTL_H*/

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26