Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[r8770]: ooDialog / branches / 4.2.1 / doc / oodialog / en-US / treeview.xml Maximize Restore History

Download this file

treeview.xml    4122 lines (3809 with data), 148.2 kB

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "oodialog.ent">
%BOOK_ENTITIES;
]>
<!--#########################################################################
#
# Description: Open Object Rexx: ooDialog Reference XML file.
#
# Copyright (c) 2005-2013 Rexx Language Association. All rights reserved.
# Portions Copyright (c) 2004, IBM Corporation. All rights reserved.
#
# This program and the accompanying materials are made available under
# the terms of the Common Public License v1.0 which accompanies this
# distribution. A copy is also available at the following address:
# http://www.oorexx.org/license.html
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the distribution.
#
# Neither the name of Rexx Language Association nor the names
# of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#########################################################################
-->
<chapter id="clsTreeView" xreflabel="TreeView"><title>Tree View Controls</title>
<indexterm><primary>TreeView class</primary></indexterm>
<para>
The tree-view control is a dialog control that displays a hierarchical list of items, such as the headings in a
document, the entries in an index, or the files and directories on a disk. Each item consists of a label and an
optional image bitmap, and can have a list of subitems associated with it. By clicking on an item, the user can expand
and collapse the associated list of subitems.
</para>
<para>
In addition to the methods of the class itself, the following methods from other classes in the ooDialog framework are
needed, or are useful, when working with tree-view controls:
<variablelist>
<varlistentry><term><emphasis role="bold">Instantiation:</emphasis></term>
<listitem>
<para>
Use the <xref linkend="mthNewTreeView"/> method of the <xref linkend="chpDialogObject"/> object to retrieve a
tree-view object.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Dynamic Definition:</emphasis></term>
<listitem>
<para>
To dynamically create a tree-view in the dialog template of a <xref linkend="clsUserDialog"/> use
the <xref linkend="mthCreateTreeView"/> method.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Event Notification</emphasis></term>
<listitem>
<para>
To connect the <xref linkend="ovvEvents"/> notifications sent by the underlying tree-view control to a
method in the Rexx dialog object use the <xref linkend="mthConnectTreeViewEvent"/>
method.
</para>
</listitem></varlistentry>
</variablelist>
</para>
<section id="sctMethodsTreeView"><title>Method Table</title>
<para>
The following table provides links to the documentation for the primary methods and attributes used in working
with tree-view objects, including the pertinent methods from other classes:
</para>
<table id="tblTreeViewMethods" frame="all">
<title>TreeView Instance Methods</title>
<tgroup cols="2">
<colspec colwidth="1*" />
<colspec colwidth="4*" />
<thead>
<row>
<entry>Method</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center"><emphasis role="bold">Useful</emphasis></entry>
<entry align="center"><emphasis role="bold">External Methods</emphasis></entry>
</row>
<row>
<entry><xref linkend="tmthNewTreeView"/></entry>
<entry>Returns a <computeroutput>TreeView</computeroutput> object for the control with the specified ID.</entry>
</row>
<row>
<entry><xref linkend="tmthCreateTreeView"/></entry>
<entry>Creates a tree-view control in the dialog template of a <xref linkend="clsUserDialog"/>.</entry>
</row>
<row>
<entry><xref linkend="tmthConnectTreeViewEvent"/></entry>
<entry>Connects tree-view event notifications to a method in the Rexx dialog object.</entry>
</row>
<row>
<entry align="center"><emphasis role="bold">Instance Methods</emphasis></entry>
<entry align="center"><emphasis role="bold">Instance Methods</emphasis></entry>
</row>
<row>
<entry><xref linkend="mthAddClsTreeView"/></entry>
<entry>Adds a new item to the tree-view.</entry>
</row>
<row>
<entry><xref linkend="child"/></entry>
<entry>Child</entry>
</row>
<row>
<entry><xref linkend="collapse"/></entry>
<entry>Collapse</entry>
</row>
<row>
<entry><xref linkend="collapseandreset"/></entry>
<entry>CollapseAndReset</entry>
</row>
<row>
<entry><xref linkend="deletetrc"/></entry>
<entry>delete</entry>
</row>
<row>
<entry><xref linkend="deletealltrc"/></entry>
<entry>deleteAll</entry>
</row>
<row>
<entry><xref linkend="drophighlight"/></entry>
<entry>DropHighlight</entry>
</row>
<row>
<entry><xref linkend="drophighlightedtrc"/></entry>
<entry>dropHighlighted</entry>
</row>
<row>
<entry><xref linkend="edittrc"/></entry>
<entry>Edit</entry>
</row>
<row>
<entry><xref linkend="mthEndEditClsTreeView"/></entry>
<entry>endEdit</entry>
</row>
<row>
<entry><xref linkend="mthEnsureVisibleClsTreeView"/></entry>
<entry>ensureVisible</entry>
</row>
<row>
<entry><xref linkend="expand"/></entry>
<entry>Expand</entry>
</row>
<row>
<entry><xref linkend="mthFind"/></entry>
<entry>Finds the first tree-view item whose label matches the text specified. The search is case insensitive.</entry>
</row>
<row>
<entry><xref linkend="firstvisibletrc"/></entry>
<entry>firstVisible</entry>
</row>
<row>
<entry><xref linkend="mthGetImageListClsTreeView"/></entry>
<entry>Retrieves the tree-view's image list for the type specified.</entry>
</row>
<row>
<entry><xref linkend="mthGetItemDataClsTreeView"/></entry>
<entry>Gets the item data associated with the specified tree-view item.</entry>
</row>
<row>
<entry><xref linkend="mthGetItemHeight"/></entry>
<entry>Gets the height the tree-view control used for each of items items.</entry>
</row>
<row>
<entry><xref linkend="mthGetItemRectClsTreeView"/></entry>
<entry>Retrieves the bounding rectangle for a tree-view item and indicates whether the item is visible.</entry>
</row>
<row>
<entry><xref linkend="mthGetToolTipsClsTreeView"/></entry>
<entry>Retrieves the child <link linkend="clsToolTip">ToolTip</link> control used by this tree-view.</entry>
</row>
<row>
<entry><xref linkend="mthItemTextClsTreeView"/></entry>
<entry>Gets the text, the label, of the specified tree-view item.</entry>
</row>
<row>
<entry><xref linkend="mthHitTestClsTreeView"/></entry>
<entry>hitTest</entry>
</row>
<row>
<entry><xref linkend="mthHitTestInfoClsTreeView"/></entry>
<entry>Determines the location of a point relative to the tree-view control.</entry>
</row>
<row>
<entry><xref linkend="indent"/></entry>
<entry>Indent</entry>
</row>
<row>
<entry><xref linkend="indentnew"/></entry>
<entry>Indent=</entry>
</row>
<row>
<entry><xref linkend="mthInsertClsTreeView"/></entry>
<entry>Inserts a new item into the tree-view control.</entry>
</row>
<row>
<entry><xref linkend="isancestor"/></entry>
<entry>IsAncestor</entry>
</row>
<row>
<entry><xref linkend="mthItemInfoClsTreeView"/></entry>
<entry>The <emphasis role="italic">itemInfo</emphasis> method returnes the attributes of the specified item as a stem.</entry>
</row>
<row>
<entry><xref linkend="itemstrc"/></entry>
<entry>items</entry>
</row>
<row>
<entry><xref linkend="makefirstvisibletrc"/></entry>
<entry>MakeFirstVisible</entry>
</row>
<row>
<entry><xref linkend="mthModifyClsTreeView"/></entry>
<entry>Modifies some or all of an item's attributes.</entry>
</row>
<row>
<entry><xref linkend="moveitem"/></entry>
<entry>moveItem</entry>
</row>
<row>
<entry><xref linkend="nexttrc"/></entry>
<entry>next</entry>
</row>
<row>
<entry><xref linkend="nextvisible"/></entry>
<entry>NextVisible</entry>
</row>
<row>
<entry><xref linkend="parent"/></entry>
<entry>Parent</entry>
</row>
<row>
<entry><xref linkend="previoustrc"/></entry>
<entry>previous</entry>
</row>
<row>
<entry><xref linkend="previousvisible"/></entry>
<entry>PreviousVisible</entry>
</row>
<row>
<entry><xref linkend="mthRemoveItemDataClsTreeView"/></entry>
<entry>Removes and returns the item data associated with the specified tree-view item.</entry>
</row>
<row>
<entry><xref linkend="mthRoot"/></entry>
<entry>Root</entry>
</row>
<row>
<entry><xref linkend="selecttrc"/></entry>
<entry>select</entry>
</row>
<row>
<entry><xref linkend="selectedtrc"/></entry>
<entry>selected</entry>
</row>
<row>
<entry><xref linkend="mthSetImageListClsTreeView"/></entry>
<entry>Assigns, or removes, an image list for the tree-view control.</entry>
</row>
<row>
<entry><xref linkend="mthSetItemDataClsTreeView"/></entry>
<entry>Sets the item data associated with the specified tree-view item.</entry>
</row>
<row>
<entry><xref linkend="mthSetItemHeight"/></entry>
<entry>Sets the height of the tree-view items.</entry>
</row>
<row>
<entry><xref linkend="mthSetToolTipsClsTreeView"/></entry>
<entry>Sets the child <link linkend="clsToolTip">ToolTip</link> control used by this tree-view.</entry>
</row>
<row>
<entry><xref linkend="sortchildren"/></entry>
<entry>SortChildren</entry>
</row>
<row>
<entry><xref linkend="mthSortChildrenCB"/></entry>
<entry>Has the tree-view sort the children of the specified item by invoking a custom comparsion method in the Rexx dialog.</entry>
</row>
<row>
<entry><xref linkend="toggle"/></entry>
<entry>Toggle</entry>
</row>
<row>
<entry><xref linkend="visibleitems"/></entry>
<entry>VisibleItems</entry>
</row>
</tbody></tgroup>
</table>
</section>
<section id="tmthNewTreeView" xreflabel="newTreeView"><title>newTreeView (dialog object method)</title>
<para>
Tree-view objects can not be instantiated by the programmer from Rexx code. Rather a tree-view object is obtained by
using the <xref linkend="mthNewTreeView"/> method of the <xref linkend="chpDialogObject"/> object. The syntax is:
<programlisting>
<![CDATA[
>>--newTreeView(--id--)--------------------------><
]]>
</programlisting>
</para>
</section> <!-- End newTreeView() [PlainBaseDialog method] -->
<section id="tmthCreateTreeView" xreflabel="createTreeView"><title>createTreeView (UserDialog method)</title>
<para>
A tree-view object can be created in the dialog template for a <xref linkend="clsUserDialog"/>
dialog through the <xref linkend="mthCreateTreeView"/> method. The basic syntax is:
<programlisting>
<![CDATA[
>>--createTreeView(-id-,--x-,--y-,--cx-,--cy-+---------+--+------------+--)----><
+-,-style-+ +-,-attrName-+
]]>
</programlisting>
</para>
</section> <!-- End UserDialog::createTreeView() [UserDialog method] -->
<section id="tmthConnectTreeViewEvent" xreflabel="connectTreeViewEvent"><title>connectTreeViewEvent (dialog object method)</title>
<para>
To connect event notifications from a tree-view object use the <xref linkend="mthConnectTreeViewEvent"/> method of the
<xref linkend="chpDialogObject"/> object. The basic syntax is:
<programlisting> <![CDATA[
>>--connectTreeViewEvent(--id--,--event--+---------------+--)------------------><
+-,--methodName-+
]]>
</programlisting>
</para>
</section> <!-- End connectTreeViewEvent() [EventNotification method] -->
<section id="mthAddClsTreeView" xreflabel="add"><title>add</title>
<indexterm><primary>add</primary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>add</secondary></indexterm>
<programlisting>
<![CDATA[
+---+
V |
>>--add(--+---+-+-------+-+-------+-+----------+-+-------+-+---------+-+-------+--)---><
+-,-+ +-,-txt-+ +-,-img-+ +-,-selImg-+ +-,-opt-+ +-,-child-+ +-,-usr-+
]]>
</programlisting>
<para>
Adds an item with all its attributes to a tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>, [optional]</term>
<listitem>
<para>
The number of commas specifies at which parent the item is to be inserted. If you omit this argument, the item is
inserted as a root item. Each additional comma inserts the item one level deeper than the item inserted
<emphasis role="italic">previously</emphasis>.
</para>
</listitem></varlistentry>
<varlistentry><term>txt [optional]</term>
<listitem>
<para>
The text for the label of the item. If this arugment is omitted then the empty string is used as the text.
</para>
</listitem></varlistentry>
<varlistentry><term>img [optional]</term>
<listitem>
<para>
Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list for the icon
image to use when the item is in the nonselected state.
</para>
</listitem></varlistentry>
<varlistentry><term>selImg [optional]</term>
<listitem>
<para>
Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list for the icon
image to use when the item is in the selected state.
</para>
</listitem></varlistentry>
<varlistentry><term>opt [optional]</term>
<listitem>
<para>
A list of 0 or more of the following keywords separated by spaces, case is not significant. If this argument is
omitted the item state will be normal, not expanded:
</para>
<para>
<simplelist type='vert' columns='3'>
<member>BOLD </member>
<member>EXPANDED</member>
</simplelist>
<variablelist>
<varlistentry><term>BOLD</term>
<listitem>
<para>
The item is shown bolded.
</para>
</listitem></varlistentry>
<varlistentry><term>EXPANDED</term>
<listitem>
<para>
The item's list of child items is currently expanded, that is, the child items are visible. Only parent items can
have this state.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term>children [optional]</term>
<listitem>
<para>
Used to signal the underlying tree-view control that the item has children, even if no children are inserted. Specify
1 to signal that the item does have children. This is really only useful if the tree-view has the <xref
linkend="styTreeViewBUTTONS"/> style, see the remarks section. When this argument is omitted or less than 1, it is
in effect ignored.
</para>
</listitem></varlistentry>
<varlistentry><term>usr [optional]</term>
<listitem>
<para>
Associates the specified value with the tree-view item being added. This value is commonly refered to as the
<emphasis role="italic">item data</emphasis> for the item. This can be any Rexx object that the programmer wants to
use. The <link linkend="mthGetItemDataClsTreeView">getItemData</link> method can be used to retrieve this value. The
<link linkend="mthSetItemDataClsTreeView">setItemData</link> method, and several other methods, can also be used to
set the item data for a tree-view item.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the handle of the newly added item on success, or zero on error.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
When a tree-view controls has the BUTTONS style, it displays plus and minus buttons next to <emphasis
role="italic">parent</emphasis> items. It does not display the buttons for any item that has no children. However, it is
sometimes useful to dynamically insert child items when the button is clicked. Specifying 1 for the <emphasis
role="italic">children</emphasis> argument forces the tree-view control to use a plus button for the item, even if the
item has no children.
</para>
<para>
Associating a item data value with some or all of a tree-view items can be useful in a number of ways. The <emphasis
role="italic">itemData</emphasis> argument allows the programmer to assoicate the value at the time the item in added to
the tree-view. The <xref linkend="mthSetItemDataClsTreeView"/> method can be used to assign a data value at any time. The
<link linkend="mthModifyClsTreeView">modify</link> method can be used to change an item's attributes, including the user
data of the item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
To get the following tree view:
</para>
<itemizedlist>
<listitem><para>Peter</para>
<itemizedlist>
<listitem><para>Mike</para>
<itemizedlist>
<listitem><para>George</para></listitem>
<listitem><para>Monique</para>
<itemizedlist>
<listitem><para>John</para></listitem>
</itemizedlist>
</listitem>
<listitem><para>Chris</para></listitem>
</itemizedlist>
</listitem>
<listitem><para>Maud</para></listitem>
<listitem><para>Ringo</para></listitem>
</itemizedlist>
</listitem>
<listitem><para>Paul</para>
<itemizedlist>
<listitem><para>Dave</para></listitem>
<listitem><para>Sam</para></listitem>
<listitem><para>Jeff</para></listitem>
</itemizedlist>
</listitem>
<listitem><para>Mary</para>
<itemizedlist>
<listitem><para>Helen</para></listitem>
<listitem><para>Michelle</para></listitem>
<listitem><para>Diana</para></listitem>
</itemizedlist>
</listitem>
</itemizedlist>
<para>
The program code should look similar to this:
</para>
<programlisting>
<![CDATA[
::method initDialog
treeView = self~newTreeView("IDC_TV_INLAWS")
treeView~add("Peter", , ,"BOLD EXPANDED")
treeView~add(,"Mike", , ,"EXPANDED")
treeView~add(, ,"George")
treeView~add(, ,"Monique")
treeView~add(, , ,"John")
treeView~add(, ,"Chris")
treeView~add(,"Maud")
treeView~add(,"Ringo")
treeView~add("Paul", , ,"BOLD EXPANDED")
treeView~add(,"Dave")
treeView~add(,"Sam")
treeView~add(,"Jeff")
treeView~add("Mary", , ,"BOLD EXPANDED")
treeView~add(,"Helen")
treeView~add(,"Michelle")
treeView~add(,"Diana")
]]>
</programlisting>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::add() -->
<section id="child" xreflabel="child"><title>Child</title>
<indexterm><primary>Child</primary></indexterm>
<programlisting>
<![CDATA[
>>--child(--hItem--)-----------------------------><
]]>
</programlisting>
<para>The Child method retrieves the first child item
of <emphasis role="italic">hItem</emphasis>.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item of which the first child is to be
retrieved.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the first child item, or -1 if you omitted
<emphasis role="italic">hItem</emphasis>, or 0 in all other cases.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example displays the name of parent of the selected item:
<programlisting>
<![CDATA[
::method Child
curTree = self~newTreeView("IDC_TREE")
itemInfo. = curTree~itemInfo(curTree~Child(curTree~selected))
say ItemInfo.!Text
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="collapse" xreflabel="collapse"><title>Collapse</title>
<indexterm><primary>Collapse</primary></indexterm>
<programlisting>
<![CDATA[
>>--collapse(--hItem--)--------------------------><
]]>
</programlisting>
<para>The Collapse method collapses the list of child
items associated with the specified parent item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the parent item to collapse.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The list of child items has collapsed.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> is not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example collapses the selected item:
<programlisting>
<![CDATA[
::method CollapseSelected
curTree = self~newTreeView("IDC_TREE")
curTree~Collapse(curTree~selected)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="collapseandreset" xreflabel="collapseAndReset"><title>CollapseAndReset</title>
<indexterm><primary>CollapseAndReset</primary></indexterm>
<programlisting>
<![CDATA[
>>--collapseAndReset(--hItem--)------------------><
]]>
</programlisting>
<para>The CollapseAndReset method collapses the list
of child items associated with the specified parent item and removes the child
items.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the parent item to collapse.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The list of child items has collapsed and the child items have been
removed.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> is not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example collapses the selected item and removes
all its child items:
<programlisting>
<![CDATA[
::method CollapseSelectedAndReset
curTree = self~newTreeView("IDC_TREE")
curTree~CollapseAndReset(curTree~selected)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="deletetrc" xreflabel="delete"><title>delete</title>
<indexterm><primary>delete</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--delete(--hItem--)----------------------------><
]]>
</programlisting>
<para>The delete method removes an item from a tree-view
control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item to be deleted.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The item was deleted.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>An error occurred.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> is 0 or is not a
valid value.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example deletes the selected item and all its children,
if any:
<programlisting>
<![CDATA[
::method IDC_PB_DELETE
curTree = self~newTreeView("IDC_TREE")
curTree~delete(curTree~selected)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="deletealltrc" xreflabel="deleteAll"><title>deleteAll</title>
<indexterm><primary>deleteAll</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--deleteAll------------------------------------><
]]>
</programlisting>
<para>The deleteAll method removes all items from a tree
view control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The items were removed.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="drophighlight" xreflabel="dropHighlight"><title>DropHighlight</title>
<indexterm><primary>DropHighlight</primary></indexterm>
<programlisting>
<![CDATA[
>>--dropHighlight(--hItem--)---------------------><
]]>
</programlisting>
<para>The DropHighlight method redraws <emphasis role="italic">hItem</emphasis>
in the style used to indicate the target of a drag-and-drop operation.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle of the item to be redrawn.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The item was redrawn.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis>
was not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="drophighlightedtrc" xreflabel="dropHighlighted"><title>dropHighlighted</title>
<indexterm><primary>dropHighlighted</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--dropHighlighted------------------------------><
]]>
</programlisting>
<para>The dropHighlighted method retrieves the item that
is the target of a drag-and-drop operation.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the item, or 0 in all other cases.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="edittrc" xreflabel="edit"><title>Edit</title>
<indexterm><primary>Edit</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--edit(--hItem--)------------------------------><
]]>
</programlisting>
<para>The Edit method starts editing the text of the
specified item by replacing the text with a single-line edit control containing
this text. It implicitly selects and focuses the specified item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item to be edited.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the edit control used to edit the item text, or -1
if <emphasis role="italic">hItem</emphasis> is not specified or is 0, or 0
in all other cases.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthEndEditClsTreeView" xreflabel="endEdit"><title>endEdit</title>
<indexterm><primary>endEdit</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--endEdit(--+--------+--)----------------------><
+-cancel-+
]]>
</programlisting>
<para>The endEdit method ends the editing of the item
label of the tree view.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>cancel</term>
<listitem><para>Indicates whether editing is canceled without being saved to the label.
If you specify &quot;1&quot; or &quot;YES&quot;, editing is canceled. Otherwise,
the changes are saved to the label, which is the default.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>Editing has ended successfully.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthEnsureVisibleClsTreeView" xreflabel="ensureVisible"><title>ensureVisible</title>
<indexterm><primary>ensureVisible</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--ensureVisible(--hItem--)---------------------><
]]>
</programlisting>
<para>The ensureVisible method ensures that a tree-view
item is visible, expanding the parent item or scrolling the tree-view control,
if necessary.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item to be visible.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The items in the tree-view control were scrolled to ensure that the
specified item is visible.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> is not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="expand" xreflabel="expand"><title>Expand</title>
<indexterm><primary>Expand</primary></indexterm>
<programlisting>
<![CDATA[
>>--expand(--hItem--)----------------------------><
]]>
</programlisting>
<para>The Expand method expands the list of child items
associated with the specified parent item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the parent item to be expanded.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The parent item was expanded.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> is not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example expands the selected item:
<programlisting>
<![CDATA[
::method ExpandSelected
curTree = self~newTreeView("IDC_TREE")
curTree~Expand(curTree~selected)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthFind" xreflabel="find"><title>find</title>
<indexterm><primary>find</primary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>find</secondary></indexterm>
<programlisting>
<![CDATA[
>>--find(--text--)-------------------------------><
]]>
</programlisting>
<para>
Finds the first tree-view item whose label matches the text specified. The search is case insensitive.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
<variablelist>
<varlistentry><term>text [required]</term>
<listitem>
<para>
Specifies the label, the text, of item to search for. The search is case insensitive, but is otherwise exact.
I.e., <emphasis role="italic">Coffe Product</emphasis> will not match <emphasis role="italic">Coffe
Products</emphasis>, but will match <emphasis role="italic">coffe product</emphasis> or <emphasis
role="italic">coffe PRODUCT</emphasis>
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the <link linkend="defHandle">handle</link> of the item found, or 0 if no item matches <emphasis
role="italic">text</emphasis>.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The first item to match the search text is returned. The search always starts at the root of the tree.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example searches for the first tree-view item whose label is <emphasis role="italic">Computers</emphasis>, and
if found, selects that item.
<programlisting>
<![CDATA[
tv = self~newTreeView(IDC_TV_PRODUCTS)
hItem = tv~find('Computers')
if hItem \== 0 then tv~select(hItem)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::find() -->
<section id="firstvisibletrc" xreflabel="firstVisible"><title>firstVisible</title>
<indexterm><primary>firstVisible</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--firstVisible---------------------------------><
]]>
</programlisting>
<para>The firstVisible method retrieves the first visible
item in the client window of a tree-view control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the first visible item, or 0 in all other cases.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example displays the name of the first visible item:
<programlisting>
<![CDATA[
::method FirstVisibleName
curTree = self~newTreeView("IDC_TREE")
itemInfo. = curTree~itemInfo(curTree~firstVisible)
say ItemInfo.!Text
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthGetImageListClsTreeView" xreflabel="getImageList"><title>getImageList</title>
<indexterm><primary>getImageList</primary><secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getImageList(--+--------+--)-----------------><
+--type--+
]]>
</programlisting>
<para>
Retrieves the current image list for the type specified. The default is to retrieve the tree-views
normal image list. See the <xref linkend="mthSetImageListClsTreeView"/> method for
infomation on assigning an image list to a tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>The single optional argument is:
<variablelist>
<varlistentry><term>type [optional]</term>
<listitem>
<para>
Specifies which image list to retrieve. You can use <xref linkend="mthToIDClsImage"/> method of the <xref
linkend="clsImage"/> class to get the correct numeric value for one of the following symbols:
<simplelist type='horiz' columns='2'>
<member>TVSIL_NORMAL</member>
<member>TVSIL_STATE </member>
</simplelist>
or use the correct numeric value itself.
</para>
<para>
The default is TVSIL_NORMAL.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
This method returns the current image <xref linkend="clsImageList"/>, if there is one.
<computeroutput>.nil</computeroutput> is returned if there is no current image list of the type
specified.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example releases the tree-view's image lists, if they exist, when the dialog ends.
<programlisting>
<![CDATA[
::method ok
self~doImageLists return self~ok:super
::method cancel
self~doImageLists
return self~cancel:super
::method odImageLists
expose treeView
types = .array~of(TVSIL_NORMAL, TVSIL_STATE)
do type over types
il = treeView~getImageList(type)
if il \== .nil then il~release
end
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::getImageList() -->
<section id="mthGetItemDataClsTreeView" xreflabel="getItemData"><title>getItemData</title>
<indexterm><primary>getItemData</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>getItemData</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getItemData(--hItem--)-----------------------><
]]>
</programlisting>
<para>
Gets the item data associated with the specified tree-view item.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
</para>
<variablelist>
<varlistentry><term>hItem [required]</term>
<listitem>
<para>
The tree-view item to retrieve the item data from.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the item data associated with the specified item, or the <computeroutput>.nil</computeroutput> object if
there is no data associated with the item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view control allows the user (the Rexx programmer) to associate a data value with any, or all, of the tree-view
items. The data value can be any ooRexx object. The data value is set using the <xref
linkend="mthSetItemDataClsTreeView"/> method. If needed the data value can be removed from a tree-view item through the
<xref linkend="mthRemoveItemDataClsTreeView"/> method. Storing a user value for each item can be useful in any number of
ways.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::getItemData() -->
<section id="mthGetItemHeight" xreflabel="getItemHeight"><title>getItemHeight</title>
<indexterm><primary>getItemHeight</primary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>getItemHeight</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getItemHeight---------------------------------------------><
]]>
</programlisting>
<para>
Returns the current height of the tree-view items.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
There are no arguments to this method.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the current height of the tree-view items in pixels.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view uses the value returned for the height of all items. The value itself is the height of a single item. See
the <link linkend="mthSetItemHeight">setItemHeight</link> method.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::getItemHeight() -->
<section id="mthGetItemRectClsTreeView" xreflabel="getItemRect"><title>getItemRect</title>
<indexterm><primary>getItemRect</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>getItemRect</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getItemRect(--hItem--,--rect--+-------------+--)------------><
+-,-textOnly--+
]]>
</programlisting>
<para>
Retrieves the bounding rectangle for a tree-view item and indicates whether the item is visible.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>hItem [required]</term>
<listitem>
<para>
The tree-view item to retrieve the bounding rectangle for.
</para>
</listitem></varlistentry>
<varlistentry><term>rect [required in / out]</term>
<listitem>
<para>
A <link linkend="clsRect">Rect</link> object used to return the bounding rectangle coordinates. Coordinates are in
pixels expressed as <link linkend="defClientArea">client</link> area coordinates.
</para>
</listitem></varlistentry>
<varlistentry><term>textOnly [optional]</term>
<listitem>
<para>
If <emphasis role="italic">textOnly</emphasis> is true, the bounding rectangle returned is for the text portion only
of the item. If false, the rectangle includes the entire line the item occupies in the tree-view control. If the
argument is omitted, the default is true.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns true if the item specified is visible and the bounding rectangle is filled in. Returns false if the item is not
visible and the bounding rectangle is not filled in.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The coordinates of the bounding rectangle are only filled in if the item is visible.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example shows the event handler for a tool tip used for a tree-view. When the tool tip is about to be shown, the
bounding rectangle for the text only portion of the item is used to reposition the tool tip so that it is in line with
the item and to the right of the item:
<programlisting>
<![CDATA[
::method onShow unguarded
expose currentItem
use arg toolTip, treeView
pos = toolTip~getRealPos
r = .Rect~new
if treeView~getItemRect(currentItem, r) then do
treeView~client2screen(r)
pos~x = r~right + 5
pos~y = r~top
toolTip~moveTo(pos)
return .true
end
return .false
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::getItemRect() -->
<section id="mthGetToolTipsClsTreeView" xreflabel="getToolTips"><title>getToolTips</title>
<indexterm><primary>getToolTips</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>getToolTips</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getToolTips----------------------------------><
]]>
</programlisting>
<para>
Retrieves the child <link linkend="clsToolTip">ToolTip</link> control used by this tree-view.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
There are no arguments for this method
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the Rexx <link linkend="clsToolTip">ToolTip</link> object that represents the ToolTip control of the tree-view,
or the <computeroutput>.nil</computeroutput> object if the tree-view does not currently have a ToolTip.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::getToolTips() -->
<section id="mthHitTestClsTreeView" xreflabel="hitTest"><title>hitTest</title>
<indexterm><primary>hitTest</primary></indexterm>
<programlisting>
<![CDATA[
>>--hitTest(--x--,--y--)-------------------------><
]]>
</programlisting>
<para>The hitTest method determines the location of the
specified point relative to the <xref linkend="defClientArea"/> of a tree-view control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>x</term>
<listitem><para>The x-coordinate of the point.
</para></listitem></varlistentry>
<varlistentry><term>y</term>
<listitem><para>The y-coordinate of the point.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>0 if no item occupies the point, or one or more of the
following strings if an item occupies the specified point:
<variablelist>
<varlistentry><term>handle</term>
<listitem><para>The handle to the item that occupies the specified point.
</para></listitem></varlistentry>
<varlistentry><term>ABOVE</term>
<listitem><para>Above the client area.
</para></listitem></varlistentry>
<varlistentry><term>BELOW</term>
<listitem><para>Below the client area.
</para></listitem></varlistentry>
<varlistentry><term>NOWHERE</term>
<listitem><para>In the client area but below the last item.
</para></listitem></varlistentry>
<varlistentry><term>ONITEM</term>
<listitem><para>On the bitmap or label associated with an item.
</para></listitem></varlistentry>
<varlistentry><term>ONBUTTON</term>
<listitem><para>On the button associated with an item.
</para></listitem></varlistentry>
<varlistentry><term>ONICON</term>
<listitem><para>On the icon associated with an item.
</para></listitem></varlistentry>
<varlistentry><term>ONINDENT</term>
<listitem><para>In the indentation associated with an item.
</para></listitem></varlistentry>
<varlistentry><term>ONLABEL</term>
<listitem><para>On the label (string) associated with an item.
</para></listitem></varlistentry>
<varlistentry><term>ONRIGHT</term>
<listitem><para>In the area to the right of an item.
</para></listitem></varlistentry>
<varlistentry><term>ONSTATEICON</term>
<listitem><para>On the state icon for a tree-view item that is in a user-defined state.
</para></listitem></varlistentry>
<varlistentry><term>TOLEFT</term>
<listitem><para>To the left of the client area.
</para></listitem></varlistentry>
<varlistentry><term>TORIGHT</term>
<listitem><para>To the right of the client area.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthHitTestInfoClsTreeView" xreflabel="hitTestInfo"><title>hitTestInfo</title>
<indexterm><primary>hitTestInfo</primary><secondary>TreeViewClass</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>hitTestInfo</secondary></indexterm>
<programlisting>
<![CDATA[
Form 1:
>>--hitTestInfo(--pt--)--------------------------><
Form 2:
>>--hitTestInfo(--x,--y--)-----------------------><
Generic form:
>>--hitTestInfo(--pointToTest--)-----------------><
]]>
</programlisting>
<para>
Determines the location of a point relative to the <xref linkend="defClientArea"/> of the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The argument(s) specify the coordindates of the point to test. These coordinates can be specified using either a
<xref linkend="clsPoint"/> object, or by the x and y coordinate of the point:
<variablelist>
<varlistentry><term>pointToTest [requried]</term>
<listitem>
<para>
The x, y coordinates of the point to test. As noted either a <computeroutput>Point</computeroutput> object or
the whole number x and y coordinates can be used to specify the point. If a
<computeroutput>Point</computeroutput> is not used, both <emphasis role="italic">x</emphasis> and <emphasis
role="italic">y</emphasis> are required.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
The return is a <computeroutput>Directory</computeroutput> object whose indexes contain the result of the hit test.
On return, the <computeroutput>Directory</computeroutput> object will have the following indexes with the
corresponding information:
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">hItem</emphasis></term>
<listitem>
<para>
The <xref linkend="defHandle"/> of the tree-view item under the point specified, if there is one. If
the point does not hit an item, the value will be 0.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">location</emphasis></term>
<listitem>
<para>
A string of blank separated keywords describing the location of the point. For instance, the string might
be "ONITEM ONLABEL" if the point hits an item, on the item's label. Or it could be "ABOVE TORIGHT" if the point
is not on the client area of the tree-view at all. The possible descriptive words are as follows.
</para>
<para>
<simplelist type='vert' columns='3'>
<member>ABOVE </member>
<member>BELOW </member>
<member>NOWHERE </member>
<member>ONITEM </member>
<member>ONBUTTON </member>
<member>ONICON </member>
<member>ONINDENT </member>
<member>ONLABEL </member>
<member>ONRIGHT </member>
<member>ONSTATEICON</member>
<member>TOLEFT </member>
<member>TORIGHT </member>
</simplelist>
<variablelist>
<varlistentry><term>ABOVE</term>
<listitem>
<para>
Above the client area.
</para>
</listitem></varlistentry>
<varlistentry><term>BELOW</term>
<listitem>
<para>
Below the client area
</para>
</listitem></varlistentry>
<varlistentry><term>NOWHERE</term>
<listitem>
<para>
In the client area, but below the last item.
</para>
</listitem></varlistentry>
<varlistentry><term>ONITEM</term>
<listitem>
<para>
On the bitmap or label associated with an item.
</para>
</listitem></varlistentry>
<varlistentry><term>ONBUTTON</term>
<listitem>
<para>
On the button associated with an item.
</para>
</listitem></varlistentry>
<varlistentry><term>ONICON</term>
<listitem>
<para>
On the bitmap associated with an item.
</para>
</listitem></varlistentry>
<varlistentry><term>ONINDENT</term>
<listitem>
<para>
In the indentation associated with an item.
</para>
</listitem></varlistentry>
<varlistentry><term>ONLABEL</term>
<listitem>
<para>
On the label (text) associated with an item.
</para>
</listitem></varlistentry>
<varlistentry><term>ONRIGHT</term>
<listitem>
<para>
In the area to the right of an item.
</para>
</listitem></varlistentry>
<varlistentry><term>ONSTATEICON</term>
<listitem>
<para>
On the state icon for a tree-view item that is in a user-defined state.
</para>
</listitem></varlistentry>
<varlistentry><term>TOLEFT</term>
<listitem>
<para>
To the left of the client area.
</para>
</listitem></varlistentry>
<varlistentry><term>TORIGHT</term>
<listitem>
<para>
To the right of the client area.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view will reply for any given point, even invalid points like (-7000, -6000). Points not on the tree-view
control itself will have the <computeroutput>hItem</computeroutput> index set to 0 and the
<computeroutput>location</computeroutput> string will show where the point is in relation to the control. For
example (-7000, -6000) will have a location string of "ABOVE TOLEFT".
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details:</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::hitTestInfo() -->
<section id="indent" xreflabel="indent"><title>Indent</title>
<indexterm><primary>Indent</primary></indexterm>
<programlisting>
<![CDATA[
>>--indent---------------------------------------><
]]>
</programlisting>
<para>The Indent method retrieves the amount, in pixels,
by which the child items are indented relative to their parent item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The amount indented, in pixels.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="indentnew" xreflabel="indent="><title>Indent=</title>
<indexterm><primary>Indent=</primary></indexterm>
<programlisting>
<![CDATA[
>>--indent=indent--------------------------------><
]]>
</programlisting>
<para>The Indent= method sets the width of indentation
for a tree-view control and redraws the control to reflect the new width.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>indent</term>
<listitem><para>The width of the indentation, in pixels. If you specify a width that
is smaller than the system-defined minimum, it is set to the system-defined
minimum.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>-1 if <emphasis role="italic">indent</emphasis> is 0.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthInsertClsTreeView" xreflabel="insert"><title>insert</title>
<indexterm><primary>insert</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>insert</secondary></indexterm>
<programlisting>
<![CDATA[
>>--insert(--+----------+-+---------+-+-------+-+-------+-+----------+--------->
+--parent--+ +-,-after-+ +-,-txt-+ +-,-img-+ +-,-selImg-+
>------------+---------+-+------------+-+------------+-------------------------><
+-,-state-+ +-,-children-+ +-,-itemData-+
]]>
</programlisting>
<para>
Inserts a new item into the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>parent [optional]</term>
<listitem>
<para>
Handle of the parent to the new item. If this argument is omitted, or is the keyword <emphasis
role="italic">root</emphasis>, case insignificant, then the new item is inserted a the root of the tree-view.
</para>
</listitem></varlistentry>
<varlistentry><term>after [optional]</term>
<listitem>
<para>
Either a tree-view item handler, or one of the following keywords separated by spaces, case is not significant. This
specifies where the new item will be inserted. When <emphasis role="italic">after</emphasis> is an item handle, the
new item is inserted after the specified item. Otherwise the item is inserted as explained for each keyword:
</para>
<para>
<simplelist type='vert' columns='3'>
<member>FIRST</member>
<member>LAST </member>
<member>SORT </member>
</simplelist>
<variablelist>
<varlistentry><term>FIRST</term>
<listitem>
<para>
Inserts the item at the beginning of the list.
</para>
</listitem></varlistentry>
<varlistentry><term>LAST</term>
<listitem>
<para>
Inserts the item at the end of the list. This is the default if the <emphasis role="italic">after</emphasis>
argument is omitted
</para>
</listitem></varlistentry>
<varlistentry><term>SORT</term>
<listitem>
<para>
Inserts the item into the list in alphabetical order.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term>txt [optional]</term>
<listitem>
<para>
The text for the label of the item. If this arugment is omitted then the empty string is used as the text.
</para>
</listitem></varlistentry>
<varlistentry><term>img [optional]</term>
<listitem>
<para>
Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list of the icon
image to use when the item is in the nonselected state.
</para>
</listitem></varlistentry>
<varlistentry><term>selImg [optional]</term>
<listitem>
<para>
Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list of the icon
image to use when the item is in the selected state.
</para>
</listitem></varlistentry>
<varlistentry><term>state [optional]</term>
<listitem>
<para>
A list of 0 or more of the following keywords separated by spaces, case is not significant. If this argument is
omitted the item state will be normal, not expanded:
</para>
<para>
<simplelist type='vert' columns='3'>
<member>BOLD </member>
<member>EXPANDED</member>
</simplelist>
<variablelist>
<varlistentry><term>BOLD</term>
<listitem>
<para>
The item is shown bolded.
</para>
</listitem></varlistentry>
<varlistentry><term>EXPANDED</term>
<listitem>
<para>
The item's list of child items is currently expanded, that is, the child items are visible. Only parent items can
have this state.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term>children [optional]</term>
<listitem>
<para>
Used to signal the underlying tree-view control that the item has children, even if no children are inserted. Specify
1 to signal that the item does have children. This is really only useful if the tree-view has the <xref
linkend="styTreeViewBUTTONS"/> style, see the remarks section. When this argument is omitted or less than 1, it is
in effect ignored.
</para>
</listitem></varlistentry>
<varlistentry><term>itemData [optional]</term>
<listitem>
<para>
Associates the specified value with the tree-view item being inserted. This can be any Rexx object that the
programmer wants to use. The <link linkend="mthGetItemDataClsTreeView">getItemData</link> method can be used to
retrieve this value.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the handle of the newly inserted item on success, or zero on error.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
When a tree-view controls has the BUTTONS style, it displays plus and minus buttons next to <emphasis
role="italic">parent</emphasis> items. It does not display the buttons for any item that has no children. However, it is
sometimes useful to dynamically insert child items when the button is clicked. Specifying 1 for the <emphasis
role="italic">children</emphasis> argument forces the tree-view control to use a plus button for the item, even if the
item has no children.
</para>
<para>
Associating a item data value with some or all of a tree-view items can be useful in a number of ways. The <emphasis
role="italic">itemData</emphasis> argument allows the programme to assoicate the value at the time the item in added to
the tree-view. The <xref linkend="mthSetItemDataClsTreeView"/> method can be used to assign a data value at any time.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example inserts a new folder tree-view item as a sibling of the currently selected item. It also assigns both a
selected and unselected icon to the item from the tree-view's image list by specifying the index in the image list for
the incons:
<programlisting>
<![CDATA[
::constant UNSELECTED_FOLDER 0 -- Index for the icon of an unselected folder item
::constant SELECTED_FOLDER 1 -- Index for the icon of a selected folder item
::constant UNSELECTED_LEAF 2 -- Index for the icon of an unselected leaf item
::constant SELECTED_LEAF 3 -- Index for the icon of a selected leaf item
...
treeControl~insert(treeControl~Parent(selected), , text, self~UNSELECTED_FOLDER, self~SELECTED_FOLDER)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::insert() -->
<section id="isancestor" xreflabel="isAncestor"><title>IsAncestor</title>
<indexterm><primary>IsAncestor</primary></indexterm>
<programlisting>
<![CDATA[
>>--isAncestor(--hParent--,--hItem--)------------><
]]>
</programlisting>
<para>The IsAncestor method checks if an item is an ancestor
of another item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>hParent</term>
<listitem><para>The ancestor.
</para></listitem></varlistentry>
<varlistentry><term>hItem</term>
<listitem><para>The item to be checked.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>1 if <emphasis role="italic">hParent</emphasis> is an ancestor
of <emphasis role="italic">hItem</emphasis>.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthItemInfoClsTreeView" xreflabel="itemInfo"><title>itemInfo</title>
<indexterm><primary>itemInfo</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>itemInfo</secondary></indexterm>
<programlisting>
<![CDATA[
>>--itemInfo(--hItem--)--------------------------><
]]>
</programlisting>
<para>
The <emphasis role="italic">itemInfo</emphasis> method returnes the attributes of the specified item as a stem.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
<variablelist>
<varlistentry><term>hItem [required]</term>
<listitem>
<para>
The handle of the tree-view item whose attributes are to be retunred.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns a stem on success, or -1 if an error ocurred. The tails, (the indexes,) of the stem will be:
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">!TEXT</emphasis></term>
<listitem>
<para>
The text, the label, of the item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">!CHILDREN</emphasis></term>
<listitem>
<para>
Whether the item has children or not. True if the item has children, false if it does not.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">!IMAGE</emphasis></term>
<listitem>
<para>
The index in the image list of the normal icon for the item. The index will be 0 if there is no index assigned to the
item. However, 0 is also a valid index in a the image list. There is no way to distinguish the two.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">!SELECTEDIMAGE</emphasis></term>
<listitem>
<para>
The index in the image list of the selected icon for the item. The index will be 0 if there is no index assigned to the
item. However, 0 is also a valid index in a the image list. There is no way to distinguish the two.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">!STATE</emphasis></term>
<listitem>
<para>
A string consisting of 0 or more of the followin keywords:
</para>
<variablelist>
<varlistentry><term>EXPANDED</term>
<listitem><para>
The item's list is currently expanded with all child items visible. This only applies to parent items.
</para>
</listitem></varlistentry>
<varlistentry><term>BOLD</term>
<listitem>
<para>
The item is in bold.
</para>
</listitem></varlistentry>
<varlistentry><term>SELECTED</term>
<listitem>
<para>
The item is selected.
</para>
</listitem></varlistentry>
<varlistentry><term>EXPANDEDONCE</term>
<listitem>
<para>
The item's list has been expanded at least once. This only applies to parent items.
</para>
</listitem></varlistentry>
<varlistentry><term>INDROP</term>
<listitem>
<para>
The item is selected as a drag-and-drop target.
</para>
</listitem></varlistentry>
<varlistentry><term>CUT</term>
<listitem>
<para>
The item is selected as part of a cut-and-paste operation.
</para>
</listitem></varlistentry>
<varlistentry><term>EXPANDPARTIAL</term>
<listitem>
<para>
Indicates a partially expanded tree-view item. In this state, some, but not all, of the child items are visible and
the parent item's plus symbol is displayed.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">!ITEMDATA</emphasis></term>
<listitem>
<para>
The item data value, if a value has been assigned to the item. If no item data value has been assigned, the
<computeroutput>.nil</computeroutput> object is returned.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The item data value can be assigned to a tree-view item through a number of methods, such as the <xref
linkend="mthSetItemDataClsTreeView"/>, <xref linkend="mthInsertClsTreeView"/>, or <xref linkend="mthModifyClsTreeView"/>
methods.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
The following example displays the attributes of the selected item:
<programlisting>
<![CDATA[
::method Info
tree = self~newTreeView(IDC_TREE)
itemInfo. = curTree~itemInfo(tree~selected)
say itemInfo.!TEXT
say itemInfo.!CHILDREN
say itemInfo.!IMAGE
say itemInfo.!STATE
say itemInfo.!ITEMDATA
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::itemInfo() -->
<section id="itemstrc" xreflabel="items"><title>items</title>
<indexterm><primary>items</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--items----------------------------------------><
]]>
</programlisting>
<para>The items method retrieves the number of items
in a tree-view control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The number of items.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example counts all items in a tree-view control:
<programlisting>
<![CDATA[
::method Count
curTree = self~newTreeView("IDC_TREE")
say curTree~items
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthItemTextClsTreeView" xreflabel="itemText"><title>itemText</title>
<indexterm><primary>itemText</primary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>itemText</secondary></indexterm>
<programlisting>
<![CDATA[
>>--itemText(--hItem--)--------------------------><
]]>
</programlisting>
<para>
Retrieves the text of the specified tree-view item.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
</para>
<variablelist>
<varlistentry><term>hItem [required]</term>
<listitem>
<para>
The tree-view item to retrieve the text from.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
The return is the text assigned to the specified tree-view item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example retrieves the text of the selected item:
<programlisting>
<![CDATA[
tv = self~newTreeVies(IDC_TV_BOOK)
selectedItem = tv~selected
if selectedItem == 0 then do
say 'No item is selected'
end
else do
say 'The text for the selected item is:' tv~itemText(selectedItem)
end
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::itemText() -->
<section id="makefirstvisibletrc" xreflabel="makeFirstVisible"><title>MakeFirstVisible</title>
<indexterm><primary>MakeFirstVisible</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--makeFirstVisible(--hItem--)------------------><
]]>
</programlisting>
<para>The MakeFirstVisible method ensures that
<emphasis role="italic">hItem</emphasis> is visible and displays
it at the top of the control's dialog, if
possible. If the specified item is near the end of the control's hierarchy
of items, it might not become the first visible item depending on how many
items fit in the dialog.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item to be visible first.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The item is visible first.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> was not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthModifyClsTreeView" xreflabel="modify"><title>modify</title>
<indexterm><primary>modify</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>modify</secondary></indexterm>
<programlisting>
<![CDATA[
>>--modify(--+---------+-+-------+-+-------+-+----------+---------------------->
+--hItem--+ +-,-txt-+ +-,-img-+ +-,-selImg-+
>------------+---------+-+------------+-+------------+-------------------------><
+-,-state-+ +-,-children-+ +-,-itemData-+
]]>
</programlisting>
<para>
Modifies some or all of an item's attributes.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>hItem [optional]</term>
<listitem>
<para>
Handle of the item to modify. If this argument is omitted the currently selected item is used. If the item is omitted
and there is no currently selected item, -1 is returned as an error.
</para>
</listitem></varlistentry>
<varlistentry><term>txt [optional]</term>
<listitem>
<para>
The text for the label of the item. If this argument is omitted then the text is not changed.
</para>
</listitem></varlistentry>
<varlistentry><term>img [optional]</term>
<listitem>
<para>
Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list of the icon
image to use when the item is in the nonselected state. If omitted, then the index is not changed.
</para>
</listitem></varlistentry>
<varlistentry><term>selImg [optional]</term>
<listitem>
<para>
Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list of the icon
image to use when the item is in the selected state. If omitted the selected icon index is not changed.
</para>
</listitem></varlistentry>
<varlistentry><term>state [optional]</term>
<listitem>
<para>
Modifies the item state. Use 0 or more of the following keywords separated by spaces, case is not significant. If
this argument is omitted, or the empty string, the item state is not changed.
</para>
<para>
<simplelist type='vert' columns='3'>
<member>BOLD </member>
<member>NOBOLDBOLD </member>
<member>EXPANDED</member>
<member>NOTEXPANDED</member>
<member>DROP</member>
<member>NOTDROP</member>
<member>SELECTED</member>
<member>NOTSELECTED</member>
<member>CUT</member>
<member>NOTCUT</member>
<member>EXPANDEDONCE</member>
<member>NOTEXPANDEDONCE</member>
<member>EXPANDPARTIAL</member>
<member>NOTEXPANDPARTIAL</member>
</simplelist>
<variablelist>
<varlistentry><term>BOLD</term>
<listitem>
<para>
The item is shown bolded.
</para>
</listitem></varlistentry>
<varlistentry><term>NOTBOLD</term>
<listitem>
<para>
The item is shown not bolded.
</para>
</listitem></varlistentry>
<varlistentry><term>EXPANDED</term>
<listitem>
<para>
The item's list of child items is currently expanded, that is, the child items are visible. Only parent items can
have this state.
</para>
</listitem></varlistentry>
<varlistentry><term>NOTEXPANDED</term>
<listitem>
<para>
The item's list is currently not expanded.
</para>
</listitem></varlistentry>
<varlistentry><term>DROP</term>
<listitem>
<para>
The item is selected as a drag-and-drop target.
</para>
</listitem></varlistentry>
<varlistentry><term>NOTDROP</term>
<listitem>
<para>
The item is not selected as a drag-and-drop target.
</para>
</listitem></varlistentry>
<varlistentry><term>SELECTED</term>
<listitem>
<para>
The item is selected. Its appearance depends on whether it has the focus and whether the system colors are used
for the selection.
</para>
</listitem></varlistentry>
<varlistentry><term>NOTSELECTED</term>
<listitem>
<para>
The item is not selected.
</para>
</listitem></varlistentry>
<varlistentry><term>CUT</term>
<listitem>
<para>
The item is selected as part of a cut-and-paste operation.
</para>
</listitem></varlistentry>
<varlistentry><term>NOTCUT</term>
<listitem>
<para>
The item is not selected as part of a cut-and-paste operation.
</para>
</listitem></varlistentry>
<varlistentry><term>EXPANDEDONCE</term>
<listitem>
<para>
The item's list of child items has been expanded at least once.
</para>
</listitem></varlistentry>
<varlistentry><term>NOTEXPANDEDONCE</term>
<listitem>
<para>
The item's list of child items has not been expanded at least once.
</para>
</listitem></varlistentry>
<varlistentry><term>EXPANDPARTIAL</term>
<listitem>
<para>
A partially expanded tree-view item. In this state, some, but not all, of the child items are visible and the
parent item's plus symbol is displayed.
</para>
</listitem></varlistentry>
<varlistentry><term>NOTEXPANDPARTIAL</term>
<listitem>
<para>
The item is not in a partially expanded state.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term>children [optional]</term>
<listitem>
<para>
Used to signal the underlying tree-view control that the item has children, even if no children are inserted. Specify
1 to signal that the item does have children. This is really only useful if the tree-view has the <xref
linkend="styTreeViewBUTTONS"/> style. When this argument is omitted the item's <emphasis
role="italic">children</emphasis> value is not changed.
</para>
</listitem></varlistentry>
<varlistentry><term>itemData [optional]</term>
<listitem>
<para>
Associates the specified value with the tree-view item being inserted. This can be any Rexx object that the
programmer wants to use. The <link linkend="mthGetItemDataClsTreeView">getItemData</link> method can be used to
retrieve this value. If this argument is omitted, the item's item data value is not changed.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns one of the following values:
</para>
<variablelist>
<varlistentry><term>0</term>
<listitem>
<para>
The item has been modified.
</para>
</listitem></varlistentry>
<varlistentry><term></term>
<listitem>
<para>
The tree-view control reported an error when modifying the item.
</para>
</listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem>
<para>
The <emphasis role="italic">hItem</emphasis> argument was not valid.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
The following example changes the text of the item to bold when it is selected:
<programlisting>
<![CDATA[
::method onSelectChanging
tree = self~newTreeView(IDC_TREE)
tree~modify(tree~selected, , , ,"BOLD")
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::modify() -->
<section id="moveitem" xreflabel="moveItem"><title>moveItem</title>
<indexterm><primary>moveItem</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--moveItem(--hItem--,--hNewParent--,--redraw--+---------------+--)-----------><
+-,--"NODELETE"-+
+-,--"SIBLINGS"-+
]]>
</programlisting>
<para>The moveItem method moves an item to a new location.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item to be moved.
</para></listitem></varlistentry>
<varlistentry><term>hNewParent</term>
<listitem><para>The handle to the new parent to which the item is to be moved.
</para></listitem></varlistentry>
<varlistentry><term>redraw</term>
<listitem><para>The tree-view control is updated.
</para></listitem></varlistentry>
<varlistentry><term>options</term>
<listitem><para>One of the following options:
<variablelist>
<varlistentry><term>&quot;NODELETE&quot;</term>
<listitem><para>The item is copied to another location.
</para></listitem></varlistentry>
<varlistentry><term>&quot;SIBLINGS&quot;</term>
<listitem><para>Siblings are moved together with the item.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the new parent, or 0 in all other cases.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="nexttrc" xreflabel="next"><title>next</title>
<indexterm><primary>next</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--next(--hItem--)------------------------------><
]]>
</programlisting>
<para>The next method retrieves the sibling item next
to <emphasis role="italic">hItem</emphasis>.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item next to the sibling item to be retrieved.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the next sibling item, or -1 if you omitted
<emphasis role="italic">hItem</emphasis>, or 0 in all other cases.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example displays the name of the selected item and its
siblings:
<programlisting>
<![CDATA[
::method SiblingNames
curTree = self~newTreeView("IDC_TREE")
nextItem = curTree~selected
do while nextItem \= 0
itemInfo. = curTree~itemInfo(nextItem)
say ItemInfo.!Text
nextItem = curTree~next(nextItem)
end
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="nextvisible" xreflabel="netxVisible"><title>NextVisible</title>
<indexterm><primary>NextVisible</primary></indexterm>
<programlisting>
<![CDATA[
>>--nextVisible(--hItem--)-----------------------><
]]>
</programlisting>
<para>The NextVisible method retrieves the visible item
following <emphasis role="italic">hItem</emphasis>.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item that precedes the visible item to be
retrieved. <emphasis role="italic">hItem</emphasis> must also be visible.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the next visible item, or -1 if you omitted
<emphasis role="italic">hItem</emphasis>, or 0 in all other cases.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="parent" xreflabel="parent"><title>Parent</title>
<indexterm><primary>Parent</primary></indexterm>
<programlisting>
<![CDATA[
>>--parent(--hItem--)----------------------------><
]]>
</programlisting>
<para>The Parent method retrieves the parent of the specified
item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item for which the parent is to be retrieved.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the parent item, or -1 if
<emphasis role="italic">hItem</emphasis> is not
specified or is 0, or 0 in all other cases.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example displays the name of the selected item's parent:
<programlisting>
<![CDATA[
::method Parent
curTree = self~newTreeView("IDC_TREE")
itemInfo. = curTree~itemInfo(curTree~Parent(curTree~selected))
say ItemInfo.!Text
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="previoustrc" xreflabel="previous"><title>previous</title>
<indexterm><primary>previous</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--previous(--hItem--)--------------------------><
]]>
</programlisting>
<para>The previous method retrieves the sibling item
preceding <emphasis role="italic">hItem</emphasis>.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item that follows the sibling item to be retrieved.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the previous sibling item, or -1 if
<emphasis role="italic">hItem</emphasis>
is not specified or is 0, or 0 in all other cases.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="previousvisible" xreflabel="previousVisible"><title>PreviousVisible</title>
<indexterm><primary>PreviousVisible</primary></indexterm>
<programlisting>
<![CDATA[
>>--previousVisible(--hItem--)-------------------><
]]>
</programlisting>
<para>The PreviousVisible method retrieves the visible
item preceding <emphasis role="italic">hItem</emphasis>.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item that follows the visible child item to be retrieved.
<emphasis role="italic">hItem</emphasis> must also be visible.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the previous visible child item, or -1 if
<emphasis role="italic">hItem</emphasis> is not specified or is 0, or 0
in all other cases.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthRemoveItemDataClsTreeView" xreflabel="removeItemData"><title>removeItemData</title>
<indexterm><primary>removeItemData</primary><secondary>TreeViewClass</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>removeItemData</secondary></indexterm>
<programlisting>
<![CDATA[
>>--removeItemData(--hItem--)--------------------><
]]>
</programlisting>
<para>
Removes and returns the item data associated with the specified tree-view item.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
<variablelist>
<varlistentry><term>hItem [required]</term>
<listitem>
<para>
The the tree-view item whose data value is being removed.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the item data value associated with the specified item, or <computeroutput>.nil</computeroutput> if there is
no data associated with the item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view control allows the user (the Rexx programmer) to associate a data value with any, or all, of the tree-view
items. The data value can be any ooRexx object. The data value is set using the <xref
linkend="mthSetItemDataClsTreeView"/> method. The data value can be retrieved without removing it from a tree-view item
through the <xref linkend="mthGetItemDataClsTreeView"/> method. Storing a user value for each item can be useful in any
number of ways.
</para> </listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::removeItemData() -->
<section id="mthRoot" xreflabel="root"><title>root</title>
<indexterm><primary>root</primary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>root</secondary></indexterm>
<programlisting>
<![CDATA[
>>--root-----------------------------------------><
]]>
</programlisting>
<para>
The <emphasis role="italic">root</emphasis> method retrieves item handle of the first or topmost item of the tree-view
control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
This method has not arguments.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
The handle to the first or topmost item on success. 0 on error.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
The following example displays the text, or label, of the root item:
<programlisting>
<![CDATA[
::method rootLabel
tv = self~newTreeView(IDC_TV_ORG_CHART)
say 'The head of the organization is' tv~getItemText(tv~root)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="selecttrc" xreflabel="select"><title>select</title>
<indexterm><primary>select</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--select(--hItem--)----------------------------><
]]>
</programlisting>
<para>The select method selects a specific item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item to be selected.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The item was selected.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> was not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="selectedtrc" xreflabel="selected"><title>selected</title>
<indexterm><primary>selected</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--selected-------------------------------------><
]]>
</programlisting>
<para>The selected method retrieves the currently selected
item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the currently selected item, or 0 in all other cases.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example displays the name of the selected item:
<programlisting>
<![CDATA[
::method SelectedName
curTree = self~newTreeView("IDC_TREE")
itemInfo. = curTree~itemInfo(curTree~selected)
say ItemInfo.!Text
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthSetImageListClsTreeView" xreflabel="setImageList"><title>setImageList</title>
<indexterm><primary>setImageList</primary>
<secondary>TreeView class</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setImageList(--newImageList--+----------+--)----------------><
+--,-type--+
]]>
</programlisting>
<para>
Assigns, or removes, an image list for the tree-view control. Using
<computeroutput>.nil</computeroutput> for the first argument removes the current image list. Tree-view
controls can have two image lists. The normal image list, which contains selected, nonselected, and
overlay images for the items of a tree-view control. And, the state image list. The state images can be
used by the programmer to indicate application-defined item states. A state image is displayed to the
left of an item's selected or nonselected image.
</para>
<para>
The tree-view control does not destroy an image list that is associated with it. The programmer must
destroy the image list separately, if desired. This is useful if the same image list is assigned to
multiple tree-view controls. In essence, the ownership of the image list remains with the programmer.
The <xref linkend="clsImageList"/> and <xref linkend="clsImage"/> classes are
used to manage image lists and images in ooDialog. The documentation on both classes discusses when and
why the programmer may want to release image lists. The Image class documentation has the most detail
on this subject.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>The arguments are:
<variablelist>
<varlistentry><term>newImageList</term>
<listitem>
<para>
The image <xref linkend="clsImageList"/> to assign to the tree-view. If this argument
is <computeroutput>.nil</computeroutput> the existing image list, if any, is removed.
</para>
</listitem></varlistentry>
<varlistentry><term>type</term>
<listitem>
<para>
Optional. Specifies which image list to assign, (or remove.) You can use <xref linkend="mthToIDClsImage"/> method
of the <xref linkend="clsImage"/> class to get the correct numeric value for one of the following symbols:
<simplelist type='horiz' columns='2'>
<member>TVSIL_NORMAL</member>
<member>TVSIL_STATE </member>
</simplelist>
or use the correct numeric value itself.
</para>
<para>
The default is TVSIL_NORMAL.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
The existing image list is returned, if there is one. Otherwise,
<computeroutput>.nil</computeroutput> is returned.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example creates an image list and assigns it to the tree-view control for use as the normal
image list.
<programlisting>
<![CDATA[
/* set images for the items */
image = .Image~getImage("bmp\psdemotv.bmp")
imageList = .ImageList~create(.Size~new(32, 32), .Image~toID(ILC_COLOR8), 10, 0)
if \image~isNull, \imageList~isNull then do
imageList~add(image)
tc~setImageList(imageList, .Image~toID(TVSIL_NORMAL))
image~release
end
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::setImageList() -->
<section id="mthSetItemDataClsTreeView" xreflabel="setItemData"><title>setItemData</title>
<indexterm><primary>setItemData</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>setItemData</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setItemData(--hItem,--+--------+--)----------><
+-,-data-+
]]>
</programlisting>
<para>
Sets the item data associated with the specified tree-view item.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
<variablelist>
<varlistentry><term>hItem [required]</term>
<listitem>
<para>
The the tree-view item the data value is associated with.
</para>
</listitem></varlistentry>
<varlistentry><term>data [optional]</term>
<listitem>
<para>
The data value to store for the tree-view item. This can be any Rexx object. (Recall that in ooRexx numbers and
strings are also objects.) If this argument is omitted, the current item data, if any, is removed.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the previous item data associated with the tree-view item, or <computeroutput>.nil</computeroutput> if there was
no previous data. On error, <computeroutput>.nil</computeroutput> is returned and the <xref
linkend="dotSystemErrorCode"/> is set. An error is highly unlikely.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view control allows the user (the Rexx programmer) to associate a data value with any, or all, of the tree-view
items. The data value can be any ooRexx object. The data value can be retrieved without removing it from a
tree-view item through the <xref linkend="mthGetItemDataClsTreeView"/> method, or it can be removed through the <xref
linkend="mthRemoveItemDataClsTreeView"/>. Storing a user value for each item can be useful in any number of ways. One
specific use is in the <xref linkend="mthSortChildrenCB"/> method.
</para>
<para>
It is possible, although very unlikely, that there will be an error in the tree-view control when setting the item data.
In this case <computeroutput>.nil</computeroutput> is returned and the <computeroutput>.systemErrorCode</computeroutput>
is set to 156 ERROR_SIGNAL_REFUSED <emphasis role="italic">The recipient process has refused the signal</emphasis>.
</para>
<para>
This is not a system error, the code is just used here to indicate a tree-view error when setting the item data. The
tree-view provides no information on why it failed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
<para>
Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::setItemData() -->
<section id="mthSetItemHeight" xreflabel="setItemHeight"><title>setItemHeight</title>
<indexterm><primary>setItemHeight</primary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>setItemHeight</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setItemHeight(--cyItem--)--------------------><
]]>
</programlisting>
<para>
Sets the height of the tree-view items.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
</para>
<variablelist>
<varlistentry><term>cyItem [required]</term>
<listitem>
<para>
The new height for every item in the tree view, in pixels. Heights less than 1 will be set to 1. If this argument is
not even, it will be rounded down to the nearest even value. If this argument is -1, the control will
revert to using its default item height.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the previous item height, in pixels.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view uses the value for the height of all items. The value itself is the height of a single item. See the <link
linkend="mthGetItemHeight">getItemHeight</link> method. By default, the tree-view only allows even heights. However, if
the <link linkend="styTreeViewNONEVENHEIGHT">NONEVENHEIGHT</link> style is give to the tree-view, both odd and even
values can be assigned.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example sets the height of each tree-view item to 20 pixels. (For this specific application the previouse height
was 16 pixels.)
<programlisting>
<![CDATA[
tv = self~newTreeView(IDC_TREE)
tv~setItemHeight(20)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::setItemHeight() -->
<section id="mthSetToolTipsClsTreeView" xreflabel="setToolTips"><title>setToolTips</title>
<indexterm><primary>setToolTips</primary><secondary>TreeView class</secondary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>setToolTips</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setToolTips(--toolTip--)---------------------><
]]>
</programlisting>
<para>
Sets the child <link linkend="clsToolTip">ToolTip</link> control used by this tree-view.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>toolTip [required]</term>
<listitem>
<para>
The Rexx <computeroutput>ToolTip</computeroutput> object that represents the tool tip control the tree-view should
use.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the previous tool tip, as a Rexx <computeroutput>ToolTip</computeroutput> object, or the
<computeroutput>.nil</computeroutput> object if there is no previous tool tip.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::setToolTips() -->
<section id="sortchildren" xreflabel="sortChildren"><title>SortChildren</title>
<indexterm><primary>SortChildren</primary></indexterm>
<programlisting>
<![CDATA[
>>--sortChildren(--hItem--)----------------------><
]]>
</programlisting>
<para>The SortChildren method sorts the child items of
the specified parent item in a tree-view control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the parent item the child items of which are to be sorted.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The child items were sorted.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis>
was not specified or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthSortChildrenCB" xreflabel="sortChildrenCB"><title>sortChildrenCB</title>
<indexterm><primary>sortChildrenCB</primary></indexterm>
<indexterm><primary>TreeView class</primary><secondary>sortChildrenCB</secondary></indexterm>
<programlisting>
<![CDATA[
>>--sortChildrenCB(--+---------+--+-----------+--+---------+--)----------------><
+--hItem--+ +-,-mthName-+ +-,-param-+
]]>
</programlisting>
<para>
The <emphasis role="italic">sortChildrenCB</emphasis> method causes the tree-view to sort the children of the specified
parent tree-view item by invoking a comparison method in the Rexx dialog. The Rexx comparsion method determines the order
of the children items.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>hItem [optional]</term>
<listitem>
<para>
The parent item of the children to be sorted. If this argument is omitted, the <link linkend="mthRoot">root</link>
item is used as the parent.
</para>
</listitem></varlistentry>
<varlistentry><term>mthName [optional]</term>
<listitem>
<para>
The name of the comparsion method in the Rexx dialog to be invoked to determine the relative order of two tree-view
items. If this argument is omitted, a default method name of <emphasis role="italic">onSortChildrenCB</emphasis> is
used.
</para>
</listitem></varlistentry>
<varlistentry><term>param [optional]</term>
<listitem>
<para>
The <emphasis role="italic">param</emphasis> argument can be any object the programmer wants to use. If the argument
exists, it is passed as the third argument to the <emphasis role="italic">mthName</emphasis> comparison method. If
the argument is omitted, the <computeroutput>.nil</computeroutput> object is passed as the third argument.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns true on success, false on error.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view control allows the user (the Rexx programmer) to associate a user <link
linkend="mthSetItemDataClsTreeView">data</link> value with any, or all, of the tree-view items. The data value can be any
ooRexx object. For the <emphasis role="italic">sortChildrenCB</emphasis> method to work correctly, the programmer must
associate a data value with each tree-view item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">The onSortChildrenCB method</emphasis></term>
<listitem>
<para>
As the tree-view control needs to compare two items it will invoke, through the ooDialog framework, the comparison method
in the Rexx dialog named by the <emphasis role="italic">mthName</emphasis> argument. The return from the Rexx method
determines how the items are sorted.
</para>
<para>
The comparison method must return a whole number and this value is passed on to the tree-view control. The method must
return a negative value if the first item should come before the second item, a postive number if the first item should
come after the second item, and 0 if the items are equivalent.
</para>
<para>
The arguments passed to the comparsion method are the item data items associated with the two items beig compared. This
is why the sort will not work correctly if tree-view items are not assigned a item data item. The comparison method
should be coded as follows:
</para>
<programlisting>
<![CDATA[
::method onSortChildrenCB unguarded
use arg data1, data2, param
]]>
</programlisting>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The comparison method receives 3 arguments:
</para>
<variablelist>
<varlistentry><term>data1</term>
<listitem>
<para>
The user <emphasis role="italic">data value</emphasis> assigned to the first tree-view item to be compared. This data
value is the value the programmer assigned to the item using one of the <xref linkend="mthSetItemDataClsTreeView"/>,
<link linkend="mthInsertClsTreeView">insert</link>, <link linkend="mthAddClsTreeView">add</link>, etc., methods.
</para>
</listitem></varlistentry>
<varlistentry><term>data2</term>
<listitem>
<para>
The user <emphasis role="italic">data value</emphasis> assigned to the second tree-view item to be compared.
</para>
</listitem></varlistentry>
<varlistentry><term>param</term>
<listitem>
<para>
The <emphasis role="italic">param</emphasis> argument passed to the <emphasis role="italic">sortChildrenCB</emphasis>
method, if it exists. If it was omitted, the param argument will be the <computeroutput>.nil</computeroutput>
object.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return:</emphasis></term>
<listitem>
<para>
The return must be a whole number. Less than 0 places the first item before the second item, greater than 0 places the
first item after the second. Return 0 if the two items are equivalent. The programmer determines what number to return
based on the 2 item data values passed to the method.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example sorts the children of the selected item in descending alphabetic order:
<programlisting>
<![CDATA[
::method onSortChildren unguarded
expose tv
selectedItem = tv~selected
if selectedItem == 0 then selectedItem = tv~root
ret = tv~sortChildrenCB(selectedItem, rexxSort)
::method rexxSort unguarded
use arg itemData1, itemData2, userParam
-- Reverse sort:
return itemData2~compareTo(itemData1)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TreeView::sortChildrenCB() -->
<section id="toggle" xreflabel="toggle"><title>Toggle</title>
<indexterm><primary>Toggle</primary></indexterm>
<programlisting>
<![CDATA[
>>--toggle(--hItem--)----------------------------><
]]>
</programlisting>
<para>The Toggle method collapses the list of the specified
item if it was expanded, or expands it if it was collapsed.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hItem</term>
<listitem><para>The handle to the item to be expanded or collapsed.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>
<variablelist>
<varlistentry><term>0</term>
<listitem><para>The item was expanded or collapsed.
</para></listitem></varlistentry>
<varlistentry><term>-1</term>
<listitem><para><emphasis role="italic">hItem</emphasis> is not specified
or is 0.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>For all other cases.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example toggles between expanding and
collapsing a selected item:
<programlisting>
<![CDATA[
::method ToggleSelected
curTree = self~newTreeView("IDC_TREE")
curTree~Toggle(curTree~selected)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="visibleitems" xreflabel="visibleItems"><title>VisibleItems</title>
<indexterm><primary>VisibleItems</primary></indexterm>
<programlisting>
<![CDATA[
>>--visibleItems---------------------------------><
]]>
</programlisting>
<para>The VisibleItems method obtains the number of items
that can be fully visible in a tree-view control. This number can be greater
than the number of items in the control. The control calculates this value
by dividing the height of the client window by the height of an item.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The number of items that can be fully visible. For example, if you can
see all of 19 items and part of another item, the return value is 19, not
20.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example returns the number of items that can be fully
visible:
<programlisting>
<![CDATA[
::method Visible
curTree = self~newTreeView("IDC_TREE")
say curTree~VisibleItems
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="clsTvCustomDrawSimple" xreflabel="TvCustomDrawSimple"><title>TvCustomDrawSimple Class</title>
<indexterm><primary>TvCustomDrawSimple class</primary></indexterm>
<para>
A <computeroutput>TvCustomDrawSimple</computeroutput> object is used when a <link
linkend="clsTreeView">TreeView</link> control is registered for simple <link linkend="clsCustomDraw">custom</link>
draw. A <computeroutput>TvCustomDrawSimple</computeroutput> object is passed to the CUSTOMDRAW event handler. It
supplies both information to the event handler and returns information back to the Windows control. The attributes of
the object convey the information both ways.
</para>
<para>
When the ooDialog framework receives information from the Windows custom draw control, it assigns values to the
attributes of the <computeroutput>TvCustomDrawSimple</computeroutput> object and sends the object to the Rexx dialog's
event handler. The programmer uses those values to determine what action to take and then assigns values to the
object's attributes to convey information back to the Windows control. The
<computeroutput>TvCustomDrawSimple</computeroutput> object is specific to the
<computeroutput>TreeView</computeroutput> class. Other ooDialog controls that support custom draw have their own
class that performs a similar function, but whose attributes are specific to that control. For instance, the <link
linkend="clsListView">ListView</link> class uses the <link linkend="clsLvCustomDrawSimple">LvCustomDrawSimple</link>
for its CUSTOMDRAW event handler.
</para>
<section id="evtTreeViewCustomDraw" xreflabel="TreeView CustomDraw Event Handler"><title>CustomDraw Event Handler</title>
<indexterm><primary>TreeView Event</primary><secondary>CUSTOMDRAW</secondary></indexterm>
<indexterm><primary>custom draw</primary><secondary>tree-view control</secondary></indexterm>
<para>
When the tree-view control is registered for <xref linkend="sctSimpleCustomDraw"/> custom draw, the event handler is
invoked when the draw stage is item prepaint. For simple custom draw, the ooDialog framework handles the other draw stages
internally. It makes the appropriate response to the dialog control so that the dialog control will send the item prepaint
notifications.
</para>
<para>
The single argument passed to the event handler is a <computeroutput>TvCustomDrawSimple</computeroutput> object. The event
handler examines the values of the attributes of the object to determine the information sent by the underlying tree-view
control. The event handler then assigns values to the object that specify how the tree-view control should draw the item.
Finally, the programmer returns true to have the updated information passed on to the tree-view, or false to have the
tree-view draw the item as it normally would.
</para>
<programlisting>
<![CDATA[
::method onCustomDraw unguarded
use arg tvcdSimple
return boolean
]]>
</programlisting>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The event handling method receives 1 argument:
</para>
<variablelist>
<varlistentry><term>tvcdSimple</term>
<listitem>
<para>
A <computeroutput>TvCustomDrawSimple</computeroutput> object whose attributes are used to convey information back and
forth between the underlying tree-view control and the event handler.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return:</emphasis></term>
<listitem>
<para>
Return true to indicate that the attributes in the <computeroutput>TvCustomDrawSimple</computeroutput> object are to be
used by the tree-view when drawing the item. Return false to indicate the tree-view should draw the item itself.
Returning false is the equivalent of using the <xref linkend="cnstCDRF_DODEFAULT"/> value for the response to the
tree-view.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The key to using custom draw is to examine the attributes of the <computeroutput>TvCustomDrawSimple</computeroutput>
object sent as the argument to the event handler to determine which item is about to be drawn, and then set attributes in
the object to customize the drawing of that item.
</para>
<para>
As an example, say the goal was to draw every other level in the tree-view with a different color. The event handler will
be invoked before each item is to be painted. The programmer would examine the <xref linkend="atrLevel"/> attrbute to
determine if it was an odd or even level. If the level was even, the color attributes, <xref linkend="atrClrTextBkTV"/>
and <xref linkend="atrClrTextTV"/>, would be set to the desired colors to color the item. If the level was odd, the
event handler would set the color attributes to the colors for a item at an odd level. Then the <xref
linkend="atrReplyTV"/> attribute would be set to a response value that indicates to the tree-view is to use the
information in the object to draw the item, and the event handler would return true to indicate that custom drawing is to
be done. The example below demonstrates this:
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example</emphasis></term>
<listitem>
<para>
The following example shows the code for the discussion in the remarks section
<programlisting>
<![CDATA[
::method onCustomDraw unguarded
use arg tvcds
if tvcds~level // 2 == 1 then do
tvcds~clrText = self~RGB(82, 61, 0)
tvcds~clrTextBk = self~RGB(250, 250, 250)
end
else do
tvcds~clrText = self~RGB(0, 20, 82)
tvcds~clrTextBk = self~RGB(250, 250, 250)
end
tvcds~reply = self~CDRF_NEWFONT
return .true
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End CustomDraw Event Handler -->
<section id="sctMethodsTvCustomDrawSimple"><title>Method Table</title>
<para>
The following table lists the class and instance methods of the <computeroutput>TvCustomDrawSimple</computeroutput> class:
<table id="tblMethodsTvCustomDrawSimple" frame="all"> <title>TvCustomDrawSimple Class Method Reference</title>
<tgroup cols="2">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<thead>
<row>
<entry>Method</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center"><emphasis role="bold">Class</emphasis></entry>
<entry align="center"><emphasis role="bold">Methods</emphasis></entry>
</row>
<row>
<entry><xref linkend="mthNewClsTvCustomDrawSimple"/></entry>
<entry>The Rexx programmer can not instantiate a <computeroutput>TvCustomDrawSimple</computeroutput>object, the ooDialog framework instantiates these objects</entry>
</row>
<row>
<entry align="center"><emphasis role="bold">Attribute</emphasis></entry>
<entry align="center"><emphasis role="bold">Methods</emphasis></entry>
</row>
<row>
<entry><xref linkend="atrClrTextTV"/></entry>
<entry>Reflects a custom color that the text of the tree-view item should be drawn with.</entry>
</row>
<row>
<entry><xref linkend="atrClrTextBkTV"/></entry>
<entry>Reflects a custom color that the text background of the tree-view item should be drawn with.</entry>
</row>
<row>
<entry><xref linkend="atrDrawStageTV"/></entry>
<entry>Reflects the draw <link linkend="sctCustomDrawOverview">stage</link> of the current paint cycle.</entry>
</row>
<row>
<entry><xref linkend="atrFontTV"/></entry>
<entry>Reflects a custom font that the tree-view should use for the text.</entry>
</row>
<row>
<entry><xref linkend="atrIDTV"/></entry>
<entry>Reflects the resource ID of the tree-view control sending the custom draw event notification message.</entry>
</row>
<row>
<entry><xref linkend="atrItemTV"/></entry>
<entry>Reflects the <xref linkend="defHandle"/> of the tree-view item that needs to be drawn.</entry>
</row>
<row>
<entry><xref linkend="atrItemDataClsTvCustomDrawSimple"/></entry>
<entry>Reflects the item <emphasis role="italic">item</emphasis> for the tree-view item that needs to be drawn.</entry>
</row>
<row>
<entry><xref linkend="atrLevel"/></entry>
<entry>Reflects the level in the tree of the item that needs to be drawn.</entry>
</row>
<row>
<entry><xref linkend="atrReplyTV"/></entry>
<entry>Reflects the <link linkend="sctConstantsClsCustomDraw">CDRF_*</link> response value that is used to reply to the event notification.</entry>
</row>
</tbody></tgroup>
</table>
</para>
</section>
<section id="mthNewClsTvCustomDrawSimple" xreflabel="new"><title>new (Class Method)</title>
<indexterm><primary>new</primary><secondary>TvCustomDrawSimple class</secondary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>new</secondary></indexterm>
<programlisting>
<![CDATA[
>>--new------------------------------------------><
]]>
</programlisting>
<para>
The <computeroutput>TvCustomDrawSimple</computeroutput> class can not be instantiated by the Rexx program. When
needed, the ooDialog framework instantiates a <computeroutput>TvCustomDrawSimple</computeroutput> object and passes
it to the dialog's custom draw event handler TODO need link.
</para>
</section> <!-- End TvCustomDrawSimple::new() -->
<section id="atrClrTextTV" xreflabel="clrText"><title>clrText (Attribute)</title>
<indexterm><primary>clrText</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>clrText</secondary></indexterm>
<programlisting>
<![CDATA[
>>--clrText-----------------------------------------------------><
>>--clrText-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects a custom color that the text of the tree-view item should be drawn with. This attribute is information sent back
to the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">clrText get:</emphasis></term>
<listitem>
<para>
This is a set-only attribute, it is information to be sent back to the tree-view control.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">clrText set:</emphasis></term>
<listitem>
<para>
Set this attribute to the color value for the text of the item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
To construct the proper color value use the <xref linkend="mthRGB"/> method of the
<computeroutput>CustomDraw</computeroutput> class. Note that the <xref linkend="cnstCLR_DEFAULT"/> value does not seem to
work with tree-views. Experimentation seems to show that the text color must be explicitly set to the proper value.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
In this example snippet of code the <emphasis role="italic">clrText</emphasis> attribute is set to a reddish color and
the background color is set to a yellowish color:
<programlisting>
<![CDATA[
cdInfo~clrText = self~RGB(247, 7, 59)
cdInfo~clrTextBk = self~RGB(245, 245, 127)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::clrText() [attribute] -->
<section id="atrClrTextBkTV" xreflabel="clrTextBk"><title>clrTextBk (Attribute)</title>
<indexterm><primary>clrTextBk</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>clrTextBk</secondary></indexterm>
<programlisting>
<![CDATA[
>>--clrTextBk-----------------------------------------------------><
>>--clrTextBk-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects a custom color that the text background of the tree-view item should be drawn with. This attribute is information
sent back to the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">clrTextBk get:</emphasis></term>
<listitem>
<para>
This is a set-only attribute, it is information to be sent back to the tree-view control.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">clrTextBk set:</emphasis></term>
<listitem>
<para>
Set this attribute to a custom color that should be used for the text background when the item is drawn.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
To construct the proper color value use the <xref linkend="mthRGB"/> method of the
<computeroutput>CustomDraw</computeroutput> class. Note that the <xref linkend="cnstCLR_DEFAULT"/> value does not seem to
work with tree-views. Experimentation seems to show that the text color must be explicitly set to the proper value.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
In this example snippet of code the <emphasis role="italic">clrText</emphasis> attribute is set to a reddish color and
the background color is set to a yellowish color:
<programlisting>
<![CDATA[
cdInfo~clrText = self~RGB(247, 7, 59)
cdInfo~clrTextBk = self~RGB(245, 245, 127)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::clrTextBk() [attribute] -->
<section id="atrDrawStageTV" xreflabel="drawStage"><title>drawStage (Attribute)</title>
<indexterm><primary>drawStage</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>drawStage</secondary></indexterm>
<programlisting>
<![CDATA[
>>--drawStage-----------------------------------------------------><
>>--drawStage-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects the draw <link linkend="sctCustomDrawOverview">stage</link> of the current paint cycle. This attribute is
information sent from the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">drawStage get:</emphasis></term>
<listitem>
<para>
Returns the draw stage constant value as sent by the tree-view control.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">drawStage set:</emphasis></term>
<listitem>
<para>
This is a get-only attribute. It is information sent from the tree-view control and can not be changed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
In <link linkend="sctSimpleCustomDraw">simple</link> custom draw, the ooDialog framework handles many of draw stage
notifications internaly and the event handler only gets invoked for the <xref linkend="cnstCDDS_ITEMPREPAINT"/> draw
stage.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::drawStage() [attribute] -->
<section id="atrFontTV" xreflabel="font"><title>font (Attribute)</title>
<indexterm><primary>font</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>font</secondary></indexterm>
<programlisting>
<![CDATA[
>>--font-----------------------------------------------------><
>>--font-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects a custom font that the tree-view should use for the text. This attribute is information sent back to the tree-view
control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">font get:</emphasis></term>
<listitem>
<para>
This is a set-only attribute, it is information to be sent back to the tree-view control.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">font set:</emphasis></term>
<listitem>
<para>
Set this attribute to the <xref linkend="defHandle"/> of a font to used for the text of the item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
To have the font drawn in the default font of the tree-view simply do not set the <emphasis role="italic">font</emphasis>
attribute to anything. For example, if the color for the font should be changed, but not the font itself, then the
programmer should not set this attribute.
</para>
<para>
Use the <xref linkend="mthCreateFontEx"/> method to get the handle of a font. Microsoft recommends that the response code
when a new font is to be used include <xref linkend="cnstCDRF_NEWFONT"/> value.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::font() [attribute] -->
<section id="atrIDTV" xreflabel="id"><title>id (Attribute)</title>
<indexterm><primary>id</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>id</secondary></indexterm>
<programlisting>
<![CDATA[
>>--id-----------------------------------------------------><
>>--id-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects the resource ID of the tree-view control sending the custom draw event notification message. This attribute is
information sent from the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">id get:</emphasis></term>
<listitem>
<para>
Returns the numeric <xref linkend="defResourceId"/> of the tree-view control that sent the custom draw event
notification.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">id set:</emphasis></term>
<listitem>
<para>
This is a get-only attribute. It is information sent from the tree-view control and can not be changed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example uses custom draw with a list-view and a tree-view. It uses the same event handler, <emphasis
role="italic">onCustomDraw</emphasis> for both controls and then use the <emphasis role="italic">id</emphasis> attribute
to determine which control has sent the event notification:
<programlisting>
<![CDATA[
self~customDraw
self~customDrawControl(IDC_LV_STATS, 'ListView', onCustomDraw)
self~customDrawControl(IDC_TV_PLAYERS, 'TreeView', onCustomDraw)
...
::method onCustomDraw unguarded
use arg customDrawInfo
if customDrawInfo~ID == .constDir[IDC_LV_STATS] then
return self~customDrawStats(customDrawInfo)
else
return self~customDrawPlayers(customDrawInfo)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::id() [attribute] -->
<section id="atrItemTV" xreflabel="item"><title>item (Attribute)</title>
<indexterm><primary>item</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>item</secondary></indexterm>
<programlisting>
<![CDATA[
>>--item-----------------------------------------------------><
>>--item-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects the <xref linkend="defHandle"/> of the tree-view item that needs to be drawn. This attribute is information sent
from the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">item get:</emphasis></term>
<listitem>
<para>
Returns the item handle that the event notifications is for.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">item set:</emphasis></term>
<listitem>
<para>
This is a get-only attribute. It is information sent from the tree-view control and can not be changed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
Use the item index to determine exactly which item or subitem is going to be painted.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example changes the font and colors of the selected item in a tree-view It uses the <emphasis
role="italic">item</emphasis> attribute to determine if item to be drawn is the selected item or not. Notice that if the
item is not the selected item, .false is returned which tells the tree-view to draw the item without any customization:
<programlisting>
<![CDATA[
bkClr = self~RGB(250, 250, 250)
selectedClr = self~RGB(82, 0, 20)
selectedFont = self~createFontEx('Courier New', 10)
self~customDraw
self~customDrawControl(IDC_TREE, 'TreeView')
...
::method onCustomDraw unguarded
expose tv bkClr selectedClr selectedFont
use arg tvcds
if tv~selected == tvcds~item then do
tvcds~clrText = selectedClr
tvcds~clrTextBk = bkClr
tvcds~font = selectedFont
tvcds~reply = self~CDRF_NEWFONT
return .true
end
return .false
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::item() [attribute] -->
<section id="atrItemDataClsTvCustomDrawSimple" xreflabel="itemData"><title>itemData (Attribute)</title>
<indexterm><primary>itemData</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>itemData</secondary></indexterm>
<programlisting>
<![CDATA[
>>--itemData-----------------------------------------------------><
>>--itemData-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects the item <emphasis role="italic">data</emphasis> for the tree-view item that needs to be drawn. This attribute is
information sent from the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">itemData get:</emphasis></term>
<listitem>
<para>
Returns the item data object for the item about to be drawn, or <computeroutput>.nil</computeroutput> if no item data was
set for the item.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">itemData set:</emphasis></term>
<listitem>
<para>
This is a get-only attribute. It is information sent from the tree-view control and can not be changed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The tree-view allows the programmer to associate a value with any tree-view item. This item data value is sent by the
tree-view in the event notification information. The programmer can set the item data for a tree-view item in several
ways, using the <xref linkend="mthSetItemDataClsTreeView"/> of the <xref linkend="clsTreeView"/> class, for example.
</para>
<para>
The <emphasis role="italic">itemData</emphasis> attribute could be used to help decide how to custom draw the tree-view
item or subitem, see the example below.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
In this example the color to draw the text for each item is stored in the item data for the item. This makes for a very
simple event handler, the text color is just set to whatever value the item data is:
<programlisting>
<![CDATA[
::method onCustomDraw unguarded
use arg tvcds
itemData = tvcds~itemData
tvcds~clrText = itemData~textColor
tvcds~clrTextBk = itemData~backgroundColor
tvcds~reply = self~CDRF_NEWFONT
return .true
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::itemData() [attribute] -->
<section id="atrLevel" xreflabel="level"><title>level (Attribute)</title>
<indexterm><primary>level</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>level</secondary></indexterm>
<programlisting>
<![CDATA[
>>--level-------------------------------------------------------><
>>--level= varName---------------------------------------------><
]]>
</programlisting>
<para>
Reflects the level in the tree of the item that needs to be drawn. This attribute is information sent from the tree-view
control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">level get:</emphasis></term>
<listitem>
<para>
Returns the level in the tree of the item to be drawn. The root of the tree is level 1. All direct children of the root
are at level 2. A direct child of any node at level 2 is at level 3, and so on.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">level set:</emphasis></term>
<listitem>
<para>
This is a get-only attribute. It is information sent from the tree-view control and can not be changed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This snippet of code colors each level in a tree in alternating colors:
<programlisting>
<![CDATA[
...
if tvcds~level // 2 == 1 then do
tvcds~clrText = oddLevelClr
tvcds~clrTextBk = bkClr
end
else do
tvcds~clrText = evenLevelClr
tvcds~clrTextBk = bkClr
end
tvcds~reply = self~CDRF_NEWFONT
return .true
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::level [attribute] -->
<section id="atrReplyTV" xreflabel="reply"><title>reply (Attribute)</title>
<indexterm><primary>reply</primary></indexterm>
<indexterm><primary>TvCustomDrawSimple class</primary><secondary>reply</secondary></indexterm>
<programlisting>
<![CDATA[
>>--reply-----------------------------------------------------><
>>--reply-=-varName-------------------------------------------><
]]>
</programlisting>
<para>
Reflects the <link linkend="sctConstantsClsCustomDraw">CDRF_*</link> response value that is used to reply to the event
notification. This attribute is information sent back to the tree-view control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">reply get:</emphasis></term>
<listitem>
<para>
This is a set-only attribute, it is information to be sent back to the tree-view control.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">reply set:</emphasis></term>
<listitem>
<para>
The <emphasis role="italic">reply</emphasis> attribute should be set to one of the CDRF_* constant values.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The <emphasis role="italic">reply</emphasis> attribute can be set to any valid combination of CDRF_* values. However, in
<emphasis role="italic">simple</emphasis> custom draw only a two values make any sense. These are CDRF_NOTIFYITEMDRAW,
and CDRF_NEWFONT.
</para>
<para>
Rather than set <emphasis role="italic">reply</emphasis> to CDRF_DODEFAULT and returning true from the event handler, the
programmer should just return false from the event handler. Using any of the other CDRF_* values, in simple custom draw,
will have no effect in the Rexx program and will cause the tree-view control to send unnecessary event notifications.
</para>
<para>
The only combination of CDRF_* values that make sense is combining CDRF_NEWFONT and CDRF_NOTIFYITEMDRAW. And, this is
never really needed. Using CDRF_NEWFONT is sufficient if the font is changed and CDRF_CDRF_NOTIFYITEMDRAW is sufficient
if any of the colors have been changed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect usage is detected.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End TvCustomDrawSimple::reply() [attribute] -->
</section> <!-- End TvCustomDrawSimple Class -->
</chapter>