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

Annotation of /trunk/Include/wptCommonCtl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 219 - (hide annotations)
Sat May 27 08:56:00 2006 UTC (18 years, 9 months ago) by twoaday
File MIME type: text/plain
File size: 4188 byte(s)
2006-05-25  Timo Schulz  <ts@g10code.de>
                                                                                
        * wptGPGUtil.cpp (gpg_rebuild_cache): Return error code.
        * wptGPGME.cpp (winpt_get_seckey): Fix off-by-one bug.
        * wptVerifyList.cpp (verlist_build): New argument type.
        Change all callers.
        (verlist_set_info_control): New.
        (verlist_set_additional_info): New.
        * wptFileVerifyDlg.cpp (file_verify_dlg_proc): Adjust code.
        * wptClipVerifyDlg.cpp (clip_verify_dlg_proc): Likewise.
        * wptFileCBS.cpp (read_cb, write_cb): Add logging.
                                                                                


1 werner 37 /* wptCommonCtl.h - Win32 Imagelist headerfile
2     * Copyright (C) 2003 Andreas Jobs
3 twoaday 133 * Copyright (C) 2004, 2005, 2006 Timo Schulz
4 werner 37 *
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     /* Symbol constants for the toolbar. */
28     enum km_sym_tid_t {
29 twoaday 143 IMI_KEY_NEW=0,
30     IMI_KEY_DELETE,
31 werner 37 IMI_KEY_PROPS,
32     IMI_KEY_SIGN,
33 twoaday 143 IMI_KEY_SEARCH,
34     IMI_KEY_FILE_IMPORT,
35     IMI_KEY_FILE_EXPORT,
36 werner 37 IMI_KEY_IMPORT,
37 twoaday 143 IMI_KEY_EXPORT,
38 werner 37 IMI_SORT_UPARROW,
39     IMI_SORT_DOWNARROW,
40     IMI_EXIT,
41     IMAGELIST_NUMIMAGES
42     };
43    
44     /*-- List View --*/
45     #define KEYLIST_SORT_DESC 0x8000
46    
47     typedef int (CALLBACK *listview_cmp) (LPARAM lParam1, LPARAM lParam2,
48     LPARAM lParamSort);
49    
50     /* Listview column. */
51     struct listview_column_s {
52     int pos; /* position of the column. */
53     int width; /* width of the column. */
54     char *fieldname; /* name of the column. */
55     };
56     typedef struct listview_column_s * listview_column_t;
57    
58     /* Listview control context. */
59     struct listview_ctrl_s {
60     HWND ctrl; /* the actual listview window. */
61     int cols; /* number of columns. */
62     int items; /* number of items. */
63 twoaday 174 unsigned int ext_chkbox:1; /* exteneded style: checkboxes. */
64 twoaday 133 HIMAGELIST hil; /* Imagelist context. */
65 werner 37 };
66     typedef struct listview_ctrl_s * listview_ctrl_t;
67    
68 twoaday 219
69 twoaday 208 void listview_new (listview_ctrl_t *ctx, HWND ctrl);
70 werner 37 void listview_release (listview_ctrl_t ctx);
71     int listview_add_column (listview_ctrl_t ctx, listview_column_t col);
72     int listview_add_item_pos (listview_ctrl_t ctx, int pos);
73     int listview_add_item (listview_ctrl_t ctx, const char *text);
74     int listview_add_item2 (listview_ctrl_t ctx, const char * text, void * magic);
75     void listview_add_sub_item (listview_ctrl_t ctx, int pos, int col,
76     const char *text);
77     int listview_count_items (listview_ctrl_t ctx, int curr_sel);
78     int listview_del_item (listview_ctrl_t ctx, int pos);
79 twoaday 151 int listview_del_sel_items (listview_ctrl_t ctx);
80     int listview_del_all_items (listview_ctrl_t ctx);
81 werner 37 int listview_get_item_state (listview_ctrl_t ctx, int pos);
82 twoaday 192 int listview_get_selected_item (listview_ctrl_t lv);
83 werner 37 void* listview_get_item2 (listview_ctrl_t ctx, int pos);
84     int listview_set_item2 (listview_ctrl_t ctx, int pos, void *magic);
85     int listview_sort_items (listview_ctrl_t ctx, int sortby,
86     listview_cmp sort_cb);
87     int listview_get_curr_pos (listview_ctrl_t ctx);
88     int listview_get_item_text (listview_ctrl_t ctx, int entry, int pos,
89     char *text, int maxbytes);
90     void listview_set_ext_style (listview_ctrl_t ctx);
91 twoaday 174 void listview_set_chkbox_style (listview_ctrl_t ctx);
92 werner 37 int listview_set_column_order (listview_ctrl_t ctx, int *array);
93 twoaday 192 int listview_set_column_width (listview_ctrl_t ctx, int col, int width);
94 werner 37 int listview_del_items (listview_ctrl_t ctx);
95     void listview_select_all (listview_ctrl_t ctx);
96 twoaday 77 void listview_deselect_all (listview_ctrl_t ctx);
97 werner 37 void listview_select_one (listview_ctrl_t ctx, int pos);
98     int listview_find (listview_ctrl_t ctx, const char * str);
99     void listview_scroll (listview_ctrl_t ctx, int oldpos, int newpos);
100 twoaday 129 int listview_del_column (listview_ctrl_t ctx, int pos);
101 twoaday 133 int listview_add_item_image (listview_ctrl_t ctx, const char *text, int image);
102 twoaday 182 void listview_set_image_list (listview_ctrl_t ctx, int cx, int cy,
103     HICON *ico, DWORD nicons);
104 werner 37
105     /*-- Image List --*/
106     extern HIMAGELIST glob_imagelist;
107    
108     int imagelist_load (HWND hwnd);
109     int imagelist_destroy (void);
110     int imagelist_getindex (int icon);
111    
112     #endif /*WPT_COMMONCTL_H*/

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26