mCtrl  0.11.0
mditab.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015 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 
125 
130 BOOL MCTRL_API mcMditab_Initialize(void);
131 
135 void MCTRL_API mcMditab_Terminate(void);
136 
144 
184 BOOL MCTRL_API mcMditab_DefWindowProc(HWND hwndMain, HWND hwndMditab, UINT uMsg,
185  WPARAM wParam, LPARAM lParam, LRESULT* plResult);
186 
194 
196 #define MC_WC_MDITABW L"mCtrl.mditab"
197 
198 #define MC_WC_MDITABA "mCtrl.mditab"
199 
207 
209 #define MC_MTS_CBONTOOLBAR 0x0000
210 
211 #define MC_MTS_CBONEACHTAB 0x0001
212 
213 #define MC_MTS_CBONACTIVETAB 0x0002
214 
215 #define MC_MTS_CBNONE 0x0003
216 
217 #define MC_MTS_CBMASK 0x0003
218 
220 #define MC_MTS_TLBALWAYS 0x0000
221 
222 #define MC_MTS_TLBONSCROLL 0x0004
223 
224 #define MC_MTS_TLBNEVER 0x0008
225 
226 #define MC_MTS_TLBMASK 0x000C
227 
229 #define MC_MTS_SCROLLALWAYS 0x0010
230 
232 #define MC_MTS_CLOSEONMCLICK 0x0020
233 
235 #define MC_MTS_FOCUSONBUTTONDOWN 0x0040
236 
237 #define MC_MTS_FOCUSNEVER 0x0080
238 
239 #define MC_MTS_FOCUSMASK 0x00C0
240 
244 #define MC_MTS_DOUBLEBUFFER 0x0100
245 
251 #define MC_MTS_ANIMATE 0x0200
252 
262 #define MC_MTS_EXTENDWINDOWFRAME 0x0400
263 
273 #define MC_MTS_NOTOOLTIPS 0x0800
274 
278 #define MC_MTS_DRAGDROP 0x1000
279 
288 
290 #define MC_MTIF_TEXT (1 << 0)
291 
292 #define MC_MTIF_IMAGE (1 << 1)
293 
294 #define MC_MTIF_PARAM (1 << 2)
295 
304 
306 #define MC_MTHT_NOWHERE (1 << 0)
307 
308 #define MC_MTHT_ONITEMICON (1 << 1)
309 
310 #define MC_MTHT_ONITEMLABEL (1 << 2)
311 
312 #define MC_MTHT_ONITEMCLOSEBUTTON (1 << 3)
313 
314 #define MC_MTHT_ONITEM \
315  (MC_MTHT_ONITEMICON | MC_MTHT_ONITEMLABEL | MC_MTHT_ONITEMCLOSEBUTTON)
316 
317 #define MC_MTHT_ONLEFTSCROLLBUTTON (1 << 4)
318 
319 #define MC_MTHT_ONRIGHTSCROLLBUTTON (1 << 5)
320 
321 #define MC_MTHT_ONLISTBUTTON (1 << 6)
322 
323 #define MC_MTHT_ONCLOSEBUTTON (1 << 7)
324 
325 #define MC_MTHT_ONBUTTON \
326  (MC_MTHT_ONLEFTSCROLLBUTTON | MC_MTHT_ONRIGHTSCROLLBUTTON | \
327  MC_MTHT_ONLISTBUTTON | MC_MTHT_ONCLOSEBUTTON)
328 
329 #define MC_MTHT_ABOVE (1 << 8)
330 
331 #define MC_MTHT_BELOW (1 << 9)
332 
333 #define MC_MTHT_TORIGHT (1 << 10)
334 
335 #define MC_MTHT_TOLEFT (1 << 11)
336 
344 
349 typedef struct MC_MTITEMW_tag {
352  DWORD dwMask;
354  LPWSTR pszText;
359  int iImage;
361  LPARAM lParam;
362 } MC_MTITEMW;
363 
368 typedef struct MC_MTITEMA_tag {
371  DWORD dwMask;
373  LPSTR pszText;
378  int iImage;
380  LPARAM lParam;
381 } MC_MTITEMA;
382 
393 typedef struct MC_MTITEMWIDTH_tag {
397  DWORD dwDefWidth;
401  DWORD dwMinWidth;
403 
407 typedef struct MC_MTHITTESTINFO_tag {
409  POINT pt;
411  UINT flags;
413 
417 typedef struct MC_NMMTSELCHANGE_tag {
419  NMHDR hdr;
421  int iItemOld;
423  LPARAM lParamOld;
425  int iItemNew;
427  LPARAM lParamNew;
429 
433 typedef struct MC_NMMTDELETEITEM_tag {
435  NMHDR hdr;
437  int iItem;
439  LPARAM lParam;
441 
442 
446 typedef struct MC_NMMTCLOSEITEM_tag {
448  NMHDR hdr;
450  int iItem;
452  LPARAM lParam;
454 
459 typedef struct MC_NMMTCANDROPITEM_tag {
461  NMHDR hdr;
463  int iItem;
465  LPARAM lParam;
467  POINT ptPosition;
472  HBITMAP hItemBitmap;
474 
482 
489 #define MC_MTM_GETITEMCOUNT (MC_MTM_FIRST + 0)
490 
499 #define MC_MTM_GETIMAGELIST (MC_MTM_FIRST + 1)
500 
511 #define MC_MTM_SETIMAGELIST (MC_MTM_FIRST + 2)
512 
525 #define MC_MTM_DELETEALLITEMS (MC_MTM_FIRST + 3)
526 
535 #define MC_MTM_INSERTITEMW (MC_MTM_FIRST + 4)
536 
544 #define MC_MTM_INSERTITEMA (MC_MTM_FIRST + 5)
545 
552 #define MC_MTM_SETITEMW (MC_MTM_FIRST + 6)
553 
560 #define MC_MTM_SETITEMA (MC_MTM_FIRST + 7)
561 
576 #define MC_MTM_GETITEMW (MC_MTM_FIRST + 8)
577 
592 #define MC_MTM_GETITEMA (MC_MTM_FIRST + 9)
593 
602 #define MC_MTM_DELETEITEM (MC_MTM_FIRST + 10)
603 
611 #define MC_MTM_HITTEST (MC_MTM_FIRST + 11)
612 
619 #define MC_MTM_SETCURSEL (MC_MTM_FIRST + 12)
620 
627 #define MC_MTM_GETCURSEL (MC_MTM_FIRST + 13)
628 
638 #define MC_MTM_CLOSEITEM (MC_MTM_FIRST + 14)
639 
653 #define MC_MTM_SETITEMWIDTH (MC_MTM_FIRST + 15)
654 
663 #define MC_MTM_GETITEMWIDTH (MC_MTM_FIRST + 16)
664 
674 #define MC_MTM_INITSTORAGE (MC_MTM_FIRST + 17)
675 
686 #define MC_MTM_GETITEMRECT (MC_MTM_FIRST + 18)
687 
695 #define MC_MTM_ENSUREVISIBLE (MC_MTM_FIRST + 19)
696 
705 #define MC_MTM_SETTOOLTIPS (MC_MTM_FIRST + 20)
706 
714 #define MC_MTM_GETTOOLTIPS (MC_MTM_FIRST + 21)
715 
724 #define MC_MTM_CANCELDRAGITEM (MC_MTM_FIRST + 22)
725 
733 
741 #define MC_MTN_SELCHANGE (MC_MTN_FIRST + 0)
742 
750 #define MC_MTN_DELETEITEM (MC_MTN_FIRST + 1)
751 
763 #define MC_MTN_DELETEALLITEMS (MC_MTN_FIRST + 2)
764 
774 #define MC_MTN_CLOSEITEM (MC_MTN_FIRST + 3)
775 
783 
785 #define MC_WC_MDITAB MCTRL_NAME_AW(MC_WC_MDITAB)
786 
787 #define MC_MTITEM MCTRL_NAME_AW(MC_MTITEM)
788 
789 #define MC_MTM_INSERTITEM MCTRL_NAME_AW(MC_MTM_INSERTITEM)
790 
791 #define MC_MTM_SETITEM MCTRL_NAME_AW(MC_MTM_SETITEM)
792 
793 #define MC_MTM_GETITEM MCTRL_NAME_AW(MC_MTM_GETITEM)
794 
798 #ifdef __cplusplus
799 } /* extern "C" */
800 #endif
801 
802 #endif /* MCTRL_MDITAB_H */
#define MCTRL_API
Definition: _defs.h:46
int iItem
Definition: mditab.h:437
Structure for manipulating with the tab item (Unicode variant).
Definition: mditab.h:349
Structure for manipulating with the tab item (ANSI variant).
Definition: mditab.h:368
LPSTR pszText
Definition: mditab.h:373
DWORD dwMinWidth
Definition: mditab.h:401
HBITMAP hItemBitmap
Definition: mditab.h:472
BOOL mcMditab_DefWindowProc(HWND hwndMain, HWND hwndMditab, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
int iItemNew
Definition: mditab.h:425
NMHDR hdr
Definition: mditab.h:448
int cchTextMax
Definition: mditab.h:375
LPARAM lParam
Definition: mditab.h:452
int iItem
Definition: mditab.h:450
void mcMditab_Terminate(void)
LPARAM lParam
Definition: mditab.h:439
LPARAM lParamNew
Definition: mditab.h:427
LPWSTR pszText
Definition: mditab.h:354
Structure for notification MC_MTN_CLOSEITEM.
Definition: mditab.h:446
Structure for notifications related to drag-and-drop operations: MC_MTN_BEGINDRAGITEM, MC_MTN_CANDROPITEM, MC_MTN_DROPPEDITEM.
Definition: mditab.h:459
DWORD dwMask
Definition: mditab.h:371
int iImage
Definition: mditab.h:359
NMHDR hdr
Definition: mditab.h:419
POINT ptPosition
Definition: mditab.h:467
int cchTextMax
Definition: mditab.h:356
int iItem
Definition: mditab.h:463
int iImage
Definition: mditab.h:378
Structure for messages MC_MTM_SETITEMWIDTH and MC_MTM_GETITEMWIDTH.
Definition: mditab.h:393
NMHDR hdr
Definition: mditab.h:435
Structure for notification MC_MTN_SELCHANGE.
Definition: mditab.h:417
int iItemOld
Definition: mditab.h:421
POINT pt
Definition: mditab.h:409
UINT flags
Definition: mditab.h:411
LPARAM lParam
Definition: mditab.h:380
LPARAM lParam
Definition: mditab.h:465
Structure for notification MC_MTN_DELETEITEM.
Definition: mditab.h:433
LPARAM lParam
Definition: mditab.h:361
LPARAM lParamOld
Definition: mditab.h:423
BOOL mcMditab_Initialize(void)
NMHDR hdr
Definition: mditab.h:461
Structure for message MC_MTM_HITTEST.
Definition: mditab.h:407
DWORD dwDefWidth
Definition: mditab.h:397
DWORD dwMask
Definition: mditab.h:352
Common definitions.
Common constants and types.