mCtrl  0.11.5
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 
140 
145 BOOL MCTRL_API mcMditab_Initialize(void);
146 
150 void MCTRL_API mcMditab_Terminate(void);
151 
159 
199 BOOL MCTRL_API mcMditab_DefWindowProc(HWND hwndMain, HWND hwndMditab, UINT uMsg,
200  WPARAM wParam, LPARAM lParam, LRESULT* plResult);
201 
209 
211 #define MC_WC_MDITABW L"mCtrl.mditab"
212 
213 #define MC_WC_MDITABA "mCtrl.mditab"
214 
222 
224 #define MC_MTS_CBONTOOLBAR 0x0000
225 
226 #define MC_MTS_CBONEACHTAB 0x0001
227 
228 #define MC_MTS_CBONACTIVETAB 0x0002
229 
230 #define MC_MTS_CBNONE 0x0003
231 
232 #define MC_MTS_CBMASK 0x0003
233 
235 #define MC_MTS_TLBALWAYS 0x0000
236 
237 #define MC_MTS_TLBONSCROLL 0x0004
238 
239 #define MC_MTS_TLBNEVER 0x0008
240 
241 #define MC_MTS_TLBMASK 0x000C
242 
244 #define MC_MTS_SCROLLALWAYS 0x0010
245 
247 #define MC_MTS_CLOSEONMCLICK 0x0020
248 
250 #define MC_MTS_FOCUSONBUTTONDOWN 0x0040
251 
252 #define MC_MTS_FOCUSNEVER 0x0080
253 
254 #define MC_MTS_FOCUSMASK 0x00C0
255 
259 #define MC_MTS_DOUBLEBUFFER 0x0100
260 
266 #define MC_MTS_ANIMATE 0x0200
267 
277 #define MC_MTS_EXTENDWINDOWFRAME 0x0400
278 
288 #define MC_MTS_NOTOOLTIPS 0x0800
289 
293 #define MC_MTS_DRAGDROP 0x1000
294 
298 #define MC_MTS_ROUNDEDITEMS 0x2000
299 
308 
310 #define MC_MTIF_TEXT (1 << 0)
311 
312 #define MC_MTIF_IMAGE (1 << 1)
313 
314 #define MC_MTIF_PARAM (1 << 2)
315 
324 
326 #define MC_MTHT_NOWHERE (1 << 0)
327 
328 #define MC_MTHT_ONITEMICON (1 << 1)
329 
330 #define MC_MTHT_ONITEMLABEL (1 << 2)
331 
332 #define MC_MTHT_ONITEMCLOSEBUTTON (1 << 3)
333 
334 #define MC_MTHT_ONITEM \
335  (MC_MTHT_ONITEMICON | MC_MTHT_ONITEMLABEL | MC_MTHT_ONITEMCLOSEBUTTON)
336 
337 #define MC_MTHT_ONLEFTSCROLLBUTTON (1 << 4)
338 
339 #define MC_MTHT_ONRIGHTSCROLLBUTTON (1 << 5)
340 
341 #define MC_MTHT_ONLISTBUTTON (1 << 6)
342 
343 #define MC_MTHT_ONCLOSEBUTTON (1 << 7)
344 
345 #define MC_MTHT_ONBUTTON \
346  (MC_MTHT_ONLEFTSCROLLBUTTON | MC_MTHT_ONRIGHTSCROLLBUTTON | \
347  MC_MTHT_ONLISTBUTTON | MC_MTHT_ONCLOSEBUTTON)
348 
349 #define MC_MTHT_ABOVE (1 << 8)
350 
351 #define MC_MTHT_BELOW (1 << 9)
352 
353 #define MC_MTHT_TORIGHT (1 << 10)
354 
355 #define MC_MTHT_TOLEFT (1 << 11)
356 
364 
369 typedef struct MC_MTITEMW_tag {
372  DWORD dwMask;
374  LPWSTR pszText;
379  int iImage;
381  LPARAM lParam;
382 } MC_MTITEMW;
383 
388 typedef struct MC_MTITEMA_tag {
391  DWORD dwMask;
393  LPSTR pszText;
398  int iImage;
400  LPARAM lParam;
401 } MC_MTITEMA;
402 
413 typedef struct MC_MTITEMWIDTH_tag {
417  DWORD dwDefWidth;
421  DWORD dwMinWidth;
423 
427 typedef struct MC_MTHITTESTINFO_tag {
429  POINT pt;
431  UINT flags;
433 
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 
479 typedef struct MC_NMMTDISPINFOW_tag {
481  NMHDR hdr;
483  UINT iItem;
487 
492 typedef struct MC_NMMTDISPINFOA_tag {
494  NMHDR hdr;
496  UINT iItem;
500 
508 
515 #define MC_MTM_GETITEMCOUNT (MC_MTM_FIRST + 0)
516 
525 #define MC_MTM_GETIMAGELIST (MC_MTM_FIRST + 1)
526 
537 #define MC_MTM_SETIMAGELIST (MC_MTM_FIRST + 2)
538 
551 #define MC_MTM_DELETEALLITEMS (MC_MTM_FIRST + 3)
552 
561 #define MC_MTM_INSERTITEMW (MC_MTM_FIRST + 4)
562 
570 #define MC_MTM_INSERTITEMA (MC_MTM_FIRST + 5)
571 
578 #define MC_MTM_SETITEMW (MC_MTM_FIRST + 6)
579 
586 #define MC_MTM_SETITEMA (MC_MTM_FIRST + 7)
587 
602 #define MC_MTM_GETITEMW (MC_MTM_FIRST + 8)
603 
618 #define MC_MTM_GETITEMA (MC_MTM_FIRST + 9)
619 
628 #define MC_MTM_DELETEITEM (MC_MTM_FIRST + 10)
629 
637 #define MC_MTM_HITTEST (MC_MTM_FIRST + 11)
638 
645 #define MC_MTM_SETCURSEL (MC_MTM_FIRST + 12)
646 
653 #define MC_MTM_GETCURSEL (MC_MTM_FIRST + 13)
654 
664 #define MC_MTM_CLOSEITEM (MC_MTM_FIRST + 14)
665 
679 #define MC_MTM_SETITEMWIDTH (MC_MTM_FIRST + 15)
680 
689 #define MC_MTM_GETITEMWIDTH (MC_MTM_FIRST + 16)
690 
700 #define MC_MTM_INITSTORAGE (MC_MTM_FIRST + 17)
701 
712 #define MC_MTM_GETITEMRECT (MC_MTM_FIRST + 18)
713 
721 #define MC_MTM_ENSUREVISIBLE (MC_MTM_FIRST + 19)
722 
731 #define MC_MTM_SETTOOLTIPS (MC_MTM_FIRST + 20)
732 
740 #define MC_MTM_GETTOOLTIPS (MC_MTM_FIRST + 21)
741 
750 #define MC_MTM_CANCELDRAGITEM (MC_MTM_FIRST + 22)
751 
759 
767 #define MC_MTN_SELCHANGE (MC_MTN_FIRST + 0)
768 
776 #define MC_MTN_DELETEITEM (MC_MTN_FIRST + 1)
777 
789 #define MC_MTN_DELETEALLITEMS (MC_MTN_FIRST + 2)
790 
800 #define MC_MTN_CLOSEITEM (MC_MTN_FIRST + 3)
801 
822 #define MC_MTN_GETDISPINFOW (MC_MTN_FIRST + 4)
823 
844 #define MC_MTN_GETDISPINFOA (MC_MTN_FIRST + 5)
845 
853 
855 #define MC_WC_MDITAB MCTRL_NAME_AW(MC_WC_MDITAB)
856 
857 #define MC_MTITEM MCTRL_NAME_AW(MC_MTITEM)
858 
859 #define MC_MTM_INSERTITEM MCTRL_NAME_AW(MC_MTM_INSERTITEM)
860 
861 #define MC_MTM_SETITEM MCTRL_NAME_AW(MC_MTM_SETITEM)
862 
863 #define MC_MTM_GETITEM MCTRL_NAME_AW(MC_MTM_GETITEM)
864 
865 #define MC_MTN_GETDISPINFO MCTRL_NAME_AW(MC_MTN_GETDISPINFO)
866 
867 #define MC_NMMTDISPINFO MCTRL_NAME_AW(MC_NMMTDISPINFO)
868 
872 #ifdef __cplusplus
873 } /* extern "C" */
874 #endif
875 
876 #endif /* MCTRL_MDITAB_H */
#define MCTRL_API
Definition: _defs.h:46
int iItem
Definition: mditab.h:457
Structure for manipulating with the tab item (Unicode variant).
Definition: mditab.h:369
Structure for manipulating with the tab item (ANSI variant).
Definition: mditab.h:388
LPSTR pszText
Definition: mditab.h:393
DWORD dwMinWidth
Definition: mditab.h:421
Structure used by notification MC_MTN_GETDISPINFO (ANSI variant).
Definition: mditab.h:492
Structure used by notification MC_MTN_GETDISPINFO (Unicode variant).
Definition: mditab.h:479
BOOL mcMditab_DefWindowProc(HWND hwndMain, HWND hwndMditab, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
int iItemNew
Definition: mditab.h:445
NMHDR hdr
Definition: mditab.h:468
int cchTextMax
Definition: mditab.h:395
LPARAM lParam
Definition: mditab.h:472
int iItem
Definition: mditab.h:470
void mcMditab_Terminate(void)
LPARAM lParam
Definition: mditab.h:459
LPARAM lParamNew
Definition: mditab.h:447
LPWSTR pszText
Definition: mditab.h:374
Structure for notification MC_MTN_CLOSEITEM.
Definition: mditab.h:466
NMHDR hdr
Definition: mditab.h:494
UINT iItem
Definition: mditab.h:483
DWORD dwMask
Definition: mditab.h:391
int iImage
Definition: mditab.h:379
NMHDR hdr
Definition: mditab.h:439
int cchTextMax
Definition: mditab.h:376
int iImage
Definition: mditab.h:398
UINT iItem
Definition: mditab.h:496
Structure for messages MC_MTM_SETITEMWIDTH and MC_MTM_GETITEMWIDTH.
Definition: mditab.h:413
NMHDR hdr
Definition: mditab.h:455
Structure for notification MC_MTN_SELCHANGE.
Definition: mditab.h:437
int iItemOld
Definition: mditab.h:441
POINT pt
Definition: mditab.h:429
NMHDR hdr
Definition: mditab.h:481
UINT flags
Definition: mditab.h:431
LPARAM lParam
Definition: mditab.h:400
Structure for notification MC_MTN_DELETEITEM.
Definition: mditab.h:453
MC_MTITEMA item
Definition: mditab.h:498
LPARAM lParam
Definition: mditab.h:381
LPARAM lParamOld
Definition: mditab.h:443
BOOL mcMditab_Initialize(void)
Structure for message MC_MTM_HITTEST.
Definition: mditab.h:427
DWORD dwDefWidth
Definition: mditab.h:417
MC_MTITEMW item
Definition: mditab.h:485
DWORD dwMask
Definition: mditab.h:372
Common definitions.
Common constants and types.