mCtrl
0.9.6
Main Page
Header Files
Data Structures
Globals
mCtrl
treelist.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Martin Mitas
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* This program 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 General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; 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_TREELIST_H
20
#define MCTRL_TREELIST_H
21
22
#include <
mCtrl/_defs.h
>
23
#include <
mCtrl/_common.h
>
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
183
189
BOOL
MCTRL_API
mcTreeList_Initialize
(
void
);
190
194
void
MCTRL_API
mcTreeList_Terminate
(
void
);
195
202
204
#define MC_WC_TREELISTW L"mCtrl.treelist"
205
206
#define MC_WC_TREELISTA "mCtrl.treelist"
207
215
219
#define MC_TLS_HASBUTTONS 0x0001
220
221
#define MC_TLS_HASLINES 0x0002
222
225
#define MC_TLS_LINESATROOT 0x0004
226
227
#define MC_TLS_GRIDLINES 0x0008
228
229
#define MC_TLS_SHOWSELALWAYS 0x0010
230
232
#define MC_TLS_FULLROWSELECT 0x0020
233
235
#define MC_TLS_NONEVENHEIGHT 0x0040
236
237
#define MC_TLS_DOUBLEBUFFER 0x0080
238
239
#define MC_TLS_NOCOLUMNHEADER 0x0100
240
242
#define MC_TLS_HEADERDRAGDROP 0x0200
243
248
#define MC_TLS_SINGLEEXPAND 0x0400
249
252
#define MC_TLS_MULTISELECT 0x0800
253
254
#if 0
/* TODO */
255
#define MC_TLS_NOTOOLTIPS 0x1000
256
#define MC_TLS_CHECKBOXES 0x2000
257
#define MC_TLS_EDITLABELS 0x4000
258
#define MC_TLS_EDITSUBLABELS 0x8000
259
#endif
260
269
271
#define MC_TLCF_FORMAT (1 << 0)
272
273
#define MC_TLCF_WIDTH (1 << 1)
274
276
#define MC_TLCF_TEXT (1 << 2)
277
278
#define MC_TLCF_IMAGE (1 << 3)
279
280
#define MC_TLCF_ORDER (1 << 4)
281
290
292
#define MC_TLFMT_LEFT 0x0
293
294
#define MC_TLFMT_RIGHT 0x1
295
296
#define MC_TLFMT_CENTER 0x2
297
298
#define MC_TLFMT_JUSTIFYMASK 0x3
299
308
314
#define MC_TLI_ROOT ((MC_HTREELISTITEM)(ULONG_PTR) -0x10000)
315
321
#define MC_TLI_FIRST ((MC_HTREELISTITEM)(ULONG_PTR) -0xffff)
322
328
#define MC_TLI_LAST ((MC_HTREELISTITEM)(ULONG_PTR) -0xfffe)
329
338
340
#define MC_TLIF_STATE (1 << 0)
341
342
#define MC_TLIF_TEXT (1 << 1)
343
344
#define MC_TLIF_PARAM (1 << 2)
345
347
#define MC_TLIF_LPARAM (1 << 2)
348
349
#define MC_TLIF_IMAGE (1 << 3)
350
351
#define MC_TLIF_SELECTEDIMAGE (1 << 4)
352
353
#define MC_TLIF_EXPANDEDIMAGE (1 << 5)
354
355
#define MC_TLIF_CHILDREN (1 << 6)
356
364
366
#define MC_TLIS_SELECTED (1 << 1)
367
368
#define MC_TLIS_EXPANDED (1 << 5)
369
373
374
380
383
#define MC_TLSIF_TEXT (1 << 1)
384
393
395
#define MC_TLHT_NOWHERE (1 << 0)
396
397
#define MC_TLHT_ONITEMICON (1 << 1)
398
399
#define MC_TLHT_ONITEMSTATEICON (1 << 2)
400
401
#define MC_TLHT_ONITEMLABEL (1 << 3)
402
403
#define MC_TLHT_ONITEM (MC_TLHT_ONITEMICON | MC_TLHT_ONITEMSTATEICON | MC_TLHT_ONITEMLABEL)
404
405
#define MC_TLHT_ONITEMINDENT (1 << 4)
406
407
#define MC_TLHT_ONITEMBUTTON (1 << 5)
408
409
#define MC_TLHT_ONITEMRIGHT (1 << 6)
410
412
#define MC_TLHT_ONITEMLEFT (1 << 7)
413
414
#define MC_TLHT_ABOVE (1 << 8)
415
416
#define MC_TLHT_BELOW (1 << 9)
417
418
#define MC_TLHT_TORIGHT (1 << 10)
419
420
#define MC_TLHT_TOLEFT (1 << 11)
421
430
432
#define MC_TLE_COLLAPSE 0x1
433
434
#define MC_TLE_EXPAND 0x2
435
436
#define MC_TLE_TOGGLE 0x3
437
439
#define MC_TLE_COLLAPSERESET 0x8000
440
449
451
#define MC_TLGN_ROOT 0x0
452
454
#define MC_TLGN_NEXT 0x1
455
457
#define MC_TLGN_PREVIOUS 0x2
458
460
#define MC_TLGN_PARENT 0x3
461
463
#define MC_TLGN_CHILD 0x4
464
467
#define MC_TLGN_FIRSTVISIBLE 0x5
468
472
#define MC_TLGN_NEXTVISIBLE 0x6
473
479
#define MC_TLGN_PREVIOUSVISIBLE 0x7
480
486
#define MC_TLGN_CARET 0x9
487
491
#define MC_TLGN_LASTVISIBLE 0xa
492
500
505
typedef
struct
MC_TLCOLUMNW_tag {
508
UINT
fMask
;
512
int
fmt
;
514
int
cx
;
516
WCHAR*
pszText
;
518
int
cchTextMax
;
520
int
iImage
;
522
int
iOrder
;
523
}
MC_TLCOLUMNW
;
524
529
typedef
struct
MC_TLCOLUMNA_tag {
532
UINT
fMask
;
536
int
fmt
;
538
int
cx
;
540
char
*
pszText
;
542
int
cchTextMax
;
544
int
iImage
;
546
int
iOrder
;
547
}
MC_TLCOLUMNA
;
548
552
typedef
void
*
MC_HTREELISTITEM
;
553
554
559
typedef
struct
MC_TLITEMW_tag {
562
UINT
fMask
;
564
UINT
state
;
567
UINT
stateMask
;
569
WCHAR*
pszText
;
572
int
cchTextMax
;
574
LPARAM
lParam
;
576
int
iImage
;
578
int
iSelectedImage
;
580
int
iExpandedImage
;
584
int
cChildren
;
585
}
MC_TLITEMW
;
586
591
typedef
struct
MC_TLITEMA_tag {
594
UINT
fMask
;
596
UINT
state
;
599
UINT
stateMask
;
601
char
*
pszText
;
604
int
cchTextMax
;
606
LPARAM
lParam
;
608
int
iImage
;
610
int
iSelectedImage
;
612
int
iExpandedImage
;
616
int
cChildren
;
617
}
MC_TLITEMA
;
618
623
typedef
struct
MC_TLSUBITEMW_tag {
626
UINT
fMask
;
628
int
iSubItem
;
630
WCHAR*
pszText
;
633
int
cchTextMax
;
634
}
MC_TLSUBITEMW
;
635
640
typedef
struct
MC_TLSUBITEMA_tag {
643
UINT
fMask
;
645
int
iSubItem
;
647
char
*
pszText
;
650
int
cchTextMax
;
651
}
MC_TLSUBITEMA
;
652
657
typedef
struct
MC_TLINSERTSTRUCTW_tag {
659
MC_HTREELISTITEM
hParent
;
662
MC_HTREELISTITEM
hInsertAfter
;
664
MC_TLITEMW
item
;
665
}
MC_TLINSERTSTRUCTW
;
666
671
typedef
struct
MC_TLINSERTSTRUCTA_tag {
673
MC_HTREELISTITEM
hParent
;
676
MC_HTREELISTITEM
hInsertAfter
;
678
MC_TLITEMA
item
;
679
}
MC_TLINSERTSTRUCTA
;
680
684
typedef
struct
MC_TLHITTESTINFO_tag {
686
POINT
pt
;
688
UINT
flags
;
690
MC_HTREELISTITEM
hItem
;
693
int
iSubItem
;
694
}
MC_TLHITTESTINFO
;
695
709
typedef
struct
MC_NMTREELIST_tag {
711
NMHDR
hdr
;
713
UINT
action
;
715
MC_HTREELISTITEM
hItemOld
;
717
LPARAM
lParamOld
;
719
MC_HTREELISTITEM
hItemNew
;
721
LPARAM
lParamNew
;
722
}
MC_NMTREELIST
;
723
727
typedef
struct
MC_NMTLCUSTOMDRAW_tag {
729
MC_NMCUSTOMDRAW
nmcd
;
732
int
iLevel
;
735
int
iSubItem
;
737
COLORREF
clrText
;
739
COLORREF
clrTextBk
;
740
}
MC_NMTLCUSTOMDRAW
;
741
746
typedef
struct
MC_NMTLDISPINFOW_tag {
748
NMHDR
hdr
;
750
MC_HTREELISTITEM
hItem
;
752
MC_TLITEMW
item
;
753
}
MC_NMTLDISPINFOW
;
754
759
typedef
struct
MC_NMTLDISPINFOA_tag {
761
NMHDR
hdr
;
763
MC_HTREELISTITEM
hItem
;
765
MC_TLITEMA
item
;
766
}
MC_NMTLDISPINFOA
;
767
772
typedef
struct
MC_NMTLSUBDISPINFOW_tag {
774
NMHDR
hdr
;
776
MC_HTREELISTITEM
hItem
;
778
LPARAM
lItemParam
;
780
MC_TLSUBITEMW
subitem
;
781
}
MC_NMTLSUBDISPINFOW
;
782
787
typedef
struct
MC_NMTLSUBDISPINFOA_tag {
789
NMHDR
hdr
;
791
MC_HTREELISTITEM
hItem
;
793
LPARAM
lItemParam
;
795
MC_TLSUBITEMA
subitem
;
796
}
MC_NMTLSUBDISPINFOA
;
797
805
812
#define MC_TLM_INSERTCOLUMNW (MC_TLM_FIRST + 0)
813
820
#define MC_TLM_INSERTCOLUMNA (MC_TLM_FIRST + 1)
821
828
#define MC_TLM_SETCOLUMNW (MC_TLM_FIRST + 2)
829
836
#define MC_TLM_SETCOLUMNA (MC_TLM_FIRST + 3)
837
844
#define MC_TLM_GETCOLUMNW (MC_TLM_FIRST + 4)
845
852
#define MC_TLM_GETCOLUMNA (MC_TLM_FIRST + 5)
853
860
#define MC_TLM_DELETECOLUMN (MC_TLM_FIRST + 6)
861
869
#define MC_TLM_SETCOLUMNORDERARRAY (MC_TLM_FIRST + 7)
870
879
#define MC_TLM_GETCOLUMNORDERARRAY (MC_TLM_FIRST + 8)
880
887
#define MC_TLM_SETCOLUMNWIDTH (MC_TLM_FIRST + 9)
888
895
#define MC_TLM_GETCOLUMNWIDTH (MC_TLM_FIRST + 10)
896
910
#define MC_TLM_INSERTITEMW (MC_TLM_FIRST + 11)
911
925
#define MC_TLM_INSERTITEMA (MC_TLM_FIRST + 12)
926
934
#define MC_TLM_SETITEMW (MC_TLM_FIRST + 13)
935
943
#define MC_TLM_SETITEMA (MC_TLM_FIRST + 14)
944
959
#define MC_TLM_GETITEMW (MC_TLM_FIRST + 15)
960
975
#define MC_TLM_GETITEMA (MC_TLM_FIRST + 16)
976
988
#define MC_TLM_DELETEITEM (MC_TLM_FIRST + 17)
989
1001
#define MC_TLM_SETITEMHEIGHT (MC_TLM_FIRST + 18)
1002
1009
#define MC_TLM_GETITEMHEIGHT (MC_TLM_FIRST + 19)
1010
1018
#define MC_TLM_SETSUBITEMW (MC_TLM_FIRST + 20)
1019
1027
#define MC_TLM_SETSUBITEMA (MC_TLM_FIRST + 21)
1028
1044
#define MC_TLM_GETSUBITEMW (MC_TLM_FIRST + 22)
1045
1061
#define MC_TLM_GETSUBITEMA (MC_TLM_FIRST + 23)
1062
1069
#define MC_TLM_SETINDENT (MC_TLM_FIRST + 24)
1070
1077
#define MC_TLM_GETINDENT (MC_TLM_FIRST + 25)
1078
1087
#define MC_TLM_HITTEST (MC_TLM_FIRST + 26)
1088
1095
#define MC_TLM_EXPAND (MC_TLM_FIRST + 27)
1096
1105
#define MC_TLM_GETNEXTITEM (MC_TLM_FIRST + 28)
1106
1113
#define MC_TLM_GETVISIBLECOUNT (MC_TLM_FIRST + 29)
1114
1123
#define MC_TLM_ENSUREVISIBLE (MC_TLM_FIRST + 30)
1124
1137
#define MC_TLM_SETIMAGELIST (MC_TLM_FIRST + 31)
1138
1146
#define MC_TLM_GETIMAGELIST (MC_TLM_FIRST + 32)
1147
1155
#define MC_TLM_GETSELECTEDCOUNT (MC_TLM_FIRST + 33)
1156
1164
1176
#define MC_TLN_DELETEITEM (MC_TLN_FIRST + 0)
1177
1197
#define MC_TLN_SELCHANGING (MC_TLN_FIRST + 1)
1198
1217
#define MC_TLN_SELCHANGED (MC_TLN_FIRST + 2)
1218
1233
#define MC_TLN_EXPANDING (MC_TLN_FIRST + 3)
1234
1248
#define MC_TLN_EXPANDED (MC_TLN_FIRST + 4)
1249
1250
#if 0
1251
#define MC_TLN_SETDISPINFOW (MC_TLN_FIRST + 5)
1252
#define MC_TLN_SETDISPINFOA (MC_TLN_FIRST + 6)
1253
#endif
1254
1268
#define MC_TLN_GETDISPINFOW (MC_TLN_FIRST + 7)
1269
1283
#define MC_TLN_GETDISPINFOA (MC_TLN_FIRST + 8)
1284
1285
#if 0
1286
#define MC_TLN_SETSUBDISPINFOW (MC_TLN_FIRST + 9)
1287
#define MC_TLN_SETSUBDISPINFOA (MC_TLN_FIRST + 10)
1288
#endif
1289
1290
#define MC_TLN_GETSUBDISPINFOW (MC_TLN_FIRST + 11)
1291
#define MC_TLN_GETSUBDISPINFOA (MC_TLN_FIRST + 12)
1292
1300
1302
#define MC_WC_TREELIST MCTRL_NAME_AW(MC_WC_TREELIST)
1303
1304
#define MC_TLCOLUMN MCTRL_NAME_AW(MC_TLCOLUMN)
1305
1306
#define MC_TLITEM MCTRL_NAME_AW(MC_TLITEM)
1307
1308
#define MC_TLSUBITEM MCTRL_NAME_AW(MC_TLSUBITEM)
1309
1310
#define MC_TLINSERTSTRUCT MCTRL_NAME_AW(MC_TLINSERTSTRUCT)
1311
1312
#define MC_NMTLDISPINFO MCTRL_NAME_AW(MC_NMTLDISPINFO)
1313
1314
#define MC_NMTLSUBDISPINFO MCTRL_NAME_AW(MC_NMTLSUBDISPINFO)
1315
1316
#define MC_TLM_SETCOLUMN MCTRL_NAME_AW(MC_TLM_SETCOLUMN)
1317
1318
#define MC_TLM_INSERTCOLUMN MCTRL_NAME_AW(MC_TLM_INSERTCOLUMN)
1319
1320
#define MC_TLM_SETCOLUMN MCTRL_NAME_AW(MC_TLM_SETCOLUMN)
1321
1322
#define MC_TLM_GETCOLUMN MCTRL_NAME_AW(MC_TLM_GETCOLUMN)
1323
1324
#define MC_TLM_INSERTITEM MCTRL_NAME_AW(MC_TLM_INSERTITEM)
1325
1326
#define MC_TLM_SETITEM MCTRL_NAME_AW(MC_TLM_SETITEM)
1327
1328
#define MC_TLM_GETITEM MCTRL_NAME_AW(MC_TLM_GETITEM)
1329
1330
#define MC_TLM_SETSUBITEM MCTRL_NAME_AW(MC_TLM_SETSUBITEM)
1331
1332
#define MC_TLM_GETSUBITEM MCTRL_NAME_AW(MC_TLM_GETSUBITEM)
1333
1334
#define MC_TLN_SETDISPINFO MCTRL_NAME_AW(MC_TLN_SETDISPINFO)
1335
1336
#define MC_TLN_GETDISPINFO MCTRL_NAME_AW(MC_TLN_GETDISPINFO)
1337
1338
#define MC_TLN_SETSUBDISPINFO MCTRL_NAME_AW(MC_TLN_SETSUBDISPINFO)
1339
1340
#define MC_TLN_GETSUBDISPINFO MCTRL_NAME_AW(MC_TLN_GETSUBDISPINFO)
1341
1345
#ifdef __cplusplus
1346
}
/* extern "C" */
1347
#endif
1348
1349
#endif
/* MCTRL_TREELIST_H */
Generated on Fri Nov 8 2013 21:35:12 for mCtrl by
1.8.4