mCtrl 0.8.1

mCtrl/mditab.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008-2011 Martin Mitas
00003  *
00004  * This library is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published by
00006  * the Free Software Foundation; either version 2.1 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU Lesser General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00017  */
00018 
00019 #ifndef MCTRL_MDITAB_H
00020 #define MCTRL_MDITAB_H
00021 
00022 #include <mCtrl/defs.h>
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 
00089 BOOL MCTRL_API mcMditab_Initialize(void);
00090 
00095 void MCTRL_API mcMditab_Terminate(void);
00096 
00097 
00103 #define MC_WC_MDITABW        L"mCtrl.mditab"  
00104 
00105 #define MC_WC_MDITABA         "mCtrl.mditab"  
00106 
00113 
00115 #define MC_MTS_CBONTOOLBAR          (0x00000000L)
00116 
00117 #define MC_MTS_CBONEACHTAB          (0x00000001L)
00118 
00119 #define MC_MTS_CBONACTIVETAB        (0x00000002L)
00120 
00121 #define MC_MTS_CBNONE               (0x00000003L)
00122 
00123 #define MC_MTS_CBMASK               (0x00000003L)
00124 
00126 #define MC_MTS_TLBALWAYS            (0x00000000L)
00127 
00128 #define MC_MTS_TLBONSCROLL          (0x00000004L)
00129 
00130 #define MC_MTS_TLBNEVER             (0x00000008L)
00131 
00132 #define MC_MTS_TLBMASK              (0x0000000CL)
00133 
00135 #define MC_MTS_SCROLLALWAYS         (0x00000010L)
00136 
00138 #define MC_MTS_CLOSEONMCLICK        (0x00000020L)
00139 
00141 #define MC_MTS_FOCUSONBUTTONDOWN    (0x00000040L)
00142 
00143 #define MC_MTS_FOCUSNEVER           (0x00000080L)
00144 
00145 #define MC_MTS_FOCUSMASK            (0x000000C0L)
00146 
00158 #define MC_MTIF_TEXT         (1 << 0)
00159 
00160 #define MC_MTIF_IMAGE        (1 << 1)
00161 
00162 #define MC_MTIF_PARAM        (1 << 2)
00163 
00169 typedef struct MC_MTITEMW_tag {
00171     DWORD dwMask;    
00173     LPWSTR pszText;  
00175     int cchTextMax;
00177     int iImage;
00179     LPARAM lParam;
00180 } MC_MTITEMW;
00181 
00186 typedef struct MC_MTITEMA_tag {
00188     DWORD dwMask;    
00190     LPSTR pszText;
00192     int cchTextMax;
00194     int iImage;
00196     LPARAM lParam;
00197 } MC_MTITEMA;
00198 
00208 typedef struct MC_MTITEMWIDTH_tag {
00210     DWORD dwDefWidth;
00212     DWORD dwMinWidth;
00213 } MC_MTITEMWIDTH;
00214 
00215 
00223 #define MC_MTHT_NOWHERE              (1 << 0)
00224 
00225 #define MC_MTHT_ONITEMICON           (1 << 1)
00226 
00227 #define MC_MTHT_ONITEMLABEL          (1 << 2)
00228 
00229 #define MC_MTHT_ONITEMCLOSEBUTTON    (1 << 3)
00230 
00231 #define MC_MTHT_ONITEM               \
00232     (MC_MTHT_ONITEMICON | MC_MTHT_ONITEMLABEL | MC_MTHT_ONITEMCLOSEBUTTON)
00233 
00238 typedef struct MC_MTHITTESTINFO_tag {
00240     POINT pt;
00242     UINT flags;
00243 } MC_MTHITTESTINFO;
00244 
00245 
00250 
00257 #define MC_MTM_GETITEMCOUNT       (WM_USER + 100)
00258 
00267 #define MC_MTM_GETIMAGELIST       (WM_USER + 101)
00268 
00279 #define MC_MTM_SETIMAGELIST       (WM_USER + 102)
00280 
00293 #define MC_MTM_DELETEALLITEMS     (WM_USER + 103)
00294 
00302 #define MC_MTM_INSERTITEMW        (WM_USER + 105)
00303 
00311 #define MC_MTM_INSERTITEMA        (WM_USER + 106)
00312 
00319 #define MC_MTM_SETITEMW           (WM_USER + 107)
00320 
00327 #define MC_MTM_SETITEMA           (WM_USER + 108)
00328 
00336 #define MC_MTM_GETITEMW           (WM_USER + 109)
00337 
00345 #define MC_MTM_GETITEMA           (WM_USER + 110)
00346 
00355 #define MC_MTM_DELETEITEM         (WM_USER + 111)
00356 
00364 #define MC_MTM_HITTEST            (WM_USER + 112)
00365 
00372 #define MC_MTM_SETCURSEL          (WM_USER + 113)
00373 
00380 #define MC_MTM_GETCURSEL          (WM_USER + 114)
00381 
00391 #define MC_MTM_CLOSEITEM          (WM_USER + 115)
00392 
00406 #define MC_MTM_SETITEMWIDTH       (WM_USER + 116)
00407 
00416 #define MC_MTM_GETITEMWIDTH       (WM_USER + 117)
00417 
00423 typedef struct MC_NMMTSELCHANGE_tag {
00425     NMHDR hdr;  
00427     int iItemOld;  
00429     LPARAM lParamOld;  
00431     int iItemNew;  
00433     LPARAM lParamNew;  
00434 } MC_NMMTSELCHANGE;
00435 
00439 typedef struct MC_NMMTDELETEITEM_tag {
00441     NMHDR hdr;
00443     int iItem;
00445     LPARAM lParam;
00446 } MC_NMMTDELETEITEM;
00447 
00448 
00452 typedef struct MC_NMMTCLOSEITEM_tag {
00454     NMHDR hdr;
00456     int iItem;
00458     LPARAM lParam;
00459 } MC_NMMTCLOSEITEM;
00460 
00461 
00466 
00474 #define MC_MTN_SELCHANGE          (0xfffffddb)
00475 
00483 #define MC_MTN_DELETEITEM         (0xfffffdd0)
00484 
00496 #define MC_MTN_DELETEALLITEMS     (0xfffffdcf)
00497 
00507 #define MC_MTN_CLOSEITEM          (0xfffffdce)
00508 
00516 
00517 #ifdef UNICODE
00518 
00519     #define MC_WC_MDITAB          MC_WC_MDITABW
00520 
00521     #define MC_MTITEM             MC_MTITEMW
00522 
00523     #define MC_MTM_INSERTITEM     MC_MTM_INSERTITEMW
00524 
00525     #define MC_MTM_SETITEM        MC_MTM_SETITEMW
00526 
00527     #define MC_MTM_GETITEM        MC_MTM_GETITEMW
00528 #else
00529     #define MC_WC_MDITAB          MC_WC_MDITABA
00530     #define MC_MTITEM             MC_MTITEMA
00531     #define MC_MTM_INSERTITEM     MC_MTM_INSERTITEMA
00532     #define MC_MTM_SETITEM        MC_MTM_SETITEMA
00533     #define MC_MTM_GETITEM        MC_MTM_GETITEMA
00534 #endif
00535 
00539 #ifdef __cplusplus
00540 }  /* extern "C" */
00541 #endif
00542 
00543 #endif  /* MCTRL_MDITAB_H */