Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[r9933]: docs / trunk / oodialog / en-US / windowExtensions.xml Maximize Restore History

Download this file

windowExtensions.xml    3216 lines (3046 with data), 125.0 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
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section 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-2014 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.
#
#########################################################################
-->
<section id="clsWindowExtensions" xreflabel="WindowsExtensions"><title>WindowExtensions Mixin Class</title>
<indexterm><primary>WindowExtensions Class</primary></indexterm>
<para>
WindowExtensions is a mixin class with methods that <emphasis role="italic">should</emphasis> be common to all
windows. The class name implies it is meant to be an extension of the <xref linkend="clsWindowBase"/>
class, providing more sophisticated window methods. It is inherited by both the
<xref linkend="chpDialogObject"/> and the dialog <xref linkend="chpDialogControlObject"/> objects.
</para>
<para>
Unfortunately, <emphasis role="bold">many</emphasis> of the methods placed in the WindowExtensions class were not
really <emphasis role="italic">window</emphasis> methods. Rather they were extensions to the ooDialog framework.
Otherwise in the <link linkend="sctHistory">effort</link> to simplify ooDialog all the methods would have been moved
to the WindowBase class and the WindowExtensions class would have been eliminated. However, the methods remaining in
WindowExtensions, do not belong in a <emphasis role="italic">window</emphasis> class, so that
simplification could not be done.
</para>
<para>
In addition, most of the methods do not really belong to a <emphasis role="italic">dialog control</emphasis> specific
class. But, since historically the dialog control did have these methods, they need to remain a part of the dialog
control object for backwards compatibility. Therefore, both the name of the class and the usage of its methods from a
dialog control object are not really appropriate.
</para>
<section id="sctMethodsWindowExtensions"><title>Method Table</title>
<para>
The following table lists the instance methods of the <computeroutput>WindowExtensions</computeroutput> Mixin Class.
</para>
<table id="tblMethodsWindowExtensions" frame="all"> <title>WindowExtensions Method Reference</title>
<tgroup cols="2">
<colspec colwidth="2*" /><colspec colwidth="7*" />
<thead>
<row>
<entry>Method</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<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="mthCreateBrush"/></entry>
<entry>Creates a logical brush that has the specified style, color, and pattern.</entry>
</row>
<row>
<entry><xref linkend="mthCreateFont"/></entry>
<entry>Returns a handle to a logical font, the implementation is <emphasis role="bold">incorrect</emphasis>.</entry>
</row>
<row>
<entry><xref linkend="mthCreatePen"/></entry>
<entry>Creates a logical pen that has the specified style, width, and color.</entry>
</row>
<row>
<entry><xref linkend="mthCreateFontEx"/></entry>
<entry>Retrieves a handle to a logical font from the system font manager</entry>
</row>
<row>
<entry><xref linkend="mthDeleteFont"/></entry>
<entry>Deletes a font returned from <emphasis role="italic">createFontEx</emphasis> or <emphasis role="italic">createFont</emphasis>.</entry>
</row>
<row>
<entry><xref linkend="mthDeleteObject"/></entry>
<entry>Deletes a graphic object,</entry>
</row>
<row>
<entry><xref linkend="mthDrawAngleArc"/></entry>
<entry>Draws a partial circle (arc) and a line connecting the start drawing point with the start of the arc.</entry>
</row>
<row>
<entry><xref linkend="mthDrawArc"/></entry>
<entry>Draws a circle or ellipse withi the given device context using the active pen.</entry>
</row>
<row>
<entry><xref linkend="mthDrawLine"/></entry>
<entry>Draws a line within the device context using the active pen.</entry>
</row>
<row>
<entry><xref linkend="mthDrawPie"/></entry>
<entry>Draws and fills a pie of a circle or ellipse within the given device context using the active brush and pen.</entry>
</row>
<row>
<entry><xref linkend="mthDrawPixel"/></entry>
<entry>Draws a pixel within the device context.</entry>
</row>
<row>
<entry><xref linkend="mthFillDrawing"/></entry>
<entry>Fills an area of the display surface with the current brush. The area to be filled is outlined by the color specified.</entry>
</row>
<row>
<entry><xref linkend="mthFillRect"/></entry>
<entry>Fills a rectangle using the specified brush within the specified device context.</entry>
</row>
<row>
<entry><xref linkend="mthFontColor"/></entry>
<entry>Sets the font color for a device context.</entry>
</row>
<row>
<entry><xref linkend="mthFontToDC"/></entry>
<entry>Loads a font into a device context and returns the handle of the previous font.</entry>
</row>
<row>
<entry><xref linkend="mthFreeDC"/></entry>
<entry>Releases a device context.</entry>
</row>
<row>
<entry><xref linkend="mthGetArcDirection"/></entry>
<entry>Returns the current drawing direction.</entry>
</row>
<row>
<entry><xref linkend="mthGetFont"/></entry>
<entry>Returns the font used by the dialog.</entry>
</row>
<row>
<entry><xref linkend="mthGetPixel"/></entry>
<entry>Returns the color number of a pixel within the device context.</entry>
</row>
<row>
<entry><xref linkend="mthGetSysBrush"/></entry>
<entry>Retrieves a handle to a logical brush that corresponds to the specified system color index.</entry>
</row>
<row>
<entry><xref linkend="mthGetTextAlign"/></entry>
<entry>Gets the text alignment setting for the specified device context.</entry>
</row>
<row>
<entry><xref linkend="mthGetTextExtent"/></entry>
<entry>Gets the bounding rectangle, as a <xref linkend="clsSize"/> object for the specified text, if it were to be drawn in the specified device context.</entry>
</row>
<row>
<entry><xref linkend="mthHScrollPos"/></entry>
<entry>Returns the position of the horizontal scroll bar in the dialog.</entry>
</row>
<row>
<entry><xref linkend="mthLoadBitmap"/></entry>
<entry>Loads a bitmap from a file into memory and returns the handle to the bitmap.</entry>
</row>
<row>
<entry><xref linkend="mthObjectToDC"/></entry>
<entry>Loads a graphic object into a device context.</entry>
</row>
<row>
<entry><xref linkend="mthOpaqueText"/></entry>
<entry>Sets the text drawing mode in a device context to opaque, (background is redrawn with the current brush.)</entry>
</row>
<row>
<entry><xref linkend="mthRectangle"/></entry>
<entry>Draws a rectangle within the given device context.</entry>
</row>
<row>
<entry><xref linkend="mthRemoveBitmap"/></entry>
<entry>Frees an in-memory bitmap that was loaded through the <emphasis role="italic">loadBitmap</emphasis> method.</entry>
</row>
<row>
<entry><xref linkend="mthScrollClsWE"/></entry>
<entry>Scrolls the contents of the dialog's client area by the amount specified.</entry>
</row>
<row>
<entry><xref linkend="mthSetArcDirection"/></entry>
<entry>Sets the current drawing direction.</entry>
</row>
<row>
<entry><xref linkend="mthSetFont"/></entry>
<entry>Sets a new font to be used by the dialog.</entry>
</row>
<row>
<entry><xref linkend="mthSetHScrollPos"/></entry>
<entry>Sets the thumb position of the horizontal scroll bar contained in the dialog.</entry>
</row>
<row>
<entry><xref linkend="mthSetTextAlign"/></entry>
<entry>Sets the text alignment option for the specified device context.</entry>
</row>
<row>
<entry><xref linkend="mthSetVScrollPos"/></entry>
<entry>Sets the thumb position of the vertical scroll bar contained in the dialog.</entry>
</row>
<row>
<entry><xref linkend="mthTransparentText"/></entry>
<entry>Sets the text drawing mode in a device context to transparent, (background is not changed.)</entry>
</row>
<row>
<entry><xref linkend="mthVScrollPos"/></entry>
<entry>Returns the position of the vertical scroll bar in the dialog.</entry>
</row>
<row>
<entry><xref linkend="mthWrite"/></entry>
<entry>Writes text in a dialog using the given font, style, and color at the position specified.</entry>
</row>
<row>
<entry><xref linkend="mthWriteDirect"/></entry>
<entry>Writes text in a dialog at the position specified using a device context.</entry>
</row>
</tbody></tgroup>
</table>
</section>
<section id="mthCreateBrush" xreflabel="createBrush"><title>createBrush</title>
<indexterm><primary>createBrush</primary><secondary>WindowExtensions</secondary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>createBrush</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>createBrush</secondary></indexterm>
<programlisting>
<![CDATA[
>>--createBrush(--+---------+--+------------------+--)-------------------------><
+--color--+ +-,-brushSpecifier-+
]]>
</programlisting>
<para>
The <emphasis role="italic">createBrush</emphasis> method creates a logical brush that has the specified style, color,
and pattern.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
Both arguments are optional. If both arguments are omitted then a hollow brush is created. Otherwise, the arguments
are:
<variablelist>
<varlistentry><term>color [optional]</term>
<listitem>
<para>
The <xref linkend="defColor"/>. When this argument is omitted and <emphasis
role="italic">brushSpecifier</emphasis> is used, the color number defaults to 1.
</para>
</listitem></varlistentry>
<varlistentry><term>brushSpecifier [optional]</term>
<listitem>
<para>
If this argument is omitted a solid brush using the color specified is created. Otherwise, this argument can be
the name of a bitmap file, or one of the following keywords. The keywords create a hatched brush. A bitmap file
name will cause the bitmap to be loaded into memory and then used for the brush. Case is not significant in the
keywords.
</para>
<para>
<simplelist type='vert' columns='2'>
<member>UPDIAGONAL </member>
<member>CROSS </member>
<member>DIAGCROSS </member>
<member>DOWNDIAGONAL</member>
<member>HORIZONTAL </member>
<member>VERTICAL </member>
</simplelist>
<variablelist>
<varlistentry><term>UPDIAGONAL</term>
<listitem>
<para>
A 45-degree upward, left-to-right hatch.
</para>
</listitem></varlistentry>
<varlistentry><term>CROSS</term>
<listitem>
<para>
A horizontal and vertical crosshatch.
</para>
</listitem></varlistentry>
<varlistentry><term>DIAGCROSS</term>
<listitem>
<para>
A 45-degree crosshatch.
</para>
</listitem></varlistentry>
<varlistentry><term>DOWNDIAGONAL</term>
<listitem>
<para>
A 45-degree downward, left-to-right hatch.
</para>
</listitem></varlistentry>
<varlistentry><term>HORIZONTAL</term>
<listitem>
<para>
A horizontal hatch.
</para>
</listitem></varlistentry>
<varlistentry><term>VERTICAL</term>
<listitem>
<para>
A vertical hatch.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
A brush is a bitmap that the operating system uses to paint the interiors of filled shapes. After the programmer
creates a brush, it can then be selected into a device context using the
<xref linkend="mthObjectToDC"/>() method. When the brush is no longer needed use the
<xref linkend="mthDeleteObject"/>() method to release the operating resources used by the brush.
</para>
<para>
The <emphasis role="italic">createBrush</emphasis> method here is almost identical to the
<xref linkend="mthCreateBrushClsDialogExtensions"/> method of the
<xref linkend="clsDialogExtensions"/> class. The method documented here is a method of the
<xref linkend="clsWindowExtensions"/> class and is therefore inherited by both the
<xref linkend="chpDialogObject"/> and the dialog <xref linkend="chpDialogControlObject"/> objects.
</para>
<para>
However, in the dialog object, the <emphasis role="italic">createBrush</emphasis> method of the
<computeroutput>DialogExtensions</computeroutput> class over-rides this method. Therefore, this documentation is
essentially the dialog control's <emphasis role="italic">createBrush</emphasis> documentation and the
<xref linkend="mthCreateBrushClsDialogExtensions"/> documentation is for the dialog object's <emphasis
role="italic">createBrush</emphasis> method.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details:</emphasis></term>
<listitem>
<para>
Sets the <xref linkend="dotSystemErrorCode"/>.
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthCreateFont" xreflabel="createFont"><title>createFont</title>
<indexterm><primary>createFont</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>createFont</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>createFont</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>createFont</secondary></indexterm>
<programlisting>
<![CDATA[
>>--createFont(--+----------+-+------------+-+---------+-+-------------+--)----><
+-fontName-+ +-,-fontSize-+ +-,-style-+ +-,-fontWidth-+
]]>
</programlisting>
<para>
The createFont method creates a font and returns its handle.
</para>
<para>
<emphasis role="bold">Note</emphasis> the implementation of this method is incorrect. It does not
return the font specified. The correct method to use is
<xref linkend="mthCreateFontEx"/>(). <computeroutput>createFont</computeroutput>() is
maintained for program compatibility. Some existing programs may rely on using the (incorrect) font
returned.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>fontName [optional]</term>
<listitem>
<para>
The name of the font. the default is System.
</para>
</listitem></varlistentry>
<varlistentry><term>fontSize [optional]</term>
<listitem>
<para>
The size of the font. The default is 10.
</para>
</listitem></varlistentry>
<varlistentry><term>style [optional]</term>
<listitem>
<para>
One or more of the following keyword, separated by blanks.
<simplelist type='horiz' columns='3'>
<member>THIN </member>
<member>EXTRALIGHT</member>
<member>LIGHT </member>
<member>MEDIUM </member>
<member>SEMIBOLD </member>
<member>EXTRABOLD </member>
<member>BOLD </member>
<member>HEAVY </member>
<member>UNDERLINE</member>
<member>ITALIC </member>
<member>STRIKEOUT</member>
</simplelist>
</para>
</listitem></varlistentry>
<varlistentry><term>fontWidth [optional]</term>
<listitem>
<para>
The average width of the characters in the font. If omitted, the width is set to the value of <emphasis
role="italic">fontSize</emphasis>.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthCreateFontEx" xreflabel="createFontEx"><title>createFontEx</title>
<indexterm><primary>createFontEx</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>createFontEx</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>createFontEx</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>createFontEx</secondary></indexterm>
<programlisting>
<![CDATA[
>>--createFontEx(--fontName-+--------------+--+---------------+--)-------------><
+-,-pointSize--+ +-,-additional--+
]]>
</programlisting>
<para>
Creates a logical font with the characteristics requested. This should be the preferred method to create fonts in ooDialog.
The <xref linkend="mthCreateFont"/> method does <emphasis role="bold">not</emphasis> properly create the font requested.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term><emphasis role="italic">fontName [required]</emphasis></term>
<listitem>
<para>
The typeface name of the requested font. The <emphasis role="italic">fonts</emphasis> folder, accessed from the Control
Panel on Windows, lists the typeface names of all fonts installed on the system.
</para>
<para>
As noted in the remarks section, the font mapper will try to substitute a similar font if the typeface name does not
match any of the installed fonts.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">pointSize [optional]</emphasis></term>
<listitem>
<para>
The point size of the requested font. The default is 8.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="italic">additional [optional]</emphasis></term>
<listitem>
<para>
Specifies additional characteristics of the requested font. If this argument is omitted, deault values are used for all
characteristics. The <emphasis role="italic">additional</emphasis> argument can be either:
</para>
<itemizedlist>
<listitem>
<para>
A <computeroutput>.Directory</computeroutput> object whose indexes specify the characteristics.
</para>
</listitem>
<listitem>
<para>
A list of blank separated keywords that specify the characteristics.
</para>
</listitem>
</itemizedlist>
<variablelist>
<varlistentry><term><emphasis role="bold">Directory Object:</emphasis></term>
<listitem>
<para>
The indexes of the object specify the additional font characteristics. For any missing index, the default value is
used for that characteristic. Unrecogized indexes are ignored. The indexes are listed below. Each index maps to an
argument of the <computeroutput>CreateFont()</computeroutput> Win32 API. The Rexx programmer can, and maybe should,
consult the MSDN <xref linkend="defWindowsDoc"/> to get complete information on the individual arguments. The value
for each index must be either numeric or logical, depending on the index.
</para>
<para>
The indexes below are listed in the same order as the arguments to <computeroutput>CreateFont()</computeroutput> from
<emphasis role="italic">nWidth</emphasis> to <emphasis role="italic">fdwPitchAndFamily</emphasis>. Where an index has
an internal link, the link provides some more information on the possible values for index. The valid indexes are:
</para>
<variablelist>
<varlistentry><term><xref linkend="cfxWidth"/></term>
<listitem>
<para>
A non-negative whole number that specifies the average width of the characters in the requested font. The default
is 0 which tells the font mapper to choose a closest match value.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxEscarpment"/></term>
<listitem>
<para>
A non-negative whole number that specifies the angle between the escapement vector and the x-axis of the device.
The default is 0.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxOrientation"/></term>
<listitem>
<para>
A non-negative whole number that specifies the angle between each character's base line and the x-axis of the
device. The default is 0.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxWeight"/></term>
<listitem>
<para>
A non-negative whole number in the range of 0 through 1,000 that specifies the weight of the font. The default is
FW_NORMAL, which is 400.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">ITALIC</emphasis></term>
<listitem>
<para>
True for an italic font. The default is false.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">UNDERLINE</emphasis></term>
<listitem>
<para>
True for an underline font. The default is false.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">STRIKEOUT</emphasis></term>
<listitem>
<para>
True for a strikeout font. The default is false.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxCharset"/></term>
<listitem>
<para>
A non-negative whole number that specifies the character set. The default is DEFAULT_CHARSET.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxOutputPrecision"/></term>
<listitem>
<para>
A non-negative whole number that specifies the output precision. The default is OUT_TT_PRECIS.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxClipPrecision"/></term>
<listitem>
<para>
A non-negative whole number that specifies the clipping precision. The default is CLIP_DEFAULT_PRECIS.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxQuality"/></term>
<listitem>
<para>
A non-negative whole number that specifies the output quality. The default is DEFAULT_QUALITY.
</para>
</listitem></varlistentry>
<varlistentry><term><xref linkend="cfxPitchAndFamily"/></term>
<listitem>
<para>
A non-negative whole number that specifies the pitch and family of the font. The default is FF_DONTCARE.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Keyword List:</emphasis></term>
<listitem>
<para>
One or more of the following keywords, separated by blanks. Case is not significant. The UNDERLINE, ITALIC, and
STRIKEOUT keywords specify the corresponing type of font. All the other keywords specify the weight of the font.
Using more that one of the weight keywords is the list is undefined:
</para>
<simplelist type='horiz' columns='3'>
<member>THIN </member>
<member>EXTRALIGHT</member>
<member>LIGHT </member>
<member>MEDIUM </member>
<member>SEMIBOLD </member>
<member>EXTRABOLD </member>
<member>BOLD </member>
<member>HEAVY </member>
<member>UNDERLINE</member>
<member>ITALIC </member>
<member>STRIKEOUT</member>
</simplelist>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
The return is a handle to a font that can be used in any ooDialog method that requires a font
handle. Because of the way the font mapper works, it is hard to conceive of a circustance where
this method would fail. However, if it were to fail, the
<xref linkend="dotSystemErrorCode"/> would be non-zero.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The returned font can be used in any method that takes a font, such as, <xref linkend="mthSetFont"/>, <xref
linkend="mthSetControlFont"/>, or <xref linkend="mthFontToDC"/>. When the programmer is done with the font, the operating
system resources used by the font can be released with the <xref linkend="mthDeleteFont"/> method.
</para>
<para>
The Windows operating system uses a font mapper to map a logical font to the characteristics of the font requested. Because
available fonts can vary from system to system, the returned font is not always the same as the requested font. For
example, if a font named Palatino is requested, but no such font is available on the system, the font mapper will
substitute a font that has similar attributes but a different name.
</para>
<para>
The interface to the font mapper takes a wide range of arguments to specify many different attributes of the requested
font. The <emphasis role="italic">additional</emphasis> argument gives the ooRexx programmer the ability to use any, or
all, of these arguments. On the other hand, The <emphasis role="italic">createFontEx</emphasis> method has good defaults
for each of the arguments, allowing the programmer to use the method with a minimum of effort.
</para>
<para>
If an application will run on different systems, where the programmer does not know in advance what fonts will be available
on each system, carefully specifying the font characteristics will help give the application the same look on each system.
The font mapper will pick a font on each system that most closely matches the requested attributes.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details:</emphasis></term>
<listitem>
<para>
This method provides an interface to the Win32 API: <computeroutput>CreateFont()</computeroutput>. Use the MSDN <xref
linkend="defWindowsDoc"/> documentation to get more information on the arguments to this method.
</para>
<para>
Sets the <xref linkend="dotSystemErrorCode"/>.
</para>
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example creates a 16 point, italic, underlined, Ariel font and then uses the font for a static
control.
<programlisting>
<![CDATA[
additional = .directory~new
additional~italic = .true
additional~underline = .true
hFont = self~createFontEx("Arial", 16, additional)
hOldFont = self~newStatic(IDC_ST_ALERT)~setFont(hFont)
...
]]>
</programlisting>
</para>
<para>
This example creates a 14 point, bold, italic, Times New Roman font and instructs the font mapper
to only choose from true type fonts. If there are no true type fonts installed on the system, then
the font mapper returns to its default behavior.
<programlisting>
<![CDATA[
FW_BOLD = 700
OUT_TT_ONLY_PRECIS = 7
additional = .directory~new
additional~italic = .true
additional~weight = FW_BOLD
additional~outputPrecison = OUT_TT_ONLY_PRECIS
hFont = self~createFontEx("Times New Roman", 14, additional)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
<section id="sctFontAttributes"><title>createFontEx Argument Values</title>
<para>
The following list is the indexes of the <computeroutput>.Directory</computeroutput> object that can be
used for the third argument of the <xref linkend="mthCreateFontEx"/>() method. The
list provides additional information on the meaning of values that can be assigned to each index.
</para>
<variablelist>
<varlistentry id="cfxWidth" xreflabel="WIDTH"><term><emphasis role="bold">width</emphasis> Must be an integer.</term>
<listitem>
<para>
Specifies the average width, in logical units, of the characters in the requested font. The default
value of zero, tells the font mapper to choose a closest match value. This is likely to produce the
best results, unless the programmer has some need that requires specifying the character width.
</para>
<para>
The closest match value is determined by comparing the absolute values of the difference between
the current device's aspect ratio and the digitized aspect ratio of available fonts.
</para>
</listitem></varlistentry>
<varlistentry id="cfxEscarpment" xreflabel="ESCARPMENT"><term><emphasis role="bold">escarpment</emphasis> Must be an integer.</term>
<listitem>
<para>
Specifies the angle, in tenths of degrees, between the escapement vector and the x-axis of the
device. The escapement vector is parallel to the base line of a row of text. Windows has no
predefined values for this argument.
</para>
</listitem></varlistentry>
<varlistentry id="cfxOrientation" xreflabel="ORIENTATION"><term><emphasis role="bold">orientation</emphasis> Must be an integer.</term>
<listitem>
<para>
Specifies the angle, in tenths of degrees, between each character's base line and the x-axis of the
device. Windows has no predefined values for this argument.
</para>
</listitem></varlistentry>
<varlistentry id="cfxWeight" xreflabel="WEIGHT"><term><emphasis role="bold">weight</emphasis> Must be an integer.</term>
<listitem>
<para>
Specifies the weight of the font in the range 0 through 1000. For example, 400 is normal and 700 is
bold. If this value is zero, a default weight is used. The following table shows Windows predefined
values for this argument:
</para>
<informaltable id="tblCfxWeight" frame="all">
<tgroup cols="2">
<colspec align='left' colwidth='4*' />
<colspec align='right' colwidth='2*' />
<thead>
<row><entry>Value</entry><entry>Weight</entry></row>
</thead>
<tbody>
<row><entry>FW_DONTCARE </entry><entry> 0</entry></row>
<row><entry>FW_THIN </entry><entry>100</entry></row>
<row><entry>FW_EXTRALIGHT</entry><entry>200</entry></row>
<row><entry>FW_ULTRALIGHT</entry><entry>200</entry></row>
<row><entry>FW_LIGHT </entry><entry>300</entry></row>
<row><entry>FW_NORMAL </entry><entry>400</entry></row>
<row><entry>FW_REGULAR </entry><entry>400</entry></row>
<row><entry>FW_MEDIUM </entry><entry>500</entry></row>
<row><entry>FW_SEMIBOLD </entry><entry>600</entry></row>
<row><entry>FW_DEMIBOLD </entry><entry>600</entry></row>
<row><entry>FW_BOLD </entry><entry>700</entry></row>
<row><entry>FW_EXTRABOLD </entry><entry>800</entry></row>
<row><entry>FW_ULTRABOLD </entry><entry>800</entry></row>
<row><entry>FW_HEAVY </entry><entry>900</entry></row>
<row><entry>FW_BLACK </entry><entry>900</entry></row>
</tbody></tgroup>
</informaltable>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">italic</emphasis> Must be a logical.</term>
<listitem>
<para>
Set this index to <computeroutput>.true</computeroutput> to request an italic font. The default is
<computeroutput>.false</computeroutput>.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">underline</emphasis> Must be a logical.</term>
<listitem>
<para>
Set this index to <computeroutput>.true</computeroutput> to request an underlined font. The default
is <computeroutput>.false</computeroutput>.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">strikeout</emphasis> Must be a logical.</term>
<listitem>
<para>
Set this index to <computeroutput>.true</computeroutput> to request a strike out font. The default
is <computeroutput>.false</computeroutput>.
</para>
</listitem></varlistentry>
<varlistentry id="cfxCharset" xreflabel="CHARSET"><term><emphasis role="bold">charset</emphasis> Must be an integer.</term>
<listitem>
<para>
Specifies the character set. The following values are predefined in Windows:
</para>
<informaltable id="tblCfxCharset" frame="all">
<tgroup cols="2">
<colspec align='left' colwidth='4*' />
<colspec align='right' colwidth='2*' />
<thead>
<row><entry>Symbol</entry><entry>Value</entry></row>
</thead>
<tbody>
<row><entry>ANSI_CHARSET </entry><entry>0</entry></row>
<row><entry>BALTIC_CHARSET </entry><entry>186</entry></row>
<row><entry>CHINESEBIG5_CHARSET</entry><entry>136</entry></row>
<row><entry>DEFAULT_CHARSET </entry><entry>1</entry></row>
<row><entry>EASTEUROPE_CHARSET </entry><entry>238</entry></row>
<row><entry>GB2312_CHARSET </entry><entry>134</entry></row>
<row><entry>GREEK_CHARSET </entry><entry>161</entry></row>
<row><entry>HANGUL_CHARSET </entry><entry>129</entry></row>
<row><entry>MAC_CHARSET </entry><entry>77</entry></row>
<row><entry>OEM_CHARSET </entry><entry>255</entry></row>
<row><entry>RUSSIAN_CHARSET </entry><entry>204</entry></row>
<row><entry>SHIFTJIS_CHARSET </entry><entry>128</entry></row>
<row><entry>SYMBOL_CHARSET </entry><entry>2</entry></row>
<row><entry>TURKISH_CHARSET </entry><entry>162</entry></row>
<row><entry>VIETNAMESE_CHARSET </entry><entry>163</entry></row>
</tbody></tgroup>
</informaltable>
</listitem></varlistentry>
<varlistentry id="cfxOutputPrecision" xreflabel="OUTPUTPRECSION"><term><emphasis role="bold">outputPrecsion</emphasis> Must be an integer.</term>
<listitem>
<para>
The output precision defines how closely the output must match the requested font's height, width,
character orientation, escapement, pitch, and font type.
</para>
<para>
Applications can use the OUT_DEVICE_PRECIS, OUT_RASTER_PRECIS, OUT_TT_PRECIS, and
OUT_PS_ONLY_PRECIS values to control how the font mapper chooses a font when the operating system
contains more than one font with a specified name. For example, if an operating system contains a
font named Symbol in raster and TrueType form, specifying OUT_TT_PRECIS forces the font mapper to
choose the TrueType version. Specifying OUT_TT_ONLY_PRECIS forces the font mapper to choose a
TrueType font, even if it must substitute a TrueType font of another name.
</para>
<para>
It can be one of the following values:
</para>
<informaltable id="tblCfxOutputPrecision" frame="all" pgwide='1'>
<tgroup cols="3">
<colspec align='left' colwidth='3*' />
<colspec align='left' colwidth='4*' />
<colspec align='right' colwidth='1*' />
<thead>
<row><entry>Symbol</entry><entry>Meaning</entry><entry>Value</entry></row>
</thead>
<tbody>
<row>
<entry>OUT_CHARACTER_PRECIS</entry>
<entry>Not used.</entry>
<entry>2</entry></row>
<row>
<entry>OUT_DEFAULT_PRECIS </entry>
<entry>
Specifies the default font mapper behavior.
</entry>
<entry>0</entry></row>
<row>
<entry>OUT_DEVICE_PRECIS </entry>
<entry>
Instructs the font mapper to choose a Device font when the system contains multiple fonts with the same name.
</entry>
<entry>5</entry></row>
<row>
<entry>OUT_OUTLINE_PRECIS </entry>
<entry>
This value instructs the font mapper to choose from TrueType and other outline-based fonts.
</entry>
<entry>8</entry></row>
<row>
<entry>OUT_PS_ONLY_PRECIS </entry>
<entry>
Instructs the font mapper to choose from only PostScript fonts. If there are no PostScript fonts installed in the
system, the font mapper returns to default behavior.
</entry>
<entry>10</entry></row>
<row>
<entry>OUT_RASTER_PRECIS </entry>
<entry>
Instructs the font mapper to choose a raster font when the system contains multiple fonts with the same name.
</entry>
<entry>6</entry></row>
<row>
<entry>OUT_STRING_PRECIS </entry>
<entry>Not used.</entry>
<entry>1</entry></row>
<row>
<entry>OUT_STROKE_PRECIS </entry>
<entry>Not used.</entry>
<entry>3</entry></row>
<row>
<entry>OUT_TT_ONLY_PRECIS </entry>
<entry>
Instructs the font mapper to choose from only TrueType fonts. If there are no TrueType fonts installed in the system,
the font mapper returns to default behavior.
</entry>
<entry>7</entry></row>
<row>
<entry>OUT_TT_PRECIS </entry>
<entry>
Instructs the font mapper to choose a TrueType font when the system contains multiple fonts with the same name.
</entry>
<entry>4</entry></row>
</tbody></tgroup>
</informaltable>
</listitem></varlistentry>
<varlistentry id="cfxClipPrecision" xreflabel="CLIPPRECISION"><term><emphasis role="bold">clipPrecision</emphasis> Must be an integer.</term>
<listitem>
<para>
The clipping precision defines how to clip characters that are partially outside the clipping
region. It can be one or more of the following values. Use
.DlgUtil~<xref linkend="mthOrClsDlgUtil"/> to combine values.
</para>
<informaltable id="tblCfxClipPrecision" frame="all" pgwide="1">
<tgroup cols="3">
<colspec align='left' colwidth='2*' />
<colspec align='left' colwidth='3*' />
<colspec align='right' colwidth='1*' />
<thead>
<row><entry>Symbol</entry><entry>Meaning</entry><entry>Value</entry></row>
</thead>
<tbody>
<row>
<entry>CLIP_CHARACTER_PRECIS
</entry><entry>Not used.</entry>
<entry>1 (0x01)</entry>
</row>
<row>
<entry>CLIP_DEFAULT_PRECIS</entry>
<entry>Specifies default clipping behavior.</entry>
<entry>0 (0x00)</entry>
</row>
<row>
<entry>CLIP_DFA_DISABLE</entry>
<entry>
Windows XP SP1: Turns off font association for the font. Note that this flag is not guaranteed to have any effect on
any platform after Windows Server 2003.
</entry>
<entry>64 (0x40)</entry>
</row>
<row>
<entry>CLIP_EMBEDDED</entry>
<entry>
You must specify this flag to use an embedded read-only font.
</entry>
<entry>128 (0x80)</entry>
</row>
<row>
<entry>CLIP_LH_ANGLES</entry>
<entry>
When this value is used, the rotation for all fonts depends on whether the orientation of the coordinate system is
left-handed or right-handed. If not used, device fonts always rotate counterclockwise, but the rotation of other
fonts is dependent on the orientation of the coordinate system. For more information about the orientation of
coordinate systems, see the description of the orientation parameter.
</entry>
<entry>16 (0x10)</entry>
</row>
<row>
<entry>CLIP_MASK</entry>
<entry>Not used.</entry>
<entry>15 (0x0f)</entry>
</row>
<row>
<entry>CLIP_STROKE_PRECIS</entry>
<entry>Not used.</entry>
<entry>2 (0x02)</entry>
</row>
<row>
<entry>CLIP_TT_ALWAYS</entry>
<entry>Not used.</entry>
<entry>32 (0x20)</entry>
</row>
</tbody></tgroup>
</informaltable>
</listitem></varlistentry>
<varlistentry id="cfxQuality" xreflabel="QUALITY"><term><emphasis role="bold">quality</emphasis> Must be an integer.</term>
<listitem>
<para>
The output quality defines how carefully the font mapper must attempt to match the logical-font
attributes to those of an actual physical font.
</para>
<para>
<emphasis role="bold">Note</emphasis> that if neither ANTIALIASED_QUALITY nor
NONANTIALIASED_QUALITY is selected, the font is antialiased only if the user chooses "smooth screen
fonts" in Control Panel. Quality can be one of the following values:
</para>
<informaltable id="tblCfxQuality" frame="all" pgwide="1">
<tgroup cols="3">
<colspec align='left' colwidth='3*' />
<colspec align='left' colwidth='4*' />
<colspec align='right' colwidth='1*' />
<thead>
<row><entry>Symbol</entry><entry>Meaning</entry><entry>Value</entry></row>
</thead>
<tbody>
<row>
<entry>ANTIALIASED_QUALITY</entry>
<entry>
Font is antialiased, or smoothed, if the font supports it and the size of the font is not too small or too large.
</entry>
<entry>4</entry>
</row>
<row>
<entry>CLEARTYPE_QUALITY</entry>
<entry>
If set, text is rendered (when possible) using ClearType antialiasing method. See Remarks for more information.
</entry>
<entry>6</entry>
</row>
<row>
<entry>DEFAULT_QUALITY</entry>
<entry>
Appearance of the font does not matter.
</entry>
<entry>0</entry>
</row>
<row>
<entry>DRAFT_QUALITY</entry>
<entry>
Appearance of the font is less important than when the PROOF_QUALITY value is used. For GDI raster fonts, scaling is
enabled, which means that more font sizes are available, but the quality may be lower. Bold, italic, underline, and
strikeout fonts are synthesized, if necessary.
</entry>
<entry>1</entry>
</row>
<row>
<entry>NONANTIALIASED_QUALITY</entry>
<entry>
Font is never antialiased, that is, font smoothing is not done.
</entry>
<entry>3</entry>
</row>
<row>
<entry>PROOF_QUALITY</entry>
<entry>
Character quality of the font is more important than exact matching of the logical-font attributes. For GDI raster
fonts, scaling is disabled and the font closest in size is chosen. Although the chosen font size may not be mapped
exactly when PROOF_QUALITY is used, the quality of the font is high and there is no distortion of appearance. Bold,
italic, underline, and strikeout fonts are synthesized, if necessary.
</entry>
<entry>2</entry>
</row>
</tbody></tgroup>
</informaltable>
</listitem></varlistentry>
<varlistentry id="cfxPitchAndFamily" xreflabel="PITCHANDFAMILY"><term><emphasis role="bold">pitchAndFamily</emphasis> Must be an integer.</term>
<listitem>
<para>
Specifies the pitch and family of the font. Font families describe the look of a font in a general
way. They are intended for specifying fonts when the exact typeface requested is not available.
</para>
<para>
Combine one pitch value with one family value. The values are combined using a boolean or, but in
this case they could simply be added. The programmer can also use
.DlgUtil~<xref linkend="mthOrClsDlgUtil"/> to combine values.
</para>
<informaltable id="tblCfxPitchAndFamily" frame="all" pgwide="1">
<tgroup cols="3">
<colspec align='left' colwidth='2*' />
<colspec align='left' colwidth='4*' />
<colspec align='right' colwidth='1*' />
<thead>
<row><entry>Symbol</entry><entry>Meaning</entry><entry>Value</entry></row>
</thead>
<tbody>
<row><entry><emphasis role="bold">Pitch</emphasis></entry><entry></entry><entry></entry></row>
<row><entry>DEFAULT_PITCH </entry><entry></entry><entry>0</entry></row>
<row><entry>FIXED_PITCH </entry><entry></entry><entry>1</entry></row>
<row><entry>VARIABLE_PITCH</entry><entry></entry><entry>2</entry></row>
<row><entry><emphasis role="bold">Family</emphasis></entry></row>
<row>
<entry>FF_DECORATIVE</entry>
<entry>
Novelty fonts. Old English is an example.
</entry>
<entry>128 (0x80)</entry>
</row>
<row>
<entry>FF_DONTCARE</entry>
<entry>
Use default font.
</entry>
<entry>4 (0x04)</entry>
</row>
<row>
<entry>FF_MODERN</entry>
<entry>
Fonts with constant stroke width, with or without serifs. Pica, Elite, and Courier New are examples.
</entry>
<entry>32 (0x20)</entry>
</row>
<row>
<entry>FF_ROMAN</entry>
<entry>
Fonts with variable stroke width and with serifs. MS Serif is an example.
</entry>
<entry>8 (10x08)</entry>
</row>
<row>
<entry>FF_SCRIPT</entry>
<entry>
Fonts designed to look like handwriting. Script and Cursive are examples.
</entry>
<entry>64 (0x40)</entry>
</row>
<row>
<entry>FF_SWISS</entry>
<entry>
Fonts with variable stroke width and without serifs. MS Sans Serif is an example.
</entry>
<entry>16 (0x10)</entry>
</row>
</tbody></tgroup>
</informaltable>
</listitem></varlistentry>
</variablelist>
</section> <!-- End createFontEx Argument Values -->
</section> <!-- End WindowExtensions::createFontEx() -->
<section id="mthCreatePen" xreflabel="createPen"><title>createPen</title>
<indexterm><primary>createPen</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>createPen</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>createPen</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>createPen</secondary></indexterm>
<programlisting>
<![CDATA[
>>--createPen(--+-------+--+----------+--+----------+--)-----------------------><
+-width-+ +-,-style--+ +-,-color--+
]]>
</programlisting>
<para>
Creates a logical pen that has the specified style, width, and color.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
<variablelist>
<varlistentry><term>width [optional]</term>
<listitem>
<para>
A non-negative whole number that specifies the width of the lines that the pen draws. A width of 1 is the default.
If 0 is specified the operating system will change the width to 1.
</para>
</listitem></varlistentry>
<varlistentry><term>style [optional]</term>
<listitem>
<para>
One of the following keywords, case is not significant. Solid is the default.
</para>
<para>
<simplelist type='vert' columns='3'>
<member>SOLID </member>
<member>DASH </member>
<member>DOT </member>
<member>DASHDOT </member>
<member>DASHDOTDOT</member>
<member>NULL </member>
</simplelist>
<variablelist>
<varlistentry><term>SOLID</term>
<listitem>
<para>
The line drawn by the pen is a solid line. This line can be any thickness. SOLID is the default.
</para>
</listitem></varlistentry>
<varlistentry><term>DASH</term>
<listitem>
<para>
The pen will draw a dashed line. The width must be 1.
</para>
</listitem></varlistentry>
<varlistentry><term>DOT</term>
<listitem>
<para>
The pen will draw a dotted line. The width must be 1.
</para>
</listitem></varlistentry>
<varlistentry><term>DASHDOT</term>
<listitem>
<para>
The pen will draw a line consisting of a dash followed by a dot. The width must be 1.
</para>
</listitem></varlistentry>
<varlistentry><term>DASHDOTDOT</term>
<listitem>
<para>
The pen will draw a line consisting of a dash followed by two dots. The width must be 1.
</para>
</listitem></varlistentry>
<varlistentry><term>DASHDOTDOT</term>
<listitem>
<para>
The pen will draw an invisible line. The width can be any thickness.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term>color [optional]</term>
<listitem>
<para>
The <xref linkend="defColor"/> for the pen. 0 is the default.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
After a pen is selected into a device context, it can be used to draw lines and curves. It can then be selected into
a device context using the <xref linkend="mthObjectToDC"/>() method. When the pen is no longer
needed use the <xref linkend="mthDeleteObject"/>() method to release the operating resources used
by the brush.
</para>
<para>
For dashed and dotted lines, if the width specified is greater than 1, the operating system will return a pen of
that width, but change its style to solid.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details:</emphasis></term>
<listitem>
<para>
Sets the <xref linkend="dotSystemErrorCode"/>.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
The following example creates a dotted pen object with a width of 1:
<programlisting>
<![CDATA[
hPen = dlg~createPen(1, "DOT", 13)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthDeleteFont" xreflabel="deleteFont"><title>deleteFont</title>
<indexterm><primary>deleteFont</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>deleteFont</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>deleteFont</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>deleteFont</secondary></indexterm>
<programlisting>
<![CDATA[
>>--deleteFont(--hFont--)----------------------------><
]]>
</programlisting>
<para>
The deleteFont method deletes a font. This method is to be used to delete a font created with the
<xref linkend="mthCreateFontEx"/>() method.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>hFont</term>
<listitem><para>The handle of a font.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthDeleteObject" xreflabel="deleteObject"><title>deleteObject</title>
<indexterm><primary>deleteObject</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>deleteObject</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>deleteObject</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>deleteObject</secondary></indexterm>
<programlisting>
<![CDATA[
>>--deleteObject(--obj--)----------------------------><
]]>
</programlisting>
<para>The deleteObject method deletes a graphic object,
namely a pen or a brush. See <xref linkend="mthCreatePen"/> and <xref linkend="mthCreateBrush"/> for
information on how to get the handle of a pen or brush. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>obj</term>
<listitem><para>The handle of a pen or brush.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthDrawAngleArc" xreflabel="drawAngleArc"><title>drawAngleArc</title>
<indexterm><primary>drawAngleArc</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>drawAngleArc</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>drawAngleArc</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>drawAngleArc</secondary></indexterm>
<programlisting>
<![CDATA[
>>--drawAngleArc(-dc-,-xs-,-ys-,-x-,-y-,-radius-,-startangle-,-sweepangle-)----><
]]>
</programlisting>
<para>The drawAngleArc method draws a partial circle
(arc) and a line connecting the start drawing point with the start of the
arc on the given device context using the active pen for the outline. The
circle is drawn counterclockwise with the given radius between the given angles. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>xs, ys</term>
<listitem><para>The start draw position, in pixels.
</para></listitem></varlistentry>
<varlistentry><term>x, y</term>
<listitem><para>The center of the circle, in pixels.
</para></listitem></varlistentry>
<varlistentry><term>radius</term>
<listitem><para>The radius of the circle, in pixels.
</para></listitem></varlistentry>
<varlistentry><term>startangle, sweepangle</term>
<listitem><para>The starting and ending angles for the partial circle in degrees (0
is the x-axis).
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthDrawArc" xreflabel="drawArc"><title>drawArc</title>
<indexterm><primary>drawArc</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>drawArc</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>drawArc</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>drawArc</secondary></indexterm>
<programlisting>
<![CDATA[
>>--drawArc(--dc-,-x-,-y-,-x2-,-y2--+-------+--+-------+--+-------+--+-------+--)---><
+-,-r1x-+ +-,-r1y-+ +-,-r2x-+ +-,-r2y-+
]]>
</programlisting>
<para>The drawArc method draws a circle or ellipse on
the given device context using the active pen for the outline. The circle
or ellipse is drawn within the boundaries of an imaginary rectangle whose
coordinates are given. A partial figure can be drawn by giving the end points
of two radials. By default, the figure is drawn counterclockwise, but the
direction can be modified using <xref linkend="mthSetArcDirection"/>. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>x, y</term>
<listitem><para>The position of the upper left corner of the imaginary rectangle, in
pixels.
</para></listitem></varlistentry>
<varlistentry><term>x2, y2</term>
<listitem><para>The position of the lower right corner of the imaginary rectangle, in
pixels.
</para></listitem></varlistentry>
<varlistentry><term>r1x, r1y, r2x, r2y</term>
<listitem><para>The end points of the starting and ending radials for drawing the figure.
A full circle or ellipse is drawn if no start and end are given. Omitted values
default to 0. Imaginary radials are drawn from the center of the bounding rectangle to the start and
end points. The circle or ellipse is then drawn between the intersections
of these lines with the full circle or ellipse.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>This example draws a full ellipse and a quarter circle:
<programlisting>
<![CDATA[
dc = self~getControlDC(100)
pen = self~createPen(4,"solid",13)
oldp = self~objectToDC(dc,pen)
self~drawArc(dc,50,50,200,150) /* full ellipse */
self~drawArc(dc,100,100,150,150, 200,50,75,75) /* quarter circle */
self~objectToDC(dc,oldp); self~deleteObject(pen)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthDrawLine" xreflabel="drawLine"><title>drawLine</title>
<indexterm><primary>drawLine</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>drawLine</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>drawLine</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>drawLine</secondary></indexterm>
<programlisting>
<![CDATA[
>>--drawLine(--dc--,--+-------+--,--+-------+--,--toX--,--toY--)-><
+-fromX-+ +-fromY-+
]]>
</programlisting>
<para>The drawLine method draws a line within the device
context using the active pen. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>fromX, fromY</term>
<listitem><para>The starting position, in pixels. If omitted, the previous end point
of a line or arc is used.
</para></listitem></varlistentry>
<varlistentry><term>toX, toY</term>
<listitem><para>The target position.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthDrawPie" xreflabel="drawPie"><title>drawPie</title>
<indexterm><primary>drawPie</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>drawPie</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>drawPie</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>drawPie</secondary></indexterm>
<programlisting>
<![CDATA[
>>--drawPie(--dc-,-x-,-y-,-x2-,-y2--+-------+--+-------+--+-------+--+-------+--)---><
+-,-r1x-+ +-,-r1y-+ +-,-r2x-+ +-,-r2y-+
]]>
</programlisting>
<para>The drawPie method draws a pie of a circle or ellipse
on the given device context using the active pen for the outline and the active
brush to fill the pie. The circle or ellipse is drawn within the boundaries
of an imaginary rectangle whose coordinates are given. The arc is drawn between
start and end radials in the direction specified by <xref linkend="mthSetArcDirection"/>. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>x, y</term>
<listitem><para>The position of the upper left corner of the imaginary rectangle, in
pixels.
</para></listitem></varlistentry>
<varlistentry><term>x2, y2</term>
<listitem><para>The position of the lower right corner of the imaginary rectangle.
</para></listitem></varlistentry>
<varlistentry><term>r1x, r1y, r2x, r2y</term>
<listitem><para>The end points of the two radials (same as for <xref linkend="mthDrawArc"/>).
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthDrawPixel" xreflabel="drawPixel"><title>drawPixel</title>
<indexterm><primary>drawPixel</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>drawPixel</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>drawPixel</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>drawPixel</secondary></indexterm>
<programlisting>
<![CDATA[
>>--drawPixel(--dc--,--x--,--y--,--color--)----------><
]]>
</programlisting>
<para>The drawPixel method draws a pixel within the device
context. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>x, y</term>
<listitem><para>The position, in pixels.
</para></listitem></varlistentry>
<varlistentry><term>color</term>
<listitem><para>The <xref linkend="defColor"/> for the pixel.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthFillDrawing" xreflabel="fillDrawing"><title>fillDrawing</title>
<indexterm><primary>fillDrawing</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>fillDrawing</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>fillDrawing</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>fillDrawing</secondary></indexterm>
<programlisting>
<![CDATA[
>>--fillDrawing(--dc--,--x--,--y--,--color--)----><
]]>
</programlisting>
<para>
Fills an area of the display surface with the current brush. The area to be filled is outlined by the color specified.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>dc [required]</term>
<listitem>
<para>
The device context containing the area to be filled.
</para>
</listitem></varlistentry>
<varlistentry><term>x [required]</term>
<listitem>
<para>
The x co-ordinate of the position in the area to start filling.
</para>
</listitem></varlistentry>
<varlistentry><term>y [required]</term>
<listitem>
<para>
The x co-ordinate of the position in the area to start filling.
</para>
</listitem></varlistentry>
<varlistentry><term>color [required]</term>
<listitem>
<para>
Specifies the color that outlines the area to be filled. The color can be spedified as a color pallette <link
linkend="derColor">index</link>, or as a <xref linkend="defColorRef"/> color.
</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 operating system assumes that the area to be filled is completely bounded by the color specified by the <emphasis
role="italic">color</emphasis> argument. The operating system begins filling at the point specified by the <emphasis
role="italic">x</emphasis> and <emphasis role="italic">y</emphasis> arguments and continues in all directions until it
reaches the boundary.
</para>
<para>
The MSDN documentation says there are a number of reasons why this method may fail, and lists some of the reasons as
being:
</para>
<itemizedlist>
<listitem>
<para>
The filling could not be completed.
</para>
</listitem>
<listitem>
<para>
The specified point has the boundary color specified by the <emphasis role="italic">color</emphasis> argument.
</para>
</listitem>
<listitem>
<para>
The point is outside the clipping regionthat is, it is not visible on the device.
</para>
</listitem>
</itemizedlist>
</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. If <emphasis role="italic">dc</emphasis> is
zero, the error code is set to: 1, <emphasis role="italic">ERROR_INVALID_FUNCTION Incorrect function.</emphasis> The
operating system may set other error codes for other reasons.
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End WindowExtensions::fillDrawing() -->
<section id="mthFillRect" xreflabel="fillRect"><title>fillRect</title>
<indexterm><primary>fillRect</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>fillRect</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>fillRect</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>fillRect</secondary></indexterm>
<programlisting>
<![CDATA[
>>--fillRect(--dc--,--rect--,--brush--)----------><
]]>
</programlisting>
<para>
Fills a rectangle using the specified brush within the specified device context.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>dc [required]</term>
<listitem>
<para>
The device context that contains the rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>rect [required]</term>
<listitem>
<para>
A <xref linkend="clsRect"/> object that specifies the rectangle to be filled.
</para>
</listitem></varlistentry>
<varlistentry><term>brush [required]</term>
<listitem>
<para>
Specifies the brush that is to be used to fill the rectangle. This can either be the handle of the brush or the index
of the system color to be used. Brush handles are retrieved using methods such as <xref linkend="mthCreateBrush"/> or
<xref linkend="mthGetSysBrush"/>. A system color index can be either the non-negative whole number ID or the keyword
ID. Both types of IDs can be looked up in the System Color Elements <link linkend="tblSysColors">table</link>.
</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>
Unlike the <xref linkend="mthRectangle"/> method, the <emphasis role="italic">fileRect</emphasis> method does not outline
the rectangle with the pen of the device context.
</para>
<para>
In addition, for programmers that may read the Microsoft <xref linkend="defWindowsDoc"/> on the Windows <emphasis
role="italic">FillRect</emphasis> API, the <emphasis role="italic">fillRect</emphasis> method fills the entire recatangle
specified. The Windows API does not include the rectangle's right and bottom sides. That API fills a rectangle up to, but
not including, the right column and bottom row. If the ooDialog programmer needs that behaviour, she should subtract 1
from the right and bottom co-ordinates of the <emphasis role="italic">rect</emphasis> object.
</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. If <emphasis role="italic">dc</emphasis> is
zero, the error code is set to: 1, <emphasis role="italic">ERROR_INVALID_FUNCTION Incorrect function.</emphasis> The
operating system may set other error codes for other reasons.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example comes from a clock program that displays the digital time. The time is updated every second. If the previous
time is not erased, it just becomes a smear as the different digits are written over the top of each other. The example
gets a system brush that is the color of the background of the clock and uses that to erase the bacground of the area
that displays the digital time before it is updated with the current time:
<programlisting>
<![CDATA[
-- Get a system brush using the button's system color. Do not delete system
-- brushes
btnBrush = self~getSysBrush('BTNFACE')
curBrush = self~objectToDC(dc, btnBrush)
-- Erase the area where the time will be displayed by painting the
-- background with our button brush. Get the size of the area, the
-- text extent, taken up by the time. Use that to calculate our
-- rectangle.
s = button~getTextExtent(dc, time)
r = .Rect~new(290, 40, 290 + s~width, 40 + s~height)
self~fillRect(dc, r, btnBrush)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End WindowExtensions::fillRect() -->
<section id="mthFontColor" xreflabel="fontColor"><title>fontColor</title>
<indexterm><primary>fontColor</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>fontColor</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>fontColor</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>fontColor</secondary></indexterm>
<programlisting>
<![CDATA[
>>--fontColor(--color--,--dc--)----------------------><
]]>
</programlisting>
<para>The fontColor method sets the font color for a
device context. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>color</term>
<listitem><para>The index of a color in the system's color palette.
</para></listitem></varlistentry>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthFontToDC" xreflabel="fontToDC"><title>fontToDC</title>
<indexterm><primary>fontToDC</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>fontToDC</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>fontToDC</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>fontToDC</secondary></indexterm>
<programlisting>
<![CDATA[
>>--fontToDC(--dc--,--hFont--)-----------------------><
]]>
</programlisting>
<para>The fontToDC method loads a font into a device
context and returns the handle of the previous font. Use the <xref linkend="mthGetWindowDC"/>,
<xref linkend="mthGetDC"/>, or <xref linkend="mthGetControlDC"/> method to retrieve a device
context, and the <xref linkend="mthCreateFontEx"/>() method to get a font handle. To reset the font to
the original state, use another fontToDC call with the handle of the previous font. To release the device context, use
the <xref linkend="mthFreeWindowDC"/>, <xref linkend="mthFreeDC"/>, or
<xref linkend="mthFreeControlDC"/> method.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context of a dialog or button.
</para></listitem></varlistentry>
<varlistentry><term>hFont</term>
<listitem><para>The handle of a font.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>This example loads an Arial font into the current dialog window:
<programlisting>
<![CDATA[
additional = .directory~new
additional~italic = .true
hfnt = MyDialog~createFontEx("Arial", 16, additional)
dc = MyDialog~getDC
oldf = MyDialog~fontToDC(dc,hfnt) /* activate font */
...
MyDialog~fontToDC(dc,oldf) /* restore previous font */
MyDialog~freeDC(dc)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthFreeDC" xreflabel="freeDC"><title>freeDC</title>
<indexterm><primary>freeDC</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>freeDC</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>freeDC</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>freeDC</secondary></indexterm>
<programlisting>
<![CDATA[
>>--freeDC(--dc--)-------------------------------><
]]>
</programlisting>
<para>
The <emphasis role="italic">freeDC</emphasis> method releases the device context resources that were reserved by the <xref
linkend="mthGetDC"/> method.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
</para>
<variablelist>
<varlistentry><term>dc [required]</term>
<listitem>
<para>
The <link linkend="defHandle">handle</link> to the device context that is to be released.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns 0 on success, 1 on error.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The programmer should always free a device context when the application is done using the device context.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This example gets the device context of a button window, draws something in the client space of the button, and then
releases the device context:
<programlisting>
<![CDATA[
pb = self~newPushButton("DRAWINGS")
if pb = .nil then return -1
dc = pb~getDC
if dc = 0 then return -1
... /* draw something */
pb~freeDC(dc)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End WindowExtensions::freeDC() -->
<section id="mthGetArcDirection" xreflabel="getArcDirection"><title>getArcDirection</title>
<indexterm><primary>getArcDirection</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>getArcDirection</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>getArcDirection</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>getArcDirection</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getArcDirection(--dc--)--------------------------><
]]>
</programlisting>
<para>
The getArcDirection method returns the current drawing direction for the <xref linkend="mthDrawArc"/> method.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthGetDC" xreflabel="getDC"><title>getDC</title>
<indexterm><primary>getDC</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>getDC</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>getDC</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>getDC</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getDC--------------------------------------------><
]]>
</programlisting>
<para>The getDC method reserves drawing resources and
returns the handle to the display device context of a dialog or dialog control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle to the device context, or 0 if this method failed.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example retrieves the device context of button DRAWINGS,
processes the drawing commands, and frees the device context resources:
<programlisting>
<![CDATA[
obj = MyDialog~newPushButton("DRAWINGS")
if obj = .Nil then return -1
dc = obj~getDC
if dc = 0 then return -1
... /* draw something */
obj~freeDC(dc)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
<note><title>Note</title><para>
When you have finished with the device context, call <xref linkend="mthFreeDC"/>.
</para></note>
</section>
<section id="mthGetFont" xreflabel="getFont"><title>getFont</title>
<indexterm><primary>getFont</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>getFont</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>getFont</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>getFont</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getFont------------------------------------------><
]]>
</programlisting>
<para>
Retrieves a handle to the font currently being used by the dialog or dialog control.
</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>
This method returns a handle to the font for text used by the dialog or dialog control.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
This is an example from a fictious program where a custom font is used to emphasis the text in two
static controls. When the user does some action, the text in one control is emphasised and the
other is de-emphsised. One way to do this is to just swap the fonts.
<programlisting>
<![CDATA[
::method onToggle private
static1 = self~newStatic(IDC_ST_OUTSTANDING_BLANCE)
static2 = self~newStatic(IDC_ST_LASTPAYMENT)
font1 = static1~getFont
font2 = static2~getFont
static1~setFont(font2)
static2~setFont(font1)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End ::getFont() -->
<section id="mthGetPixel" xreflabel="getPixel"><title>getPixel</title>
<indexterm><primary>getPixel</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>getPixel</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>getPixel</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>getPixel</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getPixel(--dc--,--x--,--y--)---------------------><
]]>
</programlisting>
<para>The getPixel method returns the color number of a pixel
within the device context. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>x, y</term>
<listitem><para>The position, in pixels.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthGetSysBrush" xreflabel="getSysBrush"><title>getSysBrush</title>
<indexterm><primary>getSysBrush</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>getSysBrush</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>getSysBrush</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>getSysBrush</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getSysBrush(--sysColor--)--------------------><
]]>
</programlisting>
<para>
Retrieves a handle to a logical brush that corresponds to the specified system color index.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
</para>
<variablelist>
<varlistentry><term>sysColor [required]</term>
<listitem>
<para>
Specifies the system color to be used. This can be either the non-negative whole number ID or the keyword ID. Both
types of IDs can be looked up in the System Color Elements <link linkend="tblSysColors">table</link>.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
The handle to the brush on success, or .nil on failure.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
A brush is a bitmap that the system uses to paint the interiors of filled shapes. System color brushes track changes in
system colors. In other words, when the user changes a system color, the associated system color brush automatically
changes to the new color.
</para>
<para>
To paint with a system color brush, an application should use <emphasis role="italic">getSysBrush</emphasis> instead of
useing <xref linkend="mthCreateBrush"/>, because <emphasis role="italic">getSysBrush</emphasis> returns a cached brush
instead of allocating a new one. System color brushes are owned by the system and must not be destroyed.
</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 gets a brush with the system color of a push button and then selects it into a device context to use it form
painting:
<programlisting>
<![CDATA[
-- Get a system brush using the button's system color. Do not delete system
-- brushes
btnBrush = self~getSysBrush('BTNFACE')
curBrush = self~objectToDC(dc, btnBrush)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section> <!-- End WindowExtensions::getSysBrush() -->
<section id="mthGetTextAlign" xreflabel="getTextAlign"><title>getTextAlign</title>
<indexterm><primary>getTextAlign</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>getTextAlign</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>getTextAlign</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>getTextAlign</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getTextAlign(--hDC--)------------------------><
]]>
</programlisting>
<para>
Gets the text alignment setting for the specified device context.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The single argument is:
</para>
<variablelist>
<varlistentry><term>hDC [required]</term>
<listitem>
<para>
The device context whose text alignment is required.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
A string of keywords specifying the text alignment. The returned string will contain exactly one keyword from the
following 3 groups of keywords, in the same order as the groups are listed:
</para>
<variablelist>
<varlistentry><term>LEFT</term>
<listitem>
<para>
The reference point is on the left edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>RIGHT</term>
<listitem>
<para>
The reference point is on the right edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>CENTER</term>
<listitem>
<para>
The reference point is aligned horizontally with the center of the bounding rectangle.
</para>
</listitem></varlistentry>
</variablelist>
<variablelist>
<varlistentry><term>TOP</term>
<listitem>
<para>
The reference point is on the top edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>BOTTOM</term>
<listitem>
<para>
The reference point is on the bottom edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>BASELINE</term>
<listitem>
<para>
The reference point is on the base line of the text.
</para>
</listitem></varlistentry>
</variablelist>
<variablelist>
<varlistentry><term>NOUPDATECP</term>
<listitem>
<para>
The current position is not updated after each text output call.
</para>
</listitem></varlistentry>
<varlistentry><term>UPDATECP</term>
<listitem>
<para>
The current position is updated after each text output call.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The bounding rectangle is a rectangle bounding all of the character cells in a string of text. Its dimensions can be
obtained by using the <xref linkend="mthGetTextExtent"/> method.
</para>
<para>
The text-alignment flags determine how the text writing methods, such as <xref linkend="mthWrite"/> and <xref
linkend="mthWriteDirect"/>, align a string of text in relation to the string's reference point provided to the methods.
</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 WindowExtensions::getTextAlign() -->
<section id="mthGetTextExtent" xreflabel="getTextExtent"><title>getTextExtent</title>
<indexterm><primary>getTextExtent</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>getTextExtent</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>getTextExtent</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>getTextExtent</secondary></indexterm>
<programlisting>
<![CDATA[
>>--getTextExtent(--hDC--,--text--)--------------><
]]>
</programlisting>
<para>
Gets the bounding rectangle, as a <xref linkend="clsSize"/> object for the specified text, if it were to be drawn in the
specified device context.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>hDC [required]</term>
<listitem>
<para>
The device context in which the text will be drawn.
</para>
</listitem></varlistentry>
<varlistentry><term>text</term>
<listitem>
<para>
The text string to be drawn in the device context.
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
A <computeroutput>Size</computeroutput> object that reflects the size of the bounding rectangle of the text.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The size is calculated using the currently selected font in the device context.
</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 WindowExtension::getTextExtent() -->
<section id="mthHScrollPos" xreflabel="hScrollPos"><title>hScrollPos</title>
<indexterm><primary>hScrollPos</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>hScrollPos</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>hScrollPos</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>hScrollPos</secondary></indexterm>
<programlisting>
<![CDATA[
>>--hScrollPos---------------------------------------><
]]>
</programlisting>
<para>The HScrollPos method returns the position of the
horizontal scroll bar in the associated dialog or dialog control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The position of the horizontal scroll bar.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthLoadBitmap" xreflabel="loadBitmap"><title>loadBitmap</title>
<indexterm><primary>loadBitmap</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>loadBitmap</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>loadBitmap</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>loadBitmap</secondary></indexterm>
<programlisting>
<![CDATA[
>>--loadBitmap(--bmpFilename--+------------+--)------><
+-,-loadOpt--+
]]>
</programlisting>
<para>
The <emphasis role="italic">loadBitmap</emphasis> method loads a bitmap from a file into memory and returns the handle
to the bitmap.
</para>
<para>
In general, the <xref linkend="clsImage"/> class should be used when working with bitmaps, if possible. The
<emphasis role="italic">loadBitmap</emphasis>() and <xref linkend="mthRemoveBitmap"/>() methods date
back to the Windows 3.1 ooDialog and use outdated techniques. However, at this time, the bitmap button methods, like
<xref linkend="mthInstallBitmapButton"/>() still require the bitmap handle returned from
<emphasis role="italic">loadBitmap</emphasis>() method.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
<variablelist>
<varlistentry><term>bmpFilename [required]</term>
<listitem>
<para>
The file name of the bitmap file. The name can be a relative or absolute path.
</para>
</listitem></varlistentry>
<varlistentry><term>loadOpt [optional]</term>
<listitem>
<para>
The only load option is: USEPAL. This sets the color palette of the bitmap as the system color palette.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the handle of the loaded bitmap on success, or 0 on error.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
Use the <xref linkend="mthRemoveBitmap"/>() method to free memory when the bitmap is no longer in use.
Although it does no harm, it is not necessary to free the bitmap if the Rexx program is ending. When the Rexx
interpreter process ends, the operating system will free the bitmap memory. To use the bitmap in the
<xref linkend="mthInstallBitmapButton"/>() or
<xref linkend="mthChangeBitmapButton"/>() methods specify the INMEMORY option.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details:</emphasis></term>
<listitem>
<para>
Sets the <xref linkend="dotSystemErrorCode"/>.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
The following example loads the bitmap file, <computeroutput>Walker.bmp</computeroutput>, into memory. The file is
located in the <computeroutput>bmp</computeroutput> subdirectory. hBmp is the handle to this in-memory bitmap.
<programlisting>
<![CDATA[
hBmp = MyDialog~loadBitmap("bmp\Walker.bmp", "USEPAL")
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthObjectToDC" xreflabel="objectToDC"><title>objectToDC</title>
<indexterm><primary>objectToDC</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>objectToDC</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>objectToDC</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>objectToDC</secondary></indexterm>
<programlisting>
<![CDATA[
>>--objectToDC(--dc--,--obj--)-----------------------><
]]>
</programlisting>
<para>The objectToDC method loads a graphic object, namely
a pen or a brush, into a device context. Subsequent lines, rectangles, and
arcs are drawn using the pen and brush. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>obj</term>
<listitem><para>The object: a pen or a brush.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The handle of the previous active pen or brush. It can be used to restore
the previous environment.
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example activates a pen for drawing:
<programlisting>
<![CDATA[
dc = MyBaseDialog~getDC
hpen = MyDialog~createPen(2, "SOLID", 4)
MyDialog~objectToDC(dc,hpen)
... /* do lines, rectangles, ... */
MyDialog~deleteObject(hpen)
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthOpaqueText" xreflabel="opaqueText"><title>opaqueText</title>
<indexterm><primary>opaqueText</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>opaqueText</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>opaqueText</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>opaqueText</secondary></indexterm>
<programlisting>
<![CDATA[
>>--opaqueText(--dc--)-------------------------------><
]]>
</programlisting>
<para>The opaqueText method restores the default text
mode, that is, with a white background behind the text, which overlays whatever
is at that position in the dialog or dialog control. Use this method after
transparent mode was set using <xref linkend="mthTransparentText"/>. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>A device context.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthRectangle" xreflabel="rectangle"><title>rectangle</title>
<indexterm><primary>rectangle</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>rectangle</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>rectangle</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>rectangle</secondary></indexterm>
<programlisting>
<![CDATA[
>>--rectangle(--dc--,--x--,--y--,--x2--,--y2--+-----------+--)-----------------><
+-,-keyWord-+
]]>
</programlisting>
<para>The rectangle method draws a rectangle to the given
device context. The appearance is determined by the graphics objects currently
active in the device context. The active pen draws the outline and, optionally,
the active brush fills the inside area. The default pen is thin black and
the default brush is white. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>The device context.
</para></listitem></varlistentry>
<varlistentry><term>x, y</term>
<listitem><para>The position of the upper left corner of the rectangle, in pixels.
</para></listitem></varlistentry>
<varlistentry><term>x2, y2</term>
<listitem><para>The position of the lower right corner.
</para></listitem></varlistentry>
<varlistentry><term>keyWord [optional]</term>
<listitem>
<para>
If the argument is omitted, the rectangle is just outlined (drawn) with the active pen. otherwise the rectangle is
filled with the active brush. The keyword would be &quot;FILL&quot; to file the rectangle, but the argument is not
actually checked. If the argument is used, the rectangel is filled, if it is not used the rectangle is outlined..
</para>
</listitem></varlistentry> </variablelist> </para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem><para>The following example draws a red rectangle filled with yellow, surrounded
by a black rectangle:
<programlisting>
<![CDATA[
dc = self~getControlDC(100)
brush = self~createBrush(15) /* yellow */
pen = self~createPen(10,"solid",13) /* thick red */
oldb = self~objectToDC(dc,brush)
oldp = self~objectToDC(dc,pen)
self~rectangle(dc, 50, 50, 200, 150, "FILL")
self~objectToDC(dc,oldp); self~deleteObject(pen)
self~objectToDC(dc,oldb); self~deleteObject(brush)
self~rectangle(dc, 40, 40, 210, 160) /* default */
]]>
</programlisting>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthRemoveBitmap" xreflabel="removeBitmap"><title>removeBitmap</title>
<indexterm><primary>removeBitmap</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>removeBitmap</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>removeBitmap</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>removeBitmap</secondary></indexterm>
<programlisting>
<![CDATA[
>>--removeBitmap(--hBitmap--)------------------------><
]]>
</programlisting>
<para>
Use this method to free an in-memory bitmap that was loaded through the
<xref linkend="mthLoadBitmap"/>() method.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The only argument is:
<variablelist>
<varlistentry><term>hBitmap [required]</term>
<listitem>
<para>
The bitmap handle.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns 0 on success or 1 of the bitmap handle is not valid.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
This method frees the memory used by the bitmap. Do not free a bitmap that is in use. It is not necessary to free
the bitmap if the Rexx program is ending. When the Rexx interpreter process ends, the operating system will free the
bitmap memory. However, in a long running program, the programmer will likely want to free bitmaps that are not in
use.
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthScrollClsWE" xreflabel="scroll"><title>scroll</title>
<indexterm><primary>scroll</primary><secondary>WindowExtensions class</secondary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>scroll</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>scroll</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>scroll</secondary></indexterm>
<programlisting>
<![CDATA[
>>--scroll(--cx--,--cy--)----------------------------><
]]>
</programlisting>
<para>The Scroll method scrolls the contents of the associated
dialog or dialog control by the amount specified.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>cx</term>
<listitem><para>The number of screen pixels the content of the dialog or dialog control
is to be scrolled to the right or to the left, if negative.
</para></listitem></varlistentry>
<varlistentry><term>cy</term>
<listitem><para>The number of screen pixels the content of the dialog or dialog control
is to be scrolled downward or upward, if negative.
</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>Scrolling was successful.
</para></listitem></varlistentry>
<varlistentry><term>1</term>
<listitem><para>Scrolling failed.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthSetArcDirection" xreflabel="setArcDirection"><title>setArcDirection</title>
<indexterm><primary>setArcDirection</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>setArcDirection</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>setArcDirection</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>setArcDirection</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setArcDirection(--dc--+--------------+--)--------><
+-,-direction--+
]]>
</programlisting>
<para>
The setArcDirection method changes the drawing direction for the <xref linkend="mthDrawArc"/> and
<xref linkend="mthDrawPie"/> methods. The default direction is counterclockwise.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc [required]</term>
<listitem>
<para>
The device context.
</para>
</listitem></varlistentry>
<varlistentry><term>direction [optional]</term>
<listitem>
<para>
The new drawing direction. Use either the CLOCKWISE or COUNTERCLOCKWISE keywords, case is not significant. If the
argument is omitted, then the direction is set back to the default, counterclockwise.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthSetFont" xreflabel="setFont"><title>setFont</title>
<indexterm><primary>setFont</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>setFont</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>setFont</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>setFont</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setFont(--fontHandle--+----------+--)------------><
+-,-redraw-+
]]>
</programlisting>
<para>
The setFont method assigns another font to be used for the text in a dialog or dialog control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
<variablelist>
<varlistentry><term>fontHandle</term>
<listitem>
<para>
The handle to the font that is to be used by the dialog or dialog control. There are several
methods to get the font handle, including <xref linkend="mthCreateFontEx"/>() or
<xref linkend="mthGetFont"/>().
</para>
</listitem></varlistentry>
<varlistentry><term>redraw</term>
<listitem>
<para>Optional, .true or .false. If you specify .true, the message sent to the underlying dialog or
dialog control tells it to redraw itself. If you specify .false, the dialog or dialog control is not
told to redraw itself. The default is .true.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
This method always returns 0.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
The following example creates the font Arial with a size of 14 and assigns it to the tree view
control FILES, which is forced to be redrawn.
<programlisting>
<![CDATA[
hfnt = dlg~createFontEx("Arial", 14)
dlg~newTreeView("FILES")~setFont(hfnt, .true)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthSetHScrollPos" xreflabel="setHScrollPos"><title>setHScrollPos</title>
<indexterm><primary>setHScrollPos</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>setHScrollPos</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>setHScrollPos</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>setHScrollPos</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setHScrollPos(--position--+-----------+--)-------><
+-,-redraw--+
]]>
</programlisting>
<para>The SetHScrollPos method sets the thumb position
of the horizontal scroll bar contained in the associated dialog or dialog
control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>position</term>
<listitem><para>The new thumb position of the horizontal scroll bar.
</para></listitem></varlistentry>
<varlistentry><term>redraw</term>
<listitem><para>If this argument is 1 (the default), the display of the scroll bar is
updated.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The previous position of the horizontal scroll bar, or 0 if this method
failed.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthSetTextAlign" xreflabel="setTextAlign"><title>setTextAlign</title>
<indexterm><primary>setTextAlign</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>setTextAlign</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>setTextAlign</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>setTextAlign</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setTextAlign(--hDC--,--align--)--------------><
]]>
</programlisting>
<para>
Sets the text alignment option for the specified device context.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
</para>
<variablelist>
<varlistentry><term>hDC [required]</term>
<listitem>
<para>
The device context whose text alignment is to be set.
</para>
</listitem></varlistentry>
<varlistentry><term>align [optional]</term>
<listitem>
<para>
A string of keywords specifying the text alignment. The following keywords are recognized. Specify exactly one keyword
from the following 3 groups of keywords, case and order are insignificant.
</para>
<para>
The default if this argument is omitted is: <computeroutput>LEFT TOP NOUPDATECP</computeroutput>. For any group that
has no keyword specified, the default for that group is used. I.e., if neither LEFT RIGHT nor CENTER is specified,
LEFT is used.
</para>
<para>
<variablelist>
<varlistentry><term>LEFT</term>
<listitem>
<para>
The reference point is on the left edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>RIGHT</term>
<listitem>
<para>
The reference point is on the right edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>CENTER</term>
<listitem>
<para>
The reference point is aligned horizontally with the center of the bounding rectangle.
</para>
</listitem></varlistentry>
</variablelist>
<variablelist>
<varlistentry><term>TOP</term>
<listitem>
<para>
The reference point is on the top edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>BOTTOM</term>
<listitem>
<para>
The reference point is on the bottom edge of the bounding rectangle.
</para>
</listitem></varlistentry>
<varlistentry><term>BASELINE</term>
<listitem>
<para>
The reference point is on the base line of the text.
</para>
</listitem></varlistentry>
</variablelist>
<variablelist>
<varlistentry><term>NOUPDATECP</term>
<listitem>
<para>
The current position is not updated after each text output call.
</para>
</listitem></varlistentry>
<varlistentry><term>UPDATECP</term>
<listitem>
<para>
The current position is updated after each text output call.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
</variablelist>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns the previous alignment of the device context as a string of keywords. The string is indentical to what the <xref
linkend="mthGetTextAlign"/> method would have returned if the method was invoked immediately prior to invoking this
method. On error the empty string is returned.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
The text-alignment flags determine how the text writing methods, such as <xref linkend="mthWrite"/> and <xref
linkend="mthWriteDirect"/>, align a string of text in relation to the string's reference point provided to the methods.
</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 WindowExtensions::setTextAlign() -->
<section id="mthSetVScrollPos" xreflabel="setVScrollPos"><title>setVScrollPos</title>
<indexterm><primary>setVScrollPos</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>setVScrollPos</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>setVScrollPos</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>setVScrollPos</secondary></indexterm>
<programlisting>
<![CDATA[
>>--setVScrollPos(--position--+-----------+--)-------><
+-,-redraw--+
]]>
</programlisting>
<para>The SetVScrollPos method sets the thumb position
of the vertical scroll bar contained in the associated dialog or dialog control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>position</term>
<listitem><para>The new thumb position of the vertical scroll bar.
</para></listitem></varlistentry>
<varlistentry><term>redraw</term>
<listitem><para>If this argument is 1 (the default), the display of the scroll bar is
updated.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The previous position of the vertical scroll bar, or 0 if this method
failed.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthTransparentText" xreflabel="transparentText"><title>transparentText</title>
<indexterm><primary>transparentText</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>transparentText</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>transparentText</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>transparentText</secondary></indexterm>
<programlisting>
<![CDATA[
>>--transparentText(--dc--)--------------------------><
]]>
</programlisting>
<para>The transparentText method enables you to write
text to a device context using <xref linkend="mthWriteDirect"/> in transparent
mode, that is, without a white background behind the text. Restore the default
mode using <xref linkend="mthOpaqueText"/>. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The only argument is:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>A device context.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthVScrollPos" xreflabel="vScrollPos"><title>vScrollPos</title>
<indexterm><primary>vScrollPos</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>vScrollPos</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>vScrollPos</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>vScrollPos</secondary></indexterm>
<programlisting>
<![CDATA[
>>--vScrollPos---------------------------------------><
]]>
</programlisting>
<para>The VScrollPos method returns the position of the
vertical scroll bar in the associated dialog or dialog control.</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem><para>The position of the vertical scroll bar.
</para></listitem></varlistentry>
</variablelist>
</section>
<section id="mthWrite" xreflabel="write"><title>write</title>
<indexterm><primary>write</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>write</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>write</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>write</secondary></indexterm>
<programlisting>
<![CDATA[
>>--write(-x-,-y-,-text-+---------+-+---------+-+--------+-+------+-+------+-)---><
+-,-fName-+ +-,-fSize-+ +-,-opts-+ +-,-fg-+ +-,-bk-+
]]>
</programlisting>
<para>
The <emphasis role="italic">write</emphasis> method writes the specified text to the dialog or dialog control in the
given font, style, and color at the specified position.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
The arguments are:
<variablelist>
<varlistentry><term>x, y [required]</term>
<listitem>
<para>
The starting position of the text, in pixels. The position coordinates are relative to the window, or the client
area of the window, not relative to the screen.
</para>
</listitem></varlistentry>
<varlistentry><term>text [required]</term>
<listitem>
<para>
The string to be written.
</para>
</listitem></varlistentry>
<varlistentry><term>fName [optional]</term>
<listitem>
<para>
The font name. The default if omitted is SYSTEM.
</para>
</listitem></varlistentry>
<varlistentry><term>fSize [optional]</term>
<listitem>
<para>
The point size of the font. If omitted, the standard size (10) is used.
</para>
</listitem></varlistentry>
<varlistentry><term>opts [optional]</term>
<listitem>
<para>
A list of 0 or more of the following keywords separated by spaces, case is not significant. These options control
aspects of the font and how the font is written.
</para>
<para>
<simplelist type='vert' columns='3'>
<member>OPAQUE </member>
<member>TRANSPARENT</member>
<member>CLIENT </member>
<member>THIN </member>
<member>EXTRALIGHT </member>
<member>LIGHT </member>
<member>MEDIUM </member>
<member>SEMIBOLD </member>
<member>EXTRABOLD </member>
<member>HEAVY </member>
<member>BOLD </member>
<member>UNDERLINE </member>
<member>ITALIC </member>
<member>STRIKEOUT </member>
</simplelist>
<variablelist>
<varlistentry><term>OPAQUE</term>
<listitem>
<para>
The background of the area the text will occupy is painted with the specified background color, or with white if
the background color is omitted, before writing the text. This has the effect of &quot;erasing&quot; whatever
is currently drawn in that area. Contrast this with the TRANSPARENT option. OPAQUE is the default.
</para>
</listitem></varlistentry>
<varlistentry><term>TRANSPARENT</term>
<listitem>
<para>
The background area of the text is left unchanged. (The background color option is ignored if it is used.) This
has the effect of writing the text over the top of whatever is currently drawn in the area the text will occupy.
Contrast this with the OPAQUE option.
</para>
</listitem></varlistentry>
<varlistentry><term>CLIENT</term>
<listitem>
<para>
The position for the text will be relative to the <xref linkend="defClientArea"/> of the dialog
or dialog control rather than relative to the window itself.
</para>
</listitem></varlistentry>
<varlistentry><term>THIN</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 100.
</para>
</listitem></varlistentry>
<varlistentry><term>EXTRALIGHT</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 200.
</para>
</listitem></varlistentry>
<varlistentry><term>LIGHT</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 300.
</para>
</listitem></varlistentry>
<varlistentry><term>MEDIUM</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 500.
</para>
</listitem></varlistentry>
<varlistentry><term>SEMIBOLD</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 600.
</para>
</listitem></varlistentry>
<varlistentry><term>BOLD</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 700.
</para>
</listitem></varlistentry>
<varlistentry><term>EXTRABOLD</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 800.
</para>
</listitem></varlistentry>
<varlistentry><term>HEAVY</term>
<listitem>
<para>
The weight of the font in a range of 0 through 1000 will be 900.
</para>
</listitem></varlistentry>
<varlistentry><term>UNDERLINE</term>
<listitem>
<para>
An underline font is used.
</para>
</listitem></varlistentry>
<varlistentry><term>ITALIC</term>
<listitem>
<para>
An italic font is used.
</para>
</listitem></varlistentry>
<varlistentry><term>STRIKEOUT</term>
<listitem>
<para>
A strike out font is used.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term>fg [optional]</term>
<listitem>
<para>
The color index for the text foreground color. If omitted, the text color is left unchanged.
</para>
</listitem></varlistentry>
<varlistentry><term>bk [optional]</term>
<listitem>
<para>
The color index of the background color. If omitted, the background color is left unchanged. The background color
is not used in transparent mode.
</para>
</listitem></varlistentry>
</variablelist>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
Returns 0 on success and 1 on error.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
This method sets <computeroutput>.systemErrorCode</computeroutput> to the error code set by the operating system
when a failure in one of the Win32 APIs is detected. However, there is one Win32 API,
<computeroutput>SelectObject()</computeroutput>, that does not set the system error code on failure. It is unlikely
that it will fail, but if it does, the ooDialog framework sets <computeroutput>.systemErrorCode</computeroutput> to
<computeroutput>156</computeroutput>, ERROR_SIGNAL_REFUSED.
</para>
<para>
The text message for error code <computeroutput>156</computeroutput> is: <emphasis role="italic">The recipient
process has refused the signal.</emphasis> In this case, the text message is not really related to the failure, it
is just used to indicate that the <computeroutput>SelectObject()</computeroutput> API failed.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details:</emphasis></term>
<listitem>
<para>
Sets the <xref linkend="dotSystemErrorCode"/>. See the remarks above.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
The following example writes the string &quot;Hello world!&quot; to the dialog using a blue 24pt Arial font in bold
and transparent, italic style:
<programlisting>
<![CDATA[
dlg~write(5, 5, "Hello world!", "Arial", 24, "BOLD ITALIC TRANSPARENT CLIENT", 4)
]]>
</programlisting>
</para>
</listitem></varlistentry>
</variablelist>
</section>
<section id="mthWriteDirect" xreflabel="writeDirect"><title>writeDirect</title>
<indexterm><primary>writeDirect</primary></indexterm>
<indexterm><primary>WindowExtensions class</primary><secondary>writeDirect</secondary></indexterm>
<indexterm><primary>dialog object</primary><secondary>writeDirect</secondary></indexterm>
<indexterm><primary>dialog control object</primary><secondary>writeDirect</secondary></indexterm>
<programlisting>
<![CDATA[
>>--writeDirect(--dc--,--xPos--,--yPos--,--text--)---><
]]>
</programlisting>
<para>The writeDirect method enables you to write text
to a device context at a given position. </para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem><para>The arguments are:
<variablelist>
<varlistentry><term>dc</term>
<listitem><para>A device context.
</para></listitem></varlistentry>
<varlistentry><term>xPos, yPos</term>
<listitem><para>The position where the text is placed, in pixels.
</para></listitem></varlistentry>
<varlistentry><term>text</term>
<listitem><para>The string you want to write to the dialog or dialog control.
</para></listitem></varlistentry>
</variablelist>
</para></listitem></varlistentry>
</variablelist>
</section>
</section> <!-- End WindowExtensions Mixin Class -->