annotate src/vimtbar.h @ 4700:0c25fa1dfd97 v7.3.1097

updated for version 7.3.1097 Problem: Python: a few recently added items are not documented. Solution: Update the documentation. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Sun, 02 Jun 2013 17:46:40 +0200
parents 3fc0f57ecb91
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 * Win16 Toolbar by Vince Negri - External Header
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 * (Based on MS Sample Code)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 * Do ":help uganda" in Vim to read copying and usage conditions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 * Do ":help credits" in Vim to see a list of people who contributed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 // Button Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 typedef struct tagTBBUTTON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 int iBitmap; // index into bitmap of this button's picture
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 int idCommand; // WM_COMMAND menu ID that this button sends
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 BYTE fsState; // button's state
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 BYTE fsStyle; // button's style
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 } TBBUTTON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 typedef TBBUTTON NEAR* PTBBUTTON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 typedef TBBUTTON FAR* LPTBBUTTON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 typedef const TBBUTTON FAR* LPCTBBUTTON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 // Styles
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 #define TBSTYLE_BUTTON 0x00 // this entry is button
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 #define TBSTYLE_SEP 0x01 // this entry is a separator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 #define TBSTYLE_CHECK 0x02 // this is a check button (it stays down)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 #define TBSTYLE_GROUP 0x04 // this is a check button (it stays down)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 #define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK) // this group is a member of a group radio group
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 // States
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 #define TBSTATE_CHECKED 0x01 // radio button is checked
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 #define TBSTATE_PRESSED 0x02 // button is being depressed (any style)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 #define TBSTATE_ENABLED 0x04 // button is enabled
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 #define TBSTATE_HIDDEN 0x08 // button is hidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 #define TBSTATE_INDETERMINATE 0x10 // button is indeterminate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 #define TBSTATE_SELECTED 0x20 // mouse hovering over button (for coolbar look)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 typedef struct tagADJUSTINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 TBBUTTON tbButton;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 char szDescription[1];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 } ADJUSTINFO;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 typedef ADJUSTINFO NEAR* PADJUSTINFO;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 typedef ADJUSTINFO FAR* LPADJUSTINFO;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HWND WINAPI CreateToolbar(HWND hwnd, DWORD ws, WORD wID, int nBitmaps,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HINSTANCE hBMInst, WORD wBMID,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 LPCTBBUTTON lpButtons, int iNumButtons);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 #define CMB_DISCARDABLE 0x01 // create bitmap as discardable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 #define CMB_MASKED 0x02 // create image/mask pair in bitmap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 #define TB_ENABLEBUTTON (WM_USER + 1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 // lParam: BOOL LOWORD, enable if nonzero; HIWORD not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 #define TB_CHECKBUTTON (WM_USER + 2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 // lParam: BOOL LOWORD, check if nonzero; HIWORD not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 #define TB_PRESSBUTTON (WM_USER + 3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 // lParam: BOOL LOWORD, press if nonzero; HIWORD not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 #define TB_HIDEBUTTON (WM_USER + 4)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 // lParam: BOOL LOWORD, hide if nonzero; HIWORD not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 #define TB_INDETERMINATE (WM_USER + 5)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 // lParam: BOOL LOWORD, make indeterminate if nonzero; HIWORD not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 #define TB_ISBUTTONENABLED (WM_USER + 9)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 // return: BOOL LOWORD, enabled if nonzero; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 #define TB_ISBUTTONCHECKED (WM_USER + 10)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 // return: BOOL LOWORD, checked if nonzero; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 #define TB_ISBUTTONPRESSED (WM_USER + 11)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 // return: BOOL LOWORD, pressed if nonzero; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 #define TB_ISBUTTONHIDDEN (WM_USER + 12)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 // return: BOOL LOWORD, hidden if nonzero; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 #define TB_ISBUTTONINDETERMINATE (WM_USER + 13)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 // return: BOOL LOWORD, indeterminate if nonzero; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 #define TB_SETSTATE (WM_USER + 17)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 // lParam: UINT LOWORD, state bits; HIWORD not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 #define TB_GETSTATE (WM_USER + 18)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 // wParam: UINT, button ID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 // return: UINT LOWORD, state bits; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 #define TB_ADDBITMAP (WM_USER + 19)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 // wParam: UINT, number of button graphics in bitmap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 // lParam: one of:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 // HINSTANCE LOWORD, module handle; UINT HIWORD, resource id
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 // HINSTANCE LOWORD, NULL; HBITMAP HIWORD, bitmap handle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 // return: one of:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 // int LOWORD, index for first new button; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 // int LOWORD, -1 indicating error; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 #define TB_ADDBUTTONS (WM_USER + 20)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 // wParam: UINT, number of buttons to add
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 // lParam: LPTBBUTTON, pointer to array of TBBUTTON structures
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 #define TB_INSERTBUTTON (WM_USER + 21)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 // wParam: UINT, index for insertion (appended if index doesn't exist)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 // lParam: LPTBBUTTON, pointer to one TBBUTTON structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 #define TB_DELETEBUTTON (WM_USER + 22)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 // wParam: UINT, index of button to delete
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 #define TB_GETBUTTON (WM_USER + 23)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 // wParam: UINT, index of button to get
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 // lParam: LPTBBUTTON, pointer to TBBUTTON buffer to receive button
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 // return: not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 #define TB_BUTTONCOUNT (WM_USER + 24)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 // wParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 // return: UINT LOWORD, number of buttons; HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 #define TB_COMMANDTOINDEX (WM_USER + 25)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 // wParam: UINT, command id
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 // lParam: not used, 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 // return: UINT LOWORD, index of button (-1 if command not found);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 // HIWORD not used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 //
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 #define TBN_BEGINDRAG 0x0201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 #define TBN_ENDDRAG 0x0203