mCtrl  0.11.2
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 
303 
305 #define MC_MTIF_TEXT (1 << 0)
306 
307 #define MC_MTIF_IMAGE (1 << 1)
308 
309 #define MC_MTIF_PARAM (1 << 2)
310 
319 
321 #define MC_MTHT_NOWHERE (1 << 0)
322 
323 #define MC_MTHT_ONITEMICON (1 << 1)
324 
325 #define MC_MTHT_ONITEMLABEL (1 << 2)
326 
327 #define MC_MTHT_ONITEMCLOSEBUTTON (1 << 3)
328 
329 #define MC_MTHT_ONITEM \
330  (MC_MTHT_ONITEMICON | MC_MTHT_ONITEMLABEL | MC_MTHT_ONITEMCLOSEBUTTON)
331 
332 #define MC_MTHT_ONLEFTSCROLLBUTTON (1 << 4)
333 
334 #define MC_MTHT_ONRIGHTSCROLLBUTTON (1 << 5)
335 
336 #define MC_MTHT_ONLISTBUTTON (1 << 6)
337 
338 #define MC_MTHT_ONCLOSEBUTTON (1 << 7)
339 
340 #define MC_MTHT_ONBUTTON \
341  (MC_MTHT_ONLEFTSCROLLBUTTON | MC_MTHT_ONRIGHTSCROLLBUTTON | \
342  MC_MTHT_ONLISTBUTTON | MC_MTHT_ONCLOSEBUTTON)
343 
344 #define MC_MTHT_ABOVE (1 << 8)
345 
346 #define MC_MTHT_BELOW (1 << 9)
347 
348 #define MC_MTHT_TORIGHT (1 << 10)
349 
350 #define MC_MTHT_TOLEFT (1 << 11)
351 
359 
364 typedef struct MC_MTITEMW_tag {
367  DWORD dwMask;
369  LPWSTR pszText;
374  int iImage;
376  LPARAM lParam;
377 } MC_MTITEMW;
378 
383 typedef struct MC_MTITEMA_tag {
386  DWORD dwMask;
388  LPSTR pszText;
393  int iImage;
395  LPARAM lParam;
396 } MC_MTITEMA;
397 
408 typedef struct MC_MTITEMWIDTH_tag {
412  DWORD dwDefWidth;
416  DWORD dwMinWidth;
418 
422 typedef struct MC_MTHITTESTINFO_tag {
424  POINT pt;
426  UINT flags;
428 
432 typedef struct MC_NMMTSELCHANGE_tag {
434  NMHDR hdr;
436  int iItemOld;
438  LPARAM lParamOld;
440  int iItemNew;
442  LPARAM lParamNew;
444 
448 typedef struct MC_NMMTDELETEITEM_tag {
450  NMHDR hdr;
452  int iItem;
454  LPARAM lParam;
456 
457 
461 typedef struct MC_NMMTCLOSEITEM_tag {
463  NMHDR hdr;
465  int iItem;
467  LPARAM lParam;
469 
474 typedef struct MC_NMMTDISPINFOW_tag {
476  NMHDR hdr;
478  UINT iItem;
482 
487 typedef struct MC_NMMTDISPINFOA_tag {
489  NMHDR hdr;
491  UINT iItem;
495 
503 
510 #define MC_MTM_GETITEMCOUNT (MC_MTM_FIRST + 0)
511 
520 #define MC_MTM_GETIMAGELIST (MC_MTM_FIRST + 1)
521 
532 #define MC_MTM_SETIMAGELIST (MC_MTM_FIRST + 2)
533 
546 #define MC_MTM_DELETEALLITEMS (MC_MTM_FIRST + 3)
547 
556 #define MC_MTM_INSERTITEMW (MC_MTM_FIRST + 4)
557 
565 #define MC_MTM_INSERTITEMA (MC_MTM_FIRST + 5)
566 
573 #define MC_MTM_SETITEMW (MC_MTM_FIRST + 6)
574 
581 #define MC_MTM_SETITEMA (MC_MTM_FIRST + 7)
582 
597 #define MC_MTM_GETITEMW (MC_MTM_FIRST + 8)
598 
613 #define MC_MTM_GETITEMA (MC_MTM_FIRST + 9)
614 
623 #define MC_MTM_DELETEITEM (MC_MTM_FIRST + 10)
624 
632 #define MC_MTM_HITTEST (MC_MTM_FIRST + 11)
633 
640 #define MC_MTM_SETCURSEL (MC_MTM_FIRST + 12)
641 
648 #define MC_MTM_GETCURSEL (MC_MTM_FIRST + 13)
649 
659 #define MC_MTM_CLOSEITEM (MC_MTM_FIRST + 14)
660 
674 #define MC_MTM_SETITEMWIDTH (MC_MTM_FIRST + 15)
675 
684 #define MC_MTM_GETITEMWIDTH (MC_MTM_FIRST + 16)
685 
695 #define MC_MTM_INITSTORAGE (MC_MTM_FIRST + 17)
696 
707 #define MC_MTM_GETITEMRECT (MC_MTM_FIRST + 18)
708 
716 #define MC_MTM_ENSUREVISIBLE (MC_MTM_FIRST + 19)
717 
726 #define MC_MTM_SETTOOLTIPS (MC_MTM_FIRST + 20)
727 
735 #define MC_MTM_GETTOOLTIPS (MC_MTM_FIRST + 21)
736 
745 #define MC_MTM_CANCELDRAGITEM (MC_MTM_FIRST + 22)
746 
754 
762 #define MC_MTN_SELCHANGE (MC_MTN_FIRST + 0)
763 
771 #define MC_MTN_DELETEITEM (MC_MTN_FIRST + 1)
772 
784 #define MC_MTN_DELETEALLITEMS (MC_MTN_FIRST + 2)
785 
795 #define MC_MTN_CLOSEITEM (MC_MTN_FIRST + 3)
796 
817 #define MC_MTN_GETDISPINFOW (MC_MTN_FIRST + 4)
818 
839 #define MC_MTN_GETDISPINFOA (MC_MTN_FIRST + 5)
840 
848 
850 #define MC_WC_MDITAB MCTRL_NAME_AW(MC_WC_MDITAB)
851 
852 #define MC_MTITEM MCTRL_NAME_AW(MC_MTITEM)
853 
854 #define MC_MTM_INSERTITEM MCTRL_NAME_AW(MC_MTM_INSERTITEM)
855 
856 #define MC_MTM_SETITEM MCTRL_NAME_AW(MC_MTM_SETITEM)
857 
858 #define MC_MTM_GETITEM MCTRL_NAME_AW(MC_MTM_GETITEM)
859 
860 #define MC_MTN_GETDISPINFO MCTRL_NAME_AW(MC_MTN_GETDISPINFO)
861 
862 #define MC_NMMTDISPINFO MCTRL_NAME_AW(MC_NMMTDISPINFO)
863 
867 #ifdef __cplusplus
868 } /* extern "C" */
869 #endif
870 
871 #endif /* MCTRL_MDITAB_H */
#define MCTRL_API
Definition: _defs.h:46
int iItem
Definition: mditab.h:452
Structure for manipulating with the tab item (Unicode variant).
Definition: mditab.h:364
Structure for manipulating with the tab item (ANSI variant).
Definition: mditab.h:383
LPSTR pszText
Definition: mditab.h:388
DWORD dwMinWidth
Definition: mditab.h:416
Structure used by notification MC_MTN_GETDISPINFO (ANSI variant).
Definition: mditab.h:487
Structure used by notification MC_MTN_GETDISPINFO (Unicode variant).
Definition: mditab.h:474
BOOL mcMditab_DefWindowProc(HWND hwndMain, HWND hwndMditab, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
int iItemNew
Definition: mditab.h:440
NMHDR hdr
Definition: mditab.h:463
int cchTextMax
Definition: mditab.h:390
LPARAM lParam
Definition: mditab.h:467
int iItem
Definition: mditab.h:465
void mcMditab_Terminate(void)
LPARAM lParam
Definition: mditab.h:454
LPARAM lParamNew
Definition: mditab.h:442
LPWSTR pszText
Definition: mditab.h:369
Structure for notification MC_MTN_CLOSEITEM.
Definition: mditab.h:461
NMHDR hdr
Definition: mditab.h:489
UINT iItem
Definition: mditab.h:478
DWORD dwMask
Definition: mditab.h:386
int iImage
Definition: mditab.h:374
NMHDR hdr
Definition: mditab.h:434
int cchTextMax
Definition: mditab.h:371
int iImage
Definition: mditab.h:393
UINT iItem
Definition: mditab.h:491
Structure for messages MC_MTM_SETITEMWIDTH and MC_MTM_GETITEMWIDTH.
Definition: mditab.h:408
NMHDR hdr
Definition: mditab.h:450
Structure for notification MC_MTN_SELCHANGE.
Definition: mditab.h:432
int iItemOld
Definition: mditab.h:436
POINT pt
Definition: mditab.h:424
NMHDR hdr
Definition: mditab.h:476
UINT flags
Definition: mditab.h:426
LPARAM lParam
Definition: mditab.h:395
Structure for notification MC_MTN_DELETEITEM.
Definition: mditab.h:448
MC_MTITEMA item
Definition: mditab.h:493
LPARAM lParam
Definition: mditab.h:376
LPARAM lParamOld
Definition: mditab.h:438
BOOL mcMditab_Initialize(void)
Structure for message MC_MTM_HITTEST.
Definition: mditab.h:422
DWORD dwDefWidth
Definition: mditab.h:412
MC_MTITEMW item
Definition: mditab.h:480
DWORD dwMask
Definition: mditab.h:367
Common definitions.
Common constants and types.