mCtrl  0.9.7
mditab.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2013 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 #include <mCtrl/_common.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
95 
100 BOOL MCTRL_API mcMditab_Initialize(void);
101 
105 void MCTRL_API mcMditab_Terminate(void);
106 
114 
116 #define MC_WC_MDITABW L"mCtrl.mditab"
117 
118 #define MC_WC_MDITABA "mCtrl.mditab"
119 
127 
129 #define MC_MTS_CBONTOOLBAR 0x0000
130 
131 #define MC_MTS_CBONEACHTAB 0x0001
132 
133 #define MC_MTS_CBONACTIVETAB 0x0002
134 
135 #define MC_MTS_CBNONE 0x0003
136 
137 #define MC_MTS_CBMASK 0x0003
138 
140 #define MC_MTS_TLBALWAYS 0x0000
141 
142 #define MC_MTS_TLBONSCROLL 0x0004
143 
144 #define MC_MTS_TLBNEVER 0x0008
145 
146 #define MC_MTS_TLBMASK 0x000C
147 
149 #define MC_MTS_SCROLLALWAYS 0x0010
150 
152 #define MC_MTS_CLOSEONMCLICK 0x0020
153 
155 #define MC_MTS_FOCUSONBUTTONDOWN 0x0040
156 
157 #define MC_MTS_FOCUSNEVER 0x0080
158 
159 #define MC_MTS_FOCUSMASK 0x00C0
160 
164 #define MC_MTS_DOUBLEBUFFER 0x0100
165 
171 #define MC_MTS_ANIMATE 0x0200
172 
181 
183 #define MC_MTIF_TEXT (1 << 0)
184 
185 #define MC_MTIF_IMAGE (1 << 1)
186 
187 #define MC_MTIF_PARAM (1 << 2)
188 
198 #define MC_MTHT_NOWHERE (1 << 0)
199 
200 #define MC_MTHT_ONITEMICON (1 << 1)
201 
202 #define MC_MTHT_ONITEMLABEL (1 << 2)
203 
204 #define MC_MTHT_ONITEMCLOSEBUTTON (1 << 3)
205 
206 #define MC_MTHT_ONITEM \
207  (MC_MTHT_ONITEMICON | MC_MTHT_ONITEMLABEL | MC_MTHT_ONITEMCLOSEBUTTON)
208 
215 
220 typedef struct MC_MTITEMW_tag {
223  DWORD dwMask;
225  LPWSTR pszText;
230  int iImage;
232  LPARAM lParam;
233 } MC_MTITEMW;
234 
239 typedef struct MC_MTITEMA_tag {
242  DWORD dwMask;
244  LPSTR pszText;
249  int iImage;
251  LPARAM lParam;
252 } MC_MTITEMA;
253 
264 typedef struct MC_MTITEMWIDTH_tag {
268  DWORD dwDefWidth;
272  DWORD dwMinWidth;
274 
278 typedef struct MC_MTHITTESTINFO_tag {
280  POINT pt;
282  UINT flags;
284 
288 typedef struct MC_NMMTSELCHANGE_tag {
290  NMHDR hdr;
292  int iItemOld;
294  LPARAM lParamOld;
296  int iItemNew;
298  LPARAM lParamNew;
300 
304 typedef struct MC_NMMTDELETEITEM_tag {
306  NMHDR hdr;
308  int iItem;
310  LPARAM lParam;
312 
313 
317 typedef struct MC_NMMTCLOSEITEM_tag {
319  NMHDR hdr;
321  int iItem;
323  LPARAM lParam;
325 
333 
340 #define MC_MTM_GETITEMCOUNT (MC_MTM_FIRST + 0)
341 
350 #define MC_MTM_GETIMAGELIST (MC_MTM_FIRST + 1)
351 
362 #define MC_MTM_SETIMAGELIST (MC_MTM_FIRST + 2)
363 
376 #define MC_MTM_DELETEALLITEMS (MC_MTM_FIRST + 3)
377 
386 #define MC_MTM_INSERTITEMW (MC_MTM_FIRST + 4)
387 
395 #define MC_MTM_INSERTITEMA (MC_MTM_FIRST + 5)
396 
403 #define MC_MTM_SETITEMW (MC_MTM_FIRST + 6)
404 
411 #define MC_MTM_SETITEMA (MC_MTM_FIRST + 7)
412 
427 #define MC_MTM_GETITEMW (MC_MTM_FIRST + 8)
428 
443 #define MC_MTM_GETITEMA (MC_MTM_FIRST + 9)
444 
453 #define MC_MTM_DELETEITEM (MC_MTM_FIRST + 10)
454 
462 #define MC_MTM_HITTEST (MC_MTM_FIRST + 11)
463 
470 #define MC_MTM_SETCURSEL (MC_MTM_FIRST + 12)
471 
478 #define MC_MTM_GETCURSEL (MC_MTM_FIRST + 13)
479 
489 #define MC_MTM_CLOSEITEM (MC_MTM_FIRST + 14)
490 
504 #define MC_MTM_SETITEMWIDTH (MC_MTM_FIRST + 15)
505 
514 #define MC_MTM_GETITEMWIDTH (MC_MTM_FIRST + 16)
515 
525 #define MC_MTM_INITSTORAGE (MC_MTM_FIRST + 17)
526 
536 #define MC_MTM_GETITEMRECT (MC_MTM_FIRST + 18)
537 
545 #define MC_MTM_ENSUREVISIBLE (MC_MTM_FIRST + 19)
546 
554 
562 #define MC_MTN_SELCHANGE (MC_MTN_FIRST + 0)
563 
571 #define MC_MTN_DELETEITEM (MC_MTN_FIRST + 1)
572 
584 #define MC_MTN_DELETEALLITEMS (MC_MTN_FIRST + 2)
585 
595 #define MC_MTN_CLOSEITEM (MC_MTN_FIRST + 3)
596 
604 
606 #define MC_WC_MDITAB MCTRL_NAME_AW(MC_WC_MDITAB)
607 
608 #define MC_MTITEM MCTRL_NAME_AW(MC_MTITEM)
609 
610 #define MC_MTM_INSERTITEM MCTRL_NAME_AW(MC_MTM_INSERTITEM)
611 
612 #define MC_MTM_SETITEM MCTRL_NAME_AW(MC_MTM_SETITEM)
613 
614 #define MC_MTM_GETITEM MCTRL_NAME_AW(MC_MTM_GETITEM)
615 
619 #ifdef __cplusplus
620 } /* extern "C" */
621 #endif
622 
623 #endif /* MCTRL_MDITAB_H */
#define MCTRL_API
Definition: _defs.h:46
int iItem
Definition: mditab.h:308
LPSTR pszText
Definition: mditab.h:244
DWORD dwMinWidth
Definition: mditab.h:272
int iItemNew
Definition: mditab.h:296
Structure for notification MC_MTN_DELETEITEM.
Definition: mditab.h:304
NMHDR hdr
Definition: mditab.h:319
int cchTextMax
Definition: mditab.h:246
LPARAM lParam
Definition: mditab.h:323
int iItem
Definition: mditab.h:321
void mcMditab_Terminate(void)
LPARAM lParam
Definition: mditab.h:310
LPARAM lParamNew
Definition: mditab.h:298
LPWSTR pszText
Definition: mditab.h:225
DWORD dwMask
Definition: mditab.h:242
int iImage
Definition: mditab.h:230
NMHDR hdr
Definition: mditab.h:290
int cchTextMax
Definition: mditab.h:227
Structure for message MC_MTM_HITTEST.
Definition: mditab.h:278
int iImage
Definition: mditab.h:249
Structure for notification MC_MTN_SELCHANGE.
Definition: mditab.h:288
NMHDR hdr
Definition: mditab.h:306
int iItemOld
Definition: mditab.h:292
Structure for messages MC_MTM_SETITEMWIDTH and MC_MTM_GETITEMWIDTH.
Definition: mditab.h:264
POINT pt
Definition: mditab.h:280
Structure for manipulating with the tab item (ANSI variant).
Definition: mditab.h:239
Structure for manipulating with the tab item (Unicode variant).
Definition: mditab.h:220
UINT flags
Definition: mditab.h:282
LPARAM lParam
Definition: mditab.h:251
LPARAM lParam
Definition: mditab.h:232
LPARAM lParamOld
Definition: mditab.h:294
BOOL mcMditab_Initialize(void)
DWORD dwDefWidth
Definition: mditab.h:268
Structure for notification MC_MTN_CLOSEITEM.
Definition: mditab.h:317
DWORD dwMask
Definition: mditab.h:223
Common definitions.
Common constants and types.