mCtrl 0.8.0
|
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 #ifdef UNICODE 00107 00111 #define MC_WC_MDITAB MC_WC_MDITABW 00112 #else 00113 #define MC_WC_MDITAB MC_WC_MDITABA 00114 #endif 00115 00122 00124 #define MC_MTS_CBONTOOLBAR (0x00000000L) 00125 00126 #define MC_MTS_CBONEACHTAB (0x00000001L) 00127 00128 #define MC_MTS_CBONACTIVETAB (0x00000002L) 00129 00130 #define MC_MTS_CBNONE (0x00000003L) 00131 00132 #define MC_MTS_CBMASK (0x00000003L) 00133 00135 #define MC_MTS_TLBALWAYS (0x00000000L) 00136 00137 #define MC_MTS_TLBONSCROLL (0x00000004L) 00138 00139 #define MC_MTS_TLBNEVER (0x00000008L) 00140 00141 #define MC_MTS_TLBMASK (0x0000000CL) 00142 00144 #define MC_MTS_SCROLLALWAYS (0x00000010L) 00145 00147 #define MC_MTS_CLOSEONMCLICK (0x00000020L) 00148 00150 #define MC_MTS_FOCUSONBUTTONDOWN (0x00000040L) 00151 00152 #define MC_MTS_FOCUSNEVER (0x00000080L) 00153 00154 #define MC_MTS_FOCUSMASK (0x000000C0L) 00155 00167 #define MC_MTIF_TEXT (1 << 0) 00168 00169 #define MC_MTIF_IMAGE (1 << 1) 00170 00171 #define MC_MTIF_PARAM (1 << 2) 00172 00178 typedef struct MC_MTITEMW_tag { 00180 DWORD dwMask; 00182 LPWSTR pszText; 00184 int cchTextMax; 00186 int iImage; 00188 LPARAM lParam; 00189 } MC_MTITEMW; 00190 00195 typedef struct MC_MTITEMA_tag { 00197 DWORD dwMask; 00199 LPSTR pszText; 00201 int cchTextMax; 00203 int iImage; 00205 LPARAM lParam; 00206 } MC_MTITEMA; 00207 00208 00209 #ifdef UNICODE 00210 00214 #define MC_MTITEM MC_MTITEMW 00215 #else 00216 #define MC_MTITEM MC_MTITEMA 00217 #endif 00218 00219 00229 typedef struct MC_MTITEMWIDTH_tag { 00231 DWORD dwDefWidth; 00233 DWORD dwMinWidth; 00234 } MC_MTITEMWIDTH; 00235 00236 00244 #define MC_MTHT_NOWHERE (1 << 0) 00245 00246 #define MC_MTHT_ONITEMICON (1 << 1) 00247 00248 #define MC_MTHT_ONITEMLABEL (1 << 2) 00249 00250 #define MC_MTHT_ONITEMCLOSEBUTTON (1 << 3) 00251 00252 #define MC_MTHT_ONITEM \ 00253 (MC_MTHT_ONITEMICON | MC_MTHT_ONITEMLABEL | MC_MTHT_ONITEMCLOSEBUTTON) 00254 00259 typedef struct MC_MTHITTESTINFO_tag { 00261 POINT pt; 00263 UINT flags; 00264 } MC_MTHITTESTINFO; 00265 00266 00271 00278 #define MC_MTM_GETITEMCOUNT (WM_USER + 100) 00279 00288 #define MC_MTM_GETIMAGELIST (WM_USER + 101) 00289 00300 #define MC_MTM_SETIMAGELIST (WM_USER + 102) 00301 00314 #define MC_MTM_DELETEALLITEMS (WM_USER + 103) 00315 00323 #define MC_MTM_INSERTITEMW (WM_USER + 105) 00324 00332 #define MC_MTM_INSERTITEMA (WM_USER + 106) 00333 00334 #ifdef UNICODE 00335 00339 #define MC_MTM_INSERTITEM MC_MTM_INSERTITEMW 00340 #else 00341 #define MC_MTM_INSERTITEM MC_MTM_INSERTITEMA 00342 #endif 00343 00350 #define MC_MTM_SETITEMW (WM_USER + 107) 00351 00358 #define MC_MTM_SETITEMA (WM_USER + 108) 00359 00360 #ifdef UNICODE 00361 00365 #define MC_MTM_SETITEM MC_MTM_SETITEMW 00366 #else 00367 #define MC_MTM_SETITEM MC_MTM_SETITEMA 00368 #endif 00369 00370 00378 #define MC_MTM_GETITEMW (WM_USER + 109) 00379 00387 #define MC_MTM_GETITEMA (WM_USER + 110) 00388 00389 #ifdef UNICODE 00390 00394 #define MC_MTM_GETITEM MC_MTM_GETITEMW 00395 #else 00396 #define MC_MTM_GETITEM MC_MTM_GETITEMA 00397 #endif 00398 00407 #define MC_MTM_DELETEITEM (WM_USER + 111) 00408 00416 #define MC_MTM_HITTEST (WM_USER + 112) 00417 00424 #define MC_MTM_SETCURSEL (WM_USER + 113) 00425 00432 #define MC_MTM_GETCURSEL (WM_USER + 114) 00433 00443 #define MC_MTM_CLOSEITEM (WM_USER + 115) 00444 00458 #define MC_MTM_SETITEMWIDTH (WM_USER + 116) 00459 00468 #define MC_MTM_GETITEMWIDTH (WM_USER + 117) 00469 00475 typedef struct MC_NMMTSELCHANGE_tag { 00477 NMHDR hdr; 00479 int iItemOld; 00481 LPARAM lParamOld; 00483 int iItemNew; 00485 LPARAM lParamNew; 00486 } MC_NMMTSELCHANGE; 00487 00491 typedef struct MC_NMMTDELETEITEM_tag { 00493 NMHDR hdr; 00495 int iItem; 00497 LPARAM lParam; 00498 } MC_NMMTDELETEITEM; 00499 00500 00504 typedef struct MC_NMMTCLOSEITEM_tag { 00506 NMHDR hdr; 00508 int iItem; 00510 LPARAM lParam; 00511 } MC_NMMTCLOSEITEM; 00512 00513 00518 00526 #define MC_MTN_SELCHANGE (0xfffffddb) 00527 00535 #define MC_MTN_DELETEITEM (0xfffffdd0) 00536 00548 #define MC_MTN_DELETEALLITEMS (0xfffffdcf) 00549 00559 #define MC_MTN_CLOSEITEM (0xfffffdce) 00560 00564 #ifdef __cplusplus 00565 } /* extern "C" */ 00566 #endif 00567 00568 #endif /* MCTRL_MDITAB_H */