mCtrl
mditab.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2012 Martin Mitas
3  *
4  * This library is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef MCTRL_MDITAB_H
20 #define MCTRL_MDITAB_H
21 
22 #include <mCtrl/defs.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 
95 
100 void MCTRL_API mcMditab_Terminate(void);
101 
102 
108 #define MC_WC_MDITABW L"mCtrl.mditab"
109 
110 #define MC_WC_MDITABA "mCtrl.mditab"
111 
118 
120 #define MC_MTS_CBONTOOLBAR 0x0000
121 
122 #define MC_MTS_CBONEACHTAB 0x0001
123 
124 #define MC_MTS_CBONACTIVETAB 0x0002
125 
126 #define MC_MTS_CBNONE 0x0003
127 
128 #define MC_MTS_CBMASK 0x0003
129 
131 #define MC_MTS_TLBALWAYS 0x0000
132 
133 #define MC_MTS_TLBONSCROLL 0x0004
134 
135 #define MC_MTS_TLBNEVER 0x0008
136 
137 #define MC_MTS_TLBMASK 0x000C
138 
140 #define MC_MTS_SCROLLALWAYS 0x0010
141 
143 #define MC_MTS_CLOSEONMCLICK 0x0020
144 
146 #define MC_MTS_FOCUSONBUTTONDOWN 0x0040
147 
148 #define MC_MTS_FOCUSNEVER 0x0080
149 
150 #define MC_MTS_FOCUSMASK 0x00C0
151 
161 #define MC_MTIF_TEXT (1 << 0)
162 
163 #define MC_MTIF_IMAGE (1 << 1)
164 
165 #define MC_MTIF_PARAM (1 << 2)
166 
172 typedef struct MC_MTITEMW_tag {
174  DWORD dwMask;
176  LPWSTR pszText;
180  int iImage;
182  LPARAM lParam;
183 } MC_MTITEMW;
184 
189 typedef struct MC_MTITEMA_tag {
191  DWORD dwMask;
193  LPSTR pszText;
197  int iImage;
199  LPARAM lParam;
200 } MC_MTITEMA;
201 
211 typedef struct MC_MTITEMWIDTH_tag {
213  DWORD dwDefWidth;
215  DWORD dwMinWidth;
217 
218 
226 #define MC_MTHT_NOWHERE (1 << 0)
227 
228 #define MC_MTHT_ONITEMICON (1 << 1)
229 
230 #define MC_MTHT_ONITEMLABEL (1 << 2)
231 
232 #define MC_MTHT_ONITEMCLOSEBUTTON (1 << 3)
233 
234 #define MC_MTHT_ONITEM \
235  (MC_MTHT_ONITEMICON | MC_MTHT_ONITEMLABEL | MC_MTHT_ONITEMCLOSEBUTTON)
236 
241 typedef struct MC_MTHITTESTINFO_tag {
243  POINT pt;
245  UINT flags;
247 
248 
253 
260 #define MC_MTM_GETITEMCOUNT (WM_USER + 100)
261 
270 #define MC_MTM_GETIMAGELIST (WM_USER + 101)
271 
282 #define MC_MTM_SETIMAGELIST (WM_USER + 102)
283 
296 #define MC_MTM_DELETEALLITEMS (WM_USER + 103)
297 
305 #define MC_MTM_INSERTITEMW (WM_USER + 105)
306 
314 #define MC_MTM_INSERTITEMA (WM_USER + 106)
315 
322 #define MC_MTM_SETITEMW (WM_USER + 107)
323 
330 #define MC_MTM_SETITEMA (WM_USER + 108)
331 
339 #define MC_MTM_GETITEMW (WM_USER + 109)
340 
348 #define MC_MTM_GETITEMA (WM_USER + 110)
349 
358 #define MC_MTM_DELETEITEM (WM_USER + 111)
359 
367 #define MC_MTM_HITTEST (WM_USER + 112)
368 
375 #define MC_MTM_SETCURSEL (WM_USER + 113)
376 
383 #define MC_MTM_GETCURSEL (WM_USER + 114)
384 
394 #define MC_MTM_CLOSEITEM (WM_USER + 115)
395 
409 #define MC_MTM_SETITEMWIDTH (WM_USER + 116)
410 
419 #define MC_MTM_GETITEMWIDTH (WM_USER + 117)
420 
430 #define MC_MTM_INITSTORAGE (WM_USER + 118)
431 
437 typedef struct MC_NMMTSELCHANGE_tag {
439  NMHDR hdr;
441  int iItemOld;
443  LPARAM lParamOld;
445  int iItemNew;
447  LPARAM lParamNew;
449 
453 typedef struct MC_NMMTDELETEITEM_tag {
455  NMHDR hdr;
457  int iItem;
459  LPARAM lParam;
461 
462 
466 typedef struct MC_NMMTCLOSEITEM_tag {
468  NMHDR hdr;
470  int iItem;
472  LPARAM lParam;
474 
475 
480 
488 #define MC_MTN_SELCHANGE (0xfffffddb)
489 
497 #define MC_MTN_DELETEITEM (0xfffffdd0)
498 
510 #define MC_MTN_DELETEALLITEMS (0xfffffdcf)
511 
521 #define MC_MTN_CLOSEITEM (0xfffffdce)
522 
530 
532 #define MC_WC_MDITAB MCTRL_NAME_AW(MC_WC_MDITAB)
533 
534 #define MC_MTITEM MCTRL_NAME_AW(MC_MTITEM)
535 
536 #define MC_MTM_INSERTITEM MCTRL_NAME_AW(MC_MTM_INSERTITEM)
537 
538 #define MC_MTM_SETITEM MCTRL_NAME_AW(MC_MTM_SETITEM)
539 
540 #define MC_MTM_GETITEM MCTRL_NAME_AW(MC_MTM_GETITEM)
541 
545 #ifdef __cplusplus
546 } /* extern "C" */
547 #endif
548 
549 #endif /* MCTRL_MDITAB_H */