File: CastleWindow.TCastleWindowCustom.html

package info (click to toggle)
castle-game-engine 5.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 185,428 kB
  • sloc: pascal: 260,781; cpp: 1,363; objc: 713; makefile: 537; xml: 496; sh: 480; php: 4
file content (1885 lines) | stat: -rw-r--r-- 144,716 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleWindow: Class TCastleWindowCustom</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TCastleWindowCustom"></a><h1 class="cio">Class TCastleWindowCustom</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td><a class="section" href="#PasDoc-InternalTypes">Internal Types</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a  href="CastleWindow.html">CastleWindow</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCastleWindowCustom = class(TComponent)</code></p>
<h2 class="description">Description</h2>
<p>
Window with an OpenGL context. See <a class="normal" href="CastleWindow.html">CastleWindow</a> unit description for more info and examples of use.</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TComponent</li>
<li class="thisitem">TCastleWindowCustom</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-InternalTypes"></a><h3 class="summary">Internal Types</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code><b><a  href="CastleWindow.TCastleWindowCustom.html#TCaptionPart">TCaptionPart</a></b> = (...);</code></td>
</tr>
</table>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#MakeGLAreaContainer">MakeGLAreaContainer</a></b>(GLArea: <a  href="CastleWindow.html#PGtkGLArea">PGtkGLArea</a>): PGtkWidget; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#DoUpdate">DoUpdate</a></b>; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#AllowSuspendForInput">AllowSuspendForInput</a></b>: boolean; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#Rect">Rect</a></b>: <a  href="CastleRectangles.TRectangle.html">TRectangle</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#SwapFullScreen">SwapFullScreen</a></b>; deprecated;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#TouchesCount">TouchesCount</a></b>: Integer;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#Controls">Controls</a></b>: <a  href="CastleUIControls.TUIControlList.html">TUIControlList</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#GLInitialized">GLInitialized</a></b>: boolean;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#Open">Open</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#Open">Open</a></b>(const Retry: <a  href="CastleWindow.html#TGLContextRetryOpenFunc">TGLContextRetryOpenFunc</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#Close">Close</a></b>(QuitWhenLastWindowClosed: boolean = true);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#PostRedisplay">PostRedisplay</a></b>; deprecated;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#Invalidate">Invalidate</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#MakeCurrent">MakeCurrent</a></b>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#SaveScreen">SaveScreen</a></b>(const URL: string); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#SaveScreen">SaveScreen</a></b>: <a  href="CastleImages.TRGBImage.html">TRGBImage</a>; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#SaveScreen">SaveScreen</a></b>(const SaveRect: <a  href="CastleRectangles.TRectangle.html">TRectangle</a>): <a  href="CastleImages.TRGBImage.html">TRGBImage</a>; overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#SaveScreenToGL">SaveScreenToGL</a></b>(const ScalingPossible: boolean = false): <a  href="CastleGLImages.TGLImage.html">TGLImage</a>; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#SaveScreenToGL">SaveScreenToGL</a></b>(const SaveRect: <a  href="CastleRectangles.TRectangle.html">TRectangle</a>; const ScalingPossible: boolean = false): <a  href="CastleGLImages.TGLImage.html">TGLImage</a>; overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#SaveScreenBuffer">SaveScreenBuffer</a></b>: <a  href="CastleGLImages.html#TColorBuffer">TColorBuffer</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#SaveScreenDialog">SaveScreenDialog</a></b>(ProposedURL: string);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a  href="CastleWindow.TCastleWindowCustom.html#Create">Create</a></b>(AOwner: TComponent); override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <b><a  href="CastleWindow.TCastleWindowCustom.html#Destroy">Destroy</a></b>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#OpenAndRun">OpenAndRun</a></b>; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#OpenAndRun">OpenAndRun</a></b>(const ACaption: string; AOnRender: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a>); overload; deprecated;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#ParseParameters">ParseParameters</a></b>( const AllowedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a> = <a  href="CastleWindow.html#StandardParseOptions">StandardParseOptions</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#ParseParameters">ParseParameters</a></b>( const AllowedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a>; out SpecifiedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <b><a  href="CastleWindow.TCastleWindowCustom.html#ParseParametersHelp">ParseParametersHelp</a></b>( const AllowedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a>; AddHeader: boolean): string;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#FileDialog">FileDialog</a></b>(const Title: string; var URL: string; OpenDialog: boolean; FileFilters: <a  href="CastleFileFilters.TFileFilterList.html">TFileFilterList</a> = nil): boolean; overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#FileDialog">FileDialog</a></b>(const Title: string; var URL: string; OpenDialog: boolean; const FileFilters: string): boolean; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#ColorDialog">ColorDialog</a></b>(var Color: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>): boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#ColorDialog">ColorDialog</a></b>(var Color: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>): boolean;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#ColorDialog">ColorDialog</a></b>(var Color: <a  href="CastleVectors.html#TVector3Byte">TVector3Byte</a>): boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#MessageOK">MessageOK</a></b>(const S: string; const MessageType: <a  href="CastleWindow.html#TWindowMessageType">TWindowMessageType</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleWindow.TCastleWindowCustom.html#MessageYesNo">MessageYesNo</a></b>(const S: string; const MessageType: <a  href="CastleWindow.html#TWindowMessageType">TWindowMessageType</a> = mtQuestion): boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleWindow.TCastleWindowCustom.html#SetDemoOptions">SetDemoOptions</a></b>(ASwapFullScreen_Key: <a  href="CastleKeysMouse.html#TKey">TKey</a>; AClose_CharKey: char; AFpsShowOnCaption: boolean);</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#BorderWidth">BorderWidth</a></b>: Cardinal
    read FBorderWidth write FBorderWidth default 0;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Container">Container</a></b>: TContainer read FContainer;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Width">Width</a></b>: integer read FWidth write FWidth default <a  href="CastleWindow.html#WindowDefaultSize">WindowDefaultSize</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Height">Height</a></b>: integer read FHeight write FHeight default <a  href="CastleWindow.html#WindowDefaultSize">WindowDefaultSize</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Dpi">Dpi</a></b>: integer read FDpi write FDpi default <a  href="CastleUIControls.html#DefaultDpi">DefaultDpi</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Left">Left</a></b>: integer read FLeft write FLeft default <a  href="CastleWindow.html#WindowPositionCenter">WindowPositionCenter</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Top">Top</a></b> : integer read FTop write FTop default <a  href="CastleWindow.html#WindowPositionCenter">WindowPositionCenter</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#FullScreen">FullScreen</a></b>: boolean read FFullScreen write SetFullScreen default false;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#DoubleBuffer">DoubleBuffer</a></b>: boolean read FDoubleBuffer write FDoubleBuffer default true;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#RedBits">RedBits</a></b>: Cardinal read FRedBits write FRedBits default 0;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#GreenBits">GreenBits</a></b>: Cardinal read FGreenBits write FGreenBits default 0;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#BlueBits">BlueBits</a></b>: Cardinal read FBlueBits write FBlueBits default 0;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#ColorBits">ColorBits</a></b>: Cardinal read GetColorBits write SetColorBits stored false default 0;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MousePosition">MousePosition</a></b>: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>
      read FMousePosition write SetMousePosition;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Touches">Touches</a></b>[Index:Integer]: <a  href="CastleUIControls.TTouch.html">TTouch</a> read GetTouches;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a></b>: <a  href="CastleWindow.html#TResizeAllowed">TResizeAllowed</a>
      read FResizeAllowed write FResizeAllowed default raAllowed;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnOpen write SetOnOpen;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnOpenObject">OnOpenObject</a></b>: <a  href="CastleUIControls.html#TContainerObjectEvent">TContainerObjectEvent</a> read GetOnOpenObject write SetOnOpenObject;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a></b>: Integer read FMinWidth write FMinWidth default 100;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MinHeight">MinHeight</a></b>: Integer read FMinHeight write FMinHeight default 100;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a></b>: Integer read FMaxWidth write FMaxWidth default 4000;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MaxHeight">MaxHeight</a></b>: Integer read FMaxHeight write FMaxHeight default 4000;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#DepthBits">DepthBits</a></b>: Cardinal
      read FDepthBits write FDepthBits default <a  href="CastleWindow.html#DefaultDepthBits">DefaultDepthBits</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#StencilBits">StencilBits</a></b>: Cardinal
      read FStencilBits write FStencilBits default 0;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MultiSampling">MultiSampling</a></b>: Cardinal
      read FMultiSampling write FMultiSampling default 1;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#AntiAliasing">AntiAliasing</a></b>: <a  href="CastleWindow.html#TAntiAliasing">TAntiAliasing</a>
      read FAntiAliasing write SetAntiAliasing default <a  href="CastleWindow.html#DefaultAntiAliasing">DefaultAntiAliasing</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#AlphaBits">AlphaBits</a></b>: Cardinal
      read FAlphaBits write FAlphaBits default 0;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#AccumBits">AccumBits</a></b>: <a  href="CastleVectors.html#TVector4Cardinal">TVector4Cardinal</a> read FAccumBits write FAccumBits; deprecated;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#GtkIconName">GtkIconName</a></b>: string read FGtkIconName write FGtkIconName;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Visible">Visible</a></b>: boolean read FVisible write FVisible default true;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Caption">Caption</a></b>: string read GetPublicCaption write SetPublicCaption;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnRender write SetOnRender;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnDraw">OnDraw</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnRender write SetOnRender; deprecated;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnBeforeRender">OnBeforeRender</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnBeforeRender write SetOnBeforeRender;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnResize write SetOnResize;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnClose">OnClose</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnClose write SetOnClose;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnCloseObject">OnCloseObject</a></b>: <a  href="CastleUIControls.html#TContainerObjectEvent">TContainerObjectEvent</a> read GetOnCloseObject write SetOnCloseObject;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnPress">OnPress</a></b>: <a  href="CastleUIControls.html#TInputPressReleaseEvent">TInputPressReleaseEvent</a> read GetOnPress write SetOnPress;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnRelease">OnRelease</a></b>: <a  href="CastleUIControls.html#TInputPressReleaseEvent">TInputPressReleaseEvent</a> read GetOnRelease write SetOnRelease;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnCloseQuery">OnCloseQuery</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read FOnCloseQuery write FOnCloseQuery;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnMotion">OnMotion</a></b>: <a  href="CastleUIControls.html#TInputMotionEvent">TInputMotionEvent</a> read GetOnMotion write SetOnMotion;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnUpdate">OnUpdate</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnUpdate write SetOnUpdate;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnIdle">OnIdle</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnUpdate write SetOnUpdate; deprecated;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnTimer">OnTimer</a></b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read FOnTimer write FOnTimer;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnDropFiles">OnDropFiles</a></b>: <a  href="CastleWindow.html#TDropFilesFunc">TDropFilesFunc</a> read FOnDropFiles write FOnDropFiles;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#AutoRedisplay">AutoRedisplay</a></b>: boolean read fAutoRedisplay write SetAutoRedisplay
      default false;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MainMenu">MainMenu</a></b>: <a  href="CastleWindow.TMenu.html">TMenu</a> read FMainMenu write SetMainMenu;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MainMenuVisible">MainMenuVisible</a></b>: boolean
      read FMainMenuVisible write FMainMenuVisible default true;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OwnsMainMenu">OwnsMainMenu</a></b>: boolean read FOwnsMainMenu write FOwnsMainMenu default true;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnMenuClick">OnMenuClick</a></b>: <a  href="CastleWindow.html#TMenuClickFunc">TMenuClickFunc</a> read FOnMenuClick write FOnMenuClick;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#OnMenuCommand">OnMenuCommand</a></b>: <a  href="CastleWindow.html#TMenuClickFunc">TMenuClickFunc</a> read FOnMenuClick write FOnMenuClick; deprecated;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#MousePressed">MousePressed</a></b>: <a  href="CastleKeysMouse.html#TMouseButtons">TMouseButtons</a> read FMousePressed;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Focused">Focused</a></b>: boolean read FFocused;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#UserData">UserData</a></b>: Pointer read FUserData write FUserData;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Closed">Closed</a></b>: boolean read FClosed default true;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Cursor">Cursor</a></b>: <a  href="CastleKeysMouse.html#TMouseCursor">TMouseCursor</a> read FCursor write SetCursor default mcDefault;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#CustomCursor">CustomCursor</a></b>: <a  href="CastleImages.TRGBAlphaImage.html">TRGBAlphaImage</a> read FCustomCursor
      write SetCustomCursor;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#RenderStyle">RenderStyle</a></b>: <a  href="CastleUIControls.html#TRenderStyle">TRenderStyle</a> read GetRenderStyle write SetRenderStyle default rs2D;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Pressed">Pressed</a></b>: <a  href="CastleKeysMouse.TKeysPressed.html">TKeysPressed</a> read FPressed;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Fps">Fps</a></b>: <a  href="CastleTimeUtils.TFramesPerSecond.html">TFramesPerSecond</a> read FFps;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#FpsShowOnCaption">FpsShowOnCaption</a></b>: boolean
      read FFpsShowOnCaption write FFpsShowOnCaption default false;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#SwapFullScreen_Key">SwapFullScreen_Key</a></b>: <a  href="CastleKeysMouse.html#TKey">TKey</a>
      read FSwapFullScreen_Key write FSwapFullScreen_Key default K_None;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#Close_CharKey">Close_CharKey</a></b>: char
      read FClose_CharKey write FClose_CharKey default #0;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleWindow.TCastleWindowCustom.html#FpsCaptionUpdateInterval">FpsCaptionUpdateInterval</a></b>: <a  href="CastleTimeUtils.html#TMilisecTime">TMilisecTime</a>
      read FFpsCaptionUpdateInterval write FFpsCaptionUpdateInterval
      default <a  href="CastleWindow.html#DefaultFpsCaptionUpdateInterval">DefaultFpsCaptionUpdateInterval</a>;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Internal Types</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="TCaptionPart"></a><code><b>TCaptionPart</b> = (...);</code></td>
</tr>
<tr><td colspan="2">
&nbsp;<h6 class="description_section">Values</h6>
<ul>
<li>
cpPublic: &nbsp;</li>
<li>
cpFps: &nbsp;</li>
</ul>
</td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="MakeGLAreaContainer"></a><code>function <b>MakeGLAreaContainer</b>(GLArea: <a  href="CastleWindow.html#PGtkGLArea">PGtkGLArea</a>): PGtkWidget; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Implementation of <code>MakeGLAreaContainer</code> in this class simply returns Result := GLArea. When creating gtk window in Open, I'm 1st creating GLArea widget. Then I'm inserting <code>MakeGLAreaContainer</code>(GLArea) inside my window.

<p>This means that you can override <code>MakeGLAreaContainer</code> if you want your window to contain something more than just OpenGL drawing area (and some menu, derived from <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MainMenu">MainMenu</a> property). You can e.g. create in <code>MakeGLAreaContainer</code> some complex container, put there many various GTK widgets, connect your signals to them, and then put GLArea inside it. This way using this function you can extend window <a class="normal" href="CastleWindow.TCastleWindowCustom.html">TCastleWindowCustom</a> with whatever GTK GUI you like.

<p>The only requirement is that GLArea widget must be placed somewhere inside widget that you return in this function.

<p>Note: if you create here some widgets, remember to show them using gtk_widget_show.

<p>Some notes about using this function: Using this function kills some part of portability of <a class="normal" href="CastleWindow.html">CastleWindow</a> unit, as this function exists only when <a class="normal" href="CastleWindow.html">CastleWindow</a> is implemented on top of GTK, so you will have to always use <a class="normal" href="CastleWindow.html">CastleWindow</a> implemented on top GTK on every OS, e.g. with Windows version of your program you will have to distribute GTK and GtkGLExt/GLArea for Windows. This is not really a problem, since GTK 2.x and GtkGLExt work excellent also under Windows (you know, GTK itself is a library that provides great portability). However this raises a question: what are advantages of using in such situation <a class="normal" href="CastleWindow.html">CastleWindow</a> unit (as opposed to just using directly Gtk and GtkGLExt API without any need for <a class="normal" href="CastleWindow.html">CastleWindow</a> unit): well, my advice is that if your program uses it's OpenGL area as it's central and crucial part (and using some GUI only to e.g. get some input from user about what to display in OpenGL area), than using <a class="normal" href="CastleWindow.html">CastleWindow</a> unit may be more straightforward as you have to write much less code in Gtk.

<p>Example of using this can be found in examples/window/test_window_gtk_mix</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="DoUpdate"></a><code>procedure <b>DoUpdate</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AllowSuspendForInput"></a><code>function <b>AllowSuspendForInput</b>: boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is it allowed to suspend (for an indefinite amount of time) waiting for user input.

<p>Allowing this is a good thing, as it means our process doesn't eat your CPU when it simply waits, doing nothing, for user input. On the other hand, you cannot allow this if you want to do some things continously, regardless of user input.

<p>The default implementation plays it safe, and does not allow suspending if we have <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnUpdate">OnUpdate</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnTimer">OnTimer</a> or such callback defined.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Rect"></a><code>function <b>Rect</b>: <a  href="CastleRectangles.TRectangle.html">TRectangle</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Rectangle representing the inside of this container. Always (Left,Bottom) are zero, and (Width,Height) correspond to window sizes.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SwapFullScreen"></a><code>procedure <b>SwapFullScreen</b>; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
Deprecated, instead just do <code>FullScreen := not FullScreen</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TouchesCount"></a><code>function <b>TouchesCount</b>: Integer;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Controls"></a><code>function <b>Controls</b>: <a  href="CastleUIControls.TUIControlList.html">TUIControlList</a>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GLInitialized"></a><code>function <b>GLInitialized</b>: boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is the OpenGL context initialized. This is equivalent to <code>not Closed</code>, which means we are between an <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Close">Close</a> calls.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Open"></a><code>procedure <b>Open</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Create the window with associated OpenGL context and show it.

<p></p>

<ul class="paragraph_spacing">
  <li><p>Create window, it's OpenGL area, optionally it's menu.</p></li>
  <li><p>Create OpenGL context associated with it's OpenGL area.</p></li>
  <li><p>Show the window.</p></li>
  <li><p>Call <a class="normal" href="CastleGLUtils.html#GLInformationInitialize">GLInformationInitialize</a> to initialize <a class="normal" href="CastleGLVersion.html#GLVersion">GLVersion</a>, <a class="normal" href="CastleGLVersion.html#GLUVersion">GLUVersion</a>, <a class="normal" href="CastleGLUtils.html#GLFeatures">GLFeatures</a>.</p></li>
  <li><p>Initial events called: </p>

<ul class="compact_spacing">
  <li><p>Call <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MakeCurrent">MakeCurrent</a>, EventOpen (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a>)</p></li>
  <li><p>Call <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MakeCurrent">MakeCurrent</a>, EventResize (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a>)</p></li>
  <li><p>Call <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MakeCurrent">MakeCurrent</a> once again, to be sure that after Open active OpenGL context is the one associated with newly created window (in case you would change active OpenGL context inside EventResize (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a>), which is allowed).</p></li>
</ul>

<p> </p></li>
</ul>

<p>

<p>Call to this method is ignored if the window is already open (if <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Closed">Closed</a> = <code>False</code>).

<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleWindow.EGLContextNotPossible.html">EGLContextNotPossible</a></dt>
<dd>If it's not possible to obtain OpenGL context with specified attributes. For example, maybe you set <a class="normal" href="CastleWindow.TCastleWindowCustom.html#AlphaBits">AlphaBits</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#DepthBits">DepthBits</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#StencilBits">StencilBits</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#AccumBits">AccumBits</a> properties too high?

<p>It's guaranteed that when <a class="normal" href="CastleWindow.EGLContextNotPossible.html">EGLContextNotPossible</a> is raised, the window remains in correct (closed) state. This means that you can catch <a class="normal" href="CastleWindow.EGLContextNotPossible.html">EGLContextNotPossible</a> and lower some OpenGL buffer requirements and try to open once again. Although it's usually more comfortable to use the overloaded version of <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> with Retry callback for this purpose.

<p>This parameterless version of Open automatically turns off multi-sampling (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#AntiAliasing">AntiAliasing</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MultiSampling">MultiSampling</a> properties), and then we turn off stencil buffer (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#StencilBits">StencilBits</a>), if OpenGL context cannot be initialized. But if it still cannot be initialized, we raise <a class="normal" href="CastleWindow.EGLContextNotPossible.html">EGLContextNotPossible</a>. You can use overloaded Open version with Retry callback to customize this fallback mechanism, to code which OpenGL context features may be turned off.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Open"></a><code>procedure <b>Open</b>(const Retry: <a  href="CastleWindow.html#TGLContextRetryOpenFunc">TGLContextRetryOpenFunc</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Open the window with OpenGL context, allowing you to lower the OpenGL context requirements and retry.

<p>If the OpenGL context cannot be initialized, then <code>Retry</code> callback is called. Inside this callback you should either:

<p></p>

<ul class="paragraph_spacing">
  <li><p>lower some context requirements (like set <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MultiSampling">MultiSampling</a> to 1 if it was &gt; 1) if possible, and return <code>True</code> to retry, or</p></li>
  <li><p>do not change context requirements and return <code>False</code> to give up.</p></li>
</ul>

<p>

<p>Note that the parameterless version of <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> method actually calls this version, with a default retry callback that turns off <a class="normal" href="CastleWindow.TCastleWindowCustom.html#AntiAliasing">AntiAliasing</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MultiSampling">MultiSampling</a>, and then <a class="normal" href="CastleWindow.TCastleWindowCustom.html#StencilBits">StencilBits</a> (since all our engine code should be ready that multi-sampling or stencil buffers may not be available). Using your own Retry callback, with this version, allows you to decide which context parameters may be lowered to allow creating a window.

<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleWindow.EGLContextNotPossible.html">EGLContextNotPossible</a></dt>
<dd>If it's not possible to obtain requested OpenGL context, and the <code>Retry</code> callback returned <code>False</code>.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Close"></a><code>procedure <b>Close</b>(QuitWhenLastWindowClosed: boolean = true);</code></td>
</tr>
<tr><td colspan="2">
<p>
Close window.

<p></p>

<ul class="paragraph_spacing">
  <li><p>Calls <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnClose">OnClose</a>.</p></li>
  <li><p>Hides window, destroys it.</p></li>
  <li><p> if this was the only open <a class="normal" href="CastleWindow.TCastleWindowCustom.html">TCastleWindowCustom</a> window and QuitWhenLastWindowClosed = true then this calls Application.Quit.</p></li>
</ul>

<p>

<p>Note that often there's no need to call Close explicitly in your program, because in destructor of this object we call Close, to be sure that window is closed.

<p>TODO: zrobic param boolean CloseFromDestroyQuitWhenLastWindowClosed? As for now Close from destructor is called always with QuitWhenLastWindowClosed = true.

<p>Call to Close is ignored if window is already Closed.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="PostRedisplay"></a><code>procedure <b>PostRedisplay</b>; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
 Deprecated name for <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Invalidate">Invalidate</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Invalidate"></a><code>procedure <b>Invalidate</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
See <a class="normal" href="CastleUIControls.TUIContainer.html#Invalidate">TUIContainer.Invalidate</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MakeCurrent"></a><code>procedure <b>MakeCurrent</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Make the OpenGL context of this window &quot;current&quot; (following OpenGL commands will apply to this). When the window is opened, and right before calling any window callback, we always automatically call this, so you should not need to call this method yourself in normal circumstances.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveScreen"></a><code>procedure <b>SaveScreen</b>(const URL: string); overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Capture the current window contents to an image (file).

<p>These functions take care of making a redraw before capturing screen contents. That's because you can only reliably capture the screen contents of the back buffer (before swap) using OpenGL. In theory, the single-buffer case could be optimized (do not redraw if not needed, that is: if not invalidated), but it's not worth the complication since noone uses single-buffer for normal applications... And also, there is no reliable way to capture screen contents in case of single-buffer.

<p>Note that only capturing the double-buffered windows (the default) is reliable. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveScreen"></a><code>function <b>SaveScreen</b>: <a  href="CastleImages.TRGBImage.html">TRGBImage</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveScreen"></a><code>function <b>SaveScreen</b>(const SaveRect: <a  href="CastleRectangles.TRectangle.html">TRectangle</a>): <a  href="CastleImages.TRGBImage.html">TRGBImage</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveScreenToGL"></a><code>function <b>SaveScreenToGL</b>(const ScalingPossible: boolean = false): <a  href="CastleGLImages.TGLImage.html">TGLImage</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveScreenToGL"></a><code>function <b>SaveScreenToGL</b>(const SaveRect: <a  href="CastleRectangles.TRectangle.html">TRectangle</a>; const ScalingPossible: boolean = false): <a  href="CastleGLImages.TGLImage.html">TGLImage</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveScreenBuffer"></a><code>function <b>SaveScreenBuffer</b>: <a  href="CastleGLImages.html#TColorBuffer">TColorBuffer</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Color buffer where we draw, and from which it makes sense to grab pixels. Use with <a class="normal" href="CastleGLImages.html#SaveScreen_NoFlush">SaveScreen_NoFlush</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SaveScreenDialog"></a><code>procedure <b>SaveScreenDialog</b>(ProposedURL: string);</code></td>
</tr>
<tr><td colspan="2">
<p>
Asks and saves current screenshot. Asks user where to save the file (using <a class="normal" href="CastleWindow.TCastleWindowCustom.html#FileDialog">FileDialog</a>, as default URL taking ProposedURL). If user accepts calls Window.SaveScreen. In case of problems with saving, shows a dialog (doesn't raise exception).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>(AOwner: TComponent); override;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OpenAndRun"></a><code>procedure <b>OpenAndRun</b>; overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Shortcut for Open (create and show the window with GL contex) and Application.Run (run the event loop).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OpenAndRun"></a><code>procedure <b>OpenAndRun</b>(const ACaption: string; AOnRender: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a>); overload; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
Shortcut for setting Caption, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a>, then calling Open (create and show the window with GL contex) and Application.Run (run the event loop).

<p> Deprecated, it is cleaner to just set Caption and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a> as properties, and then use parameterless <code>OpenAndRun</code> version. In many programs, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a> is not even used, as you render your stuff inside various <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> instances.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ParseParameters"></a><code>procedure <b>ParseParameters</b>( const AllowedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a> = <a  href="CastleWindow.html#StandardParseOptions">StandardParseOptions</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Parse some command-line options and remove them from <a class="normal" href="CastleParameters.html#Parameters">Parameters</a> list. AllowedOptions specify which command-line options are handled. See [<a  href="http://castle-engine.sourceforge.net/opengl_options.php">http://castle-engine.sourceforge.net/opengl_options.php</a>] for documentaion what these options actually do from user's point of view.

<p></p>

<dl class="paragraph_spacing">
  <dt>poGeometry</dt>
  <dd><p>Handle these command-line options: </p>

<ul class="compact_spacing">
  <li><p>--fullscreen: sets FullScreen to <code>True</code>.</p></li>
  <li><p>--geometry: sets FullScreen to <code>False</code> and changes <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Left">Left</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Top">Top</a> as user wants.</p></li>
</ul>

<p> </p></dd>
  <dt>poScreenGeometry</dt>
  <dd><p>Handle --fullscreen-custom: sets FullScreen and VideoResize to <code>True</code>, initializes VideResizeWidth and VideResizeHeight and actually tries to change your desktop resolution by VideoChange.</p></dd>
  <dt>poDisplay</dt>
  <dd><p>Handle --display: sets Application.XDisplayName under Unix.</p></dd>
  <dt>poMacOsXProcessSerialNumber</dt>
  <dd><p> (Only relevant on Mac OS X) A special parameter -psvn_x_xxx will be found and removed from the <a class="normal" href="CastleParameters.html#Parameters">Parameters</a> list. See <a  href="http://forums.macrumors.com/showthread.php?t=207344">http://forums.macrumors.com/showthread.php?t=207344</a> and <a  href="http://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder">http://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder</a> . </p></dd>
</dl>

<p>

<p>Multiple options of the same kind are allowed, for example two options <code>&ndash;fullscreen &ndash;geometry 100x100+0+0</code> are allowed. Each of them will have appropriate effect, in the above example, --fullscreen param will be overridden by following --geometry param. Such overridding is sometimes useful from shell scripts.

<p>Overloaded version with SpecifiedOptions says which command-line options were found and handled. For example, if poGeometry, then you know that user requested some window size.

<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleParameters.EInvalidParams.html">EInvalidParams</a></dt>
<dd>When some of our options have invalid arguments.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ParseParameters"></a><code>procedure <b>ParseParameters</b>( const AllowedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a>; out SpecifiedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ParseParametersHelp"></a><code>class function <b>ParseParametersHelp</b>( const AllowedOptions: <a  href="CastleWindow.html#TWindowParseOptions">TWindowParseOptions</a>; AddHeader: boolean): string;</code></td>
</tr>
<tr><td colspan="2">
<p>
Help text for options in AllowedOptions. The idea is that if you call <code><a class="normal" href="CastleWindow.TCastleWindowCustom.html#ParseParameters">ParseParameters</a>(AllowedOptions)</code> in your program then you should also show your users somwhere (e.g. in response to &quot;&ndash;help&quot; option) the list of allowed options obtained by <code><code>ParseParametersHelp</code>(AllowedOptions)</code> (i.e. with the same value of AllowedOptions).

<p>Returned string may be multiline, but it does not contain the trailing newline (newline char after the last line).

<p>Returned help text conforms to rules in <code>castle_game_engine/doc/kambi_command_line_params.txt</code>.

<p>If AddHeader then it adds line saying <code>'Window options:'</code> (and showing backend name, for debug purposes) at the beginning. This allows you to comfortably use the output of this function as a whole paragraph (separated from the rest of your &quot;&ndash;help&quot; text by e.g. empty lines around).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FileDialog"></a><code>function <b>FileDialog</b>(const Title: string; var URL: string; OpenDialog: boolean; FileFilters: <a  href="CastleFileFilters.TFileFilterList.html">TFileFilterList</a> = nil): boolean; overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Select a file to open or save. Accepts and returns argument as an URL. Passing a filename as an URL is also allowed (as everywhere), it may be changed into an URL on return.

<p>This dialog may also allow user for some typical file-management operations by the way (create some directories, rename some files etc.).

<p>Returns <code>True</code> and sets URL accordingly if user chooses some file and accepts it. Returns <code>False</code> if user cancels.

<p>

<p>

<p>

<p>

<p></p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>Title</dt>
<dd>A dialog title.</dd>
<dt>URL</dt>
<dd>Specifies default file as an URL (or simple filename).

<p>In short, things are designed such that for normal file viewers, you can give here the URL of last opened file, or '' if none.

<p>This URL can be absolute or relative, may include a path, may include a name. If you specify only a path (remember to end it with the slash), then it's the default path where to save the file. If you specify the name (component after final slash), then it's the proposed file name for saving (for OpenDialog, this proposed file name is ignored, since that's more natural for open dialogs).

<p>Empty value ('') always means the same as &quot;current directory&quot;, guaranteed. So it's equivalent to <code><a class="normal" href="CastleURIUtils.html#URICurrentPath">URICurrentPath</a></code>.

<p>Note that the path must end with a slash. Otherwise '/tmp/blah' would be ambigous (it could mean either file name 'blah' in the dir '/tmp/' dir, or dir '/tmp/blah' without a proposed file name).</dd>
<dt>OpenDialog</dt>
<dd>Is this an open (<code>True</code>) or save (<code>False</code>) file dialog.

<p></p>

<ul class="paragraph_spacing">
  <li><p> If OpenDialog = <code>True</code>: force the user to only choose existing (and readable) file. The intention is that you can open file indicated by URL, at least for reading. There is no guarantee about it though (it's not possible to guarantee it on a multi-process OS), the only 100% sure way to know that the file can be opened and read is to actually try to do it.

<p>To directly read a file (as a stream) from the obtained URL you should usually use our <a class="normal" href="CastleDownload.html#Download">CastleDownload.Download</a> function. This way you get a readable stream and you automatically support loading data from the other protocols (http, data etc.) too.</p></li>
  <li><p> If OpenDialog = <code>False</code>: a save dialog. Allows user to select a non-existing file. If user chooses an existing file, some backends may show a warning like <i>&quot;Are you sure you want to overwrite this file?&quot;</i>.

<p>The intention is that directory of the returned file should exist, and you should be able to write files there. But, again, there is no 100% guarantee about it. The only way to be sure whether you can save a file is to actually try to do it.

<p>To directly write to a file (as a stream) to the obtained URL you should usually use our <a class="normal" href="CastleDownload.html#URLSaveStream">URLSaveStream</a>.</p></li>
</ul>

<p></dd>
<dt>FileFilters</dt>
<dd>A set of file filters to present to user. Pass <code>Nil</code> (default) if you do not want to use file file filters, so user will just always see everything. An overloaded version allows you to pass file filters encoded in a single string, this may be slightly more comfortable for call, see <a class="normal" href="CastleFileFilters.TFileFilterList.html#AddFiltersFromString">TFileFilterList.AddFiltersFromString</a> for explanation how to encode filters in a string.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FileDialog"></a><code>function <b>FileDialog</b>(const Title: string; var URL: string; OpenDialog: boolean; const FileFilters: string): boolean; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ColorDialog"></a><code>function <b>ColorDialog</b>(var Color: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>): boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Shows a dialog window allowing user to choose an RGB color. Initial value of Color specifies initial RGB values proposed to the user. If user accepts, returns true and sets Color accordingly, else returns false (and does not modify Color).

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ColorDialog"></a><code>function <b>ColorDialog</b>(var Color: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>): boolean;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ColorDialog"></a><code>function <b>ColorDialog</b>(var Color: <a  href="CastleVectors.html#TVector3Byte">TVector3Byte</a>): boolean;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MessageOK"></a><code>procedure <b>MessageOK</b>(const S: string; const MessageType: <a  href="CastleWindow.html#TWindowMessageType">TWindowMessageType</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Simple &quot;OK&quot; dialog box.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MessageYesNo"></a><code>function <b>MessageYesNo</b>(const S: string; const MessageType: <a  href="CastleWindow.html#TWindowMessageType">TWindowMessageType</a> = mtQuestion): boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Simple yes/no question dialog box.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDemoOptions"></a><code>procedure <b>SetDemoOptions</b>(ASwapFullScreen_Key: <a  href="CastleKeysMouse.html#TKey">TKey</a>; AClose_CharKey: char; AFpsShowOnCaption: boolean);</code></td>
</tr>
<tr><td colspan="2">
<p>
Configure some options typically used by &quot;demo&quot; applications.</p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="BorderWidth"></a><code>property <b>BorderWidth</b>: Cardinal
    read FBorderWidth write FBorderWidth default 0;</code></td>
</tr>
<tr><td colspan="2">
<p>
Change this only when Closed. This is the width of border of main GtkWindow that will be created in Open, set with gtk_container_set_border_width.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Container"></a><code>property <b>Container</b>: TContainer read FContainer;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Width"></a><code>property <b>Width</b>: integer read FWidth write FWidth default <a  href="CastleWindow.html#WindowDefaultSize">WindowDefaultSize</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Size of the window OpenGL area. Together with frame and border sizes, and eventually menu bar size, this determines the final window size.

<p>When the window is open, these are read-only (may only change through internal methods, that is: we'll update <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Left">Left</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Top">Top</a> to reflect current size and position).

<p><a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinHeight">MinHeight</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxHeight">MaxHeight</a> place constraints on these values (rigorously honored when window is open): always <code><a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a> &lt;= Width &lt;= <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a></code> and <code><a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinHeight">MinHeight</a> &lt;= Height &lt;= <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxHeight">MaxHeight</a></code>.

<p><a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a> places constrains when window manager and user may change window size. In particular, when <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a> &lt;&gt; raAllowed then window sizes cannot change when window is open.

<p>Note that for some window managers, we cannot always reliably force the size constraints and block resizing on the desktop. If you set rigorous size constraints, or <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a> &lt;&gt; raAllowed, you may find that window manager still resizes the window. In such cases, we may fake our size a little &mdash; <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> values may not correspond to actual size as seen on the desktop. This is comfortable, as in such cases you usually want to just ignore window managers limits and just proceed as if your size requirements are satisfied.

<p>Special <a class="normal" href="CastleWindow.html#WindowDefaultSize">WindowDefaultSize</a> value of these properties means: at <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a>, use some comfortable size slightly smaller than desktop size. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Height"></a><code>property <b>Height</b>: integer read FHeight write FHeight default <a  href="CastleWindow.html#WindowDefaultSize">WindowDefaultSize</a>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Dpi"></a><code>property <b>Dpi</b>: integer read FDpi write FDpi default <a  href="CastleUIControls.html#DefaultDpi">DefaultDpi</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Window <code>DPI</code>. Defaults to 96, so it is recommended to set to correct value on higher density displays.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Left"></a><code>property <b>Left</b>: integer read FLeft write FLeft default <a  href="CastleWindow.html#WindowPositionCenter">WindowPositionCenter</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Window position on the screen. If one (or both) of them is equal to <a class="normal" href="CastleWindow.html#WindowPositionCenter">WindowPositionCenter</a> at the initialization (Open) time, then it will be set to position the window at the screen center. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Top"></a><code>property <b>Top</b> : integer read FTop write FTop default <a  href="CastleWindow.html#WindowPositionCenter">WindowPositionCenter</a>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FullScreen"></a><code>property <b>FullScreen</b>: boolean read FFullScreen write SetFullScreen default false;</code></td>
</tr>
<tr><td colspan="2">
<p>
Whether the window is fullscreen. This forces <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> and position and window style to fill the whole screen.

<p>Note that we always set fullscreen UI (no border, size matching Application.ScreenWidth and Application.ScreenHeight), ignoring the window size constraints like <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinHeight">MinHeight</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxHeight">MaxHeight</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a>. For example we do not check does Application.ScreenWidth fit inside <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a>. It's assumed that you really want to set/unset the fullscreen UI if you change this property. However, the sizes known to your application (stored in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a>) are still constrained by <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinHeight">MinHeight</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxHeight">MaxHeight</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a>.

<p>You can change this always, even on already open window. Just note that some backends don't allow to switch this without destroying / recreating the OpenGL context. So be prepared that changing FullScreen may result in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnClose">OnClose</a> + <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a> sequence, so make sure that closing and opening recreates the whole necessary OpenGL state exactly as it was. This is usually natural, all our <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> automatically work with this, so this is only a concern if you do some direct OpenGL tricks.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DoubleBuffer"></a><code>property <b>DoubleBuffer</b>: boolean read FDoubleBuffer write FDoubleBuffer default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Should we request and use the double buffer. After every draw, we automatically swap buffers (if <code>DoubleBuffer</code>) or call glFlush (if not <code>DoubleBuffer</code>).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="RedBits"></a><code>property <b>RedBits</b>: Cardinal read FRedBits write FRedBits default 0;</code></td>
</tr>
<tr><td colspan="2">
<p>
Required red / green / blue color buffer precision for this window. When 0, the default window system color precision will be used.

<p>You can either set them by separate red / green / blue properties. Or you can use <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ColorBits">ColorBits</a> that reads / writes all three channels bits. Reading <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ColorBits">ColorBits</a> simply returns the sum of <code><code>RedBits</code> + <a class="normal" href="CastleWindow.TCastleWindowCustom.html#GreenBits">GreenBits</a> + <a class="normal" href="CastleWindow.TCastleWindowCustom.html#BlueBits">BlueBits</a></code>. Writing <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ColorBits">ColorBits</a> simply set <code>RedBits</code> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#BlueBits">BlueBits</a> to <code><a class="normal" href="CastleWindow.TCastleWindowCustom.html#ColorBits">ColorBits</a> div 3</code>, and sets <a class="normal" href="CastleWindow.TCastleWindowCustom.html#GreenBits">GreenBits</a> to the remainder. This way green channel has always the best resolution (as is usual, since it's perceived most), and the sum is always as requested. This way setting <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ColorBits">ColorBits</a> to values like 16 or 24 works as expected.

<p>Note that it's also possible to change color resolution by changing the whole screen settings. See <a class="normal" href="CastleWindow.TCastleApplication.html#VideoColorBits">TCastleApplication.VideoColorBits</a> and <a class="normal" href="CastleWindow.TCastleApplication.html#VideoChange">TCastleApplication.VideoChange</a> for this. These properties only request the color resolution for this window, which is less intrusive (you don't change the whole screen) but also may have a smaller chance of success.

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GreenBits"></a><code>property <b>GreenBits</b>: Cardinal read FGreenBits write FGreenBits default 0;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="BlueBits"></a><code>property <b>BlueBits</b>: Cardinal read FBlueBits write FBlueBits default 0;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ColorBits"></a><code>property <b>ColorBits</b>: Cardinal read GetColorBits write SetColorBits stored false default 0;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MousePosition"></a><code>property <b>MousePosition</b>: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>
      read FMousePosition write SetMousePosition;</code></td>
</tr>
<tr><td colspan="2">
<p>
Current mouse position. In case of touch devices, this reports the last known position for FingerIndex = 0, and setting this has no effect.

<p>See <a class="normal" href="CastleUIControls.TTouch.html#Position">TTouch.Position</a> for a documentaion how this is expressed.

<p>In all situations the <code>MousePosition</code> is the latest known mouse position. The only exception is within EventMotion (and so, also in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnMotion">OnMotion</a> callback): <code>MousePosition</code> is then the previous known mouse position, while new mouse position is provided as NewMousePosition argument to EventMotion (and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnMotion">OnMotion</a>).

<p><i>About setting the mouse position:</i>

<p></p>

<ul class="paragraph_spacing">
  <li><p>There is no guarantee that the position was set exactly to what was requested. Various backends have their limitations, and position may be rounded, and almost everywhere position will be clamped to the current screen space.</p></li>
  <li><p>It is undefined whether setting mouse position will generate an <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnMotion">OnMotion</a> event (just as if the user moved the mouse). Some backends do it, some don't, and there is no way to make it consistent (because backend may report the motion event with delay, so we really don't know whether user moved the mouse or was it caused by code).</p></li>
  <li><p>Setting mouse position is always ignored when the window is closed.</p></li>
</ul>

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Touches"></a><code>property <b>Touches</b>[Index:Integer]: <a  href="CastleUIControls.TTouch.html">TTouch</a> read GetTouches;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ResizeAllowed"></a><code>property <b>ResizeAllowed</b>: <a  href="CastleWindow.html#TResizeAllowed">TResizeAllowed</a>
      read FResizeAllowed write FResizeAllowed default raAllowed;</code></td>
</tr>
<tr><td colspan="2">
<p>
When (if at all) window size may be changed.

<p></p>

<ul class="paragraph_spacing">
  <li><p>raNotAllowed

<p><a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> can only change to honor <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinHeight">MinHeight</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxHeight">MaxHeight</a> constraints. Absolutely nothing else may cause them to change, user cannot resize the window.

<p>Note that setting the <a class="normal" href="CastleWindow.TCastleWindowCustom.html#FullScreen">FullScreen</a> property to <code>True</code> works regardless of this. Just don't change <a class="normal" href="CastleWindow.TCastleWindowCustom.html#FullScreen">FullScreen</a> property if you don't want to. However, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> values will be kept unchanged (they will not be updated to Application.ScreenWidth and Application.ScreenHeight), so from the point of view of you code the raNotAllowed works always.

<p>You can be sure that EventResize (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a>) will be called only once, when window is opened (right after initial EventOpen (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a>)).</p></li>
  <li><p>raOnlyAtOpen

<p><a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> may be adjusted when the window is opened, by <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> call. For example window manager may decide that the size is too large for the current screen. Or when you request FullScreen window and window size has to be adjusted to match current screen size. Also they will always be adjusted to fit in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinWidth">MinWidth</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxWidth">MaxWidth</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MinHeight">MinHeight</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MaxHeight">MaxHeight</a> constraints.

<p>After opening, window size cannot change anymore. In particular user cannot resize the window (by dragging border or such). After the first EventOpen (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a>) call, the window size becomes constant. From the first EventResize (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a>) the window size is constant, as long as the window remains open.

<p>You can be sure that EventResize (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a>) will be called only once, when window is opened (right after initial EventOpen (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a>)).</p></li>
  <li><p>raAllowed

<p><a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> may be adjusted at open time, and later user can resize the window too. This is the default value, giving user and window manager the most flexibility.

<p>You have to be prepared for this, handling <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a> and adjusting stuff like OpenGL viewport and projection matrix.</p></li>
</ul>

<p>

<p>Note that the we call the first <a class="normal" href="CastleGLUtils.html#GLViewport">glViewport</a> automatically in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a>. So in typical cases, you don't have to call <a class="normal" href="CastleGLUtils.html#GLViewport">glViewport</a> ever yourself, when <code>ResizeAllowed</code> &lt;&gt; raAllowed.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnOpen"></a><code>property <b>OnOpen</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnOpen write SetOnOpen;</code></td>
</tr>
<tr><td colspan="2">
<p>
OpenGL context is created, initialize things that require OpenGL context. Often you do not need to use this callback (engine components will automatically create/release OpenGL resource when necessary), but sometimes it may be handy (e.g. <a class="normal" href="CastleGLImages.TGLImage.html">TGLImage</a> required OpenGL context). You usually will also want to implement Window.OnClose callback that releases stuff created here.

<p>Instead of using this callback, even when you really need to initialize some OpenGL resource, it's usually better to derive new classes from <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> class or it's descendants, and override their GLContextOpen / GLContextClose methods to react to context being open/closed. Using such <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> classes is usually easier, as you add/remove them from controls whenever you want (e.g. you add them in ApplicationInitialize), and underneath they create/release/create again the OpenGL resources when necessary.

<p>WindowOpen is always *after* ApplicationInitialize. In normal circumstances, for a standalone game, the WindowOpen will happen only once. But for other targets, it may be necessary to close/reopen the OpenGL context many times, e.g. on mobile platforms it's normal that application may &quot;loose&quot; the OpenGL context and it may need to recreate OpenGL resources when it wakes up. Event called when OpenGL context is initialized.

<p>It's guaranteed that every newly opened window will get EventOpen (<code>OnOpen</code>) first, and then EventResize (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnResize">OnResize</a>), and only then &mdash; the other callbacks, as the user uses the window. This is consistent EventOpen (<code>OnOpen</code>) is always the first executed callback and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnClose">OnClose</a> is always the last. This allows you to cleanly initialize / finalize OpenGL resources.

<p>During EventOpen (<code>OnOpen</code>) you already have valid Width / Height values, that is those values were already adjusted if <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a> &lt;&gt; raNotAllowed.

<p><b>Be careful what you do in this callback if you want your game to work on Android or other non-standalone platforms.</b> On Android, OpenGL context may be closed and opened at any time, as user can switch from/to your application at any time. You should use <a class="normal" href="CastleWindow.TCastleApplication.html#OnInitialize">Application.OnInitialize</a> for a one-time initialization (it is executed right before the very first <code>OnOpen</code> would be executed). Use this callback only to create OpenGL resources (destroyed in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnClose">OnClose</a>).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnOpenObject"></a><code>property <b>OnOpenObject</b>: <a  href="CastleUIControls.html#TContainerObjectEvent">TContainerObjectEvent</a> read GetOnOpenObject write SetOnOpenObject;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MinWidth"></a><code>property <b>MinWidth</b>: Integer read FMinWidth write FMinWidth default 100;</code></td>
</tr>
<tr><td colspan="2">
<p>
Minimum and maximum window sizes. Always

<p></p>

<pre class="preformatted">
  0 &lt; MinWidth &lt;= MaxWidth and
  0 &lt; MinHeight &lt;= MaxHeight
</pre>

<p>

<p>We do not allow user to resize the window outside of these constraints.

<p>We also fix window <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> to fit within these constraints when you <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> the window. We do it regardless of <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a> (even when it's raNotAllowed).

<p>In other words, these constraints have a higher priority than <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a> and your desired <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> and even <a class="normal" href="CastleWindow.TCastleWindowCustom.html#FullScreen">FullScreen</a> (setting <a class="normal" href="CastleWindow.TCastleWindowCustom.html#FullScreen">FullScreen</a> property will stil change the visible sizes, but your perceived sizes will be constrained by this min/max). So you can be sure that (as long as window is open) <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a> will always fit in these constraints. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MinHeight"></a><code>property <b>MinHeight</b>: Integer read FMinHeight write FMinHeight default 100;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MaxWidth"></a><code>property <b>MaxWidth</b>: Integer read FMaxWidth write FMaxWidth default 4000;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MaxHeight"></a><code>property <b>MaxHeight</b>: Integer read FMaxHeight write FMaxHeight default 4000;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DepthBits"></a><code>property <b>DepthBits</b>: Cardinal
      read FDepthBits write FDepthBits default <a  href="CastleWindow.html#DefaultDepthBits">DefaultDepthBits</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Required depth buffer precision. Zero means that we don't need depth buffer at all. We may get depth buffer with more precision than requested (we may even get depth buffer when we set <code>DepthBits</code> = 0), this all depends on graphic card.

<p>Default value is 16 (<a class="normal" href="CastleWindow.html#DefaultDepthBits">DefaultDepthBits</a>), which is a reasonable default for 3D programs that want to work with depth test enabled.

<p><i>Design notes:</i> One may ask why default value is not 0?

<p></p>

<ol class="paragraph_spacing">
  <li value="1"><p> Most programs using OpenGL use depth testing, so many programs would have to call something like <code>Window.DepthBits := 16</code>.</p></li>
  <li value="2"><p> Often graphic cards / window systems / OSes give you an OpenGL context with depth buffer <i>even if you don't need depth buffer</i>. I don't say that it's bad. But it makes very easy to forget about doing <code><code>DepthBits</code> := something-non-zero;</code>. If you're writing 3d program and sitting on some system that always gives you depth buffer (even if <code>DepthBits</code> = 0) then it may happen that you forget to write in your program </p>

<pre class="longcode">  Window.DepthBits := <span class="pascal_numeric">16</span>;</pre>

<p>

<p>And while on your system everything will work, you will receive errors on other systems because you forgot to request a depth buffer.</p></li>
</ol>

<p>

<p>Of course, if you are writing a program that does not need depth buffer you should set Window.DepthBits := 0. The only advantage of having default <code>DepthBits</code> = 16 is that if you forget to set Window.DepthBits := 0 your programs will still work (most graphic cards will give you some depth buffer anyway). They will just use more resources than they should.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="StencilBits"></a><code>property <b>StencilBits</b>: Cardinal
      read FStencilBits write FStencilBits default 0;</code></td>
</tr>
<tr><td colspan="2">
<p>
Required stencil buffer precision, zero means that stencil buffer is not needed.

<p>Just like with other XxxBits property, we may get more bits than we requested. But we will never get less &mdash; if window system will not be able to provide GL context with requested number of bits, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> will raise an error.

<p>Note that after initializing OpenGL context (when opening the window), <code>StencilBits</code> is <i>not</i> updated to the current (provided) stencil buffer bit size. For example, if you requested <code>StencilBits</code> := 8, and you got 16-bits buffer: <code>StencilBits</code> value will still remain 8. This is sensible in case you close the window, tweak some settings and try to open it again. Use <code><a class="normal" href="CastleGLUtils.html#glGetInteger">glGetInteger</a>(GL_STENCIL_BITS)</code> when window is open to query current (actual) buffer size.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MultiSampling"></a><code>property <b>MultiSampling</b>: Cardinal
      read FMultiSampling write FMultiSampling default 1;</code></td>
</tr>
<tr><td colspan="2">
<p>
How many samples are required for multi-sampling (anti-aliasing). Use <a class="normal" href="CastleWindow.TCastleWindowCustom.html#AntiAliasing">AntiAliasing</a> instead of this for more comfortable (higher-level) way to turn on multi-sampling (anti-aliasing).

<p>1 means that no multi-sampling is required. Values larger than 1 mean that we require OpenGL context with multi-sampling capabilities. Various GPUs may support various values (it's a trade-off between quality and speed), try typical values 2 or 4.

<p>You can enable/disable anti-aliasing in your program by code like </p>

<pre class="longcode">
        <span class="pascal_keyword">if</span> GLFeatures.Multisample <span class="pascal_keyword">then</span> glEnable(GL_MULTISAMPLE_ARB);
        <span class="pascal_keyword">if</span> GLFeatures.Multisample <span class="pascal_keyword">then</span> glDisable(GL_MULTISAMPLE_ARB);
      </pre>

<p> But usually that's not needed, as it is &quot;on&quot; by default (GL_ARB_multisample spec says so) if you requested multi-sampling context (that is, if this property is &gt; 1). See GL_ARB_multisample spec for details: [<a  href="http://opengl.org/registry/specs/ARB/multisample.txt">http://opengl.org/registry/specs/ARB/multisample.txt</a>].

<p>Just like with other XxxBits property, we may get more samples than we requested (e.g. if you request 3, you will most probably get 4). But we will never get less &mdash; if window system will not be able to provide GL context with requested number of bits, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> will raise an error. TODO: actually, this may change to be similar to Lazarus TOpenGLControl.MultiSampling, and also be more comfortable &mdash; to retry initialization with no multi-sampling. In this case this property will not be changed, to be nice.

<p>You can always read OpenGL GL_SAMPLE_BUFFERS_ARB and GL_SAMPLES_ARB values after initializing OpenGL context, to know exactly how many samples did you actually get, and did you get multi-sampling at all. Actually, we already initialize global CastleGLUtils.GLCurrentMultiSampling for you, you can use this.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AntiAliasing"></a><code>property <b>AntiAliasing</b>: <a  href="CastleWindow.html#TAntiAliasing">TAntiAliasing</a>
      read FAntiAliasing write SetAntiAliasing default <a  href="CastleWindow.html#DefaultAntiAliasing">DefaultAntiAliasing</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Comfortably turn on/off anti-aliasing.

<p>Setting this property automatically sets also the <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MultiSampling">MultiSampling</a> property. Although it's easy to request multi-sampling by using the <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MultiSampling">MultiSampling</a> property directly, using <code>AntiAliasing</code> is a little more comfortable. You don't have to wonder what are the sensible values of <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MultiSampling">MultiSampling</a> for common GPUs, and we also automatically use NV_multisample_filter_hint for nicer anti-aliasing when possible.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AlphaBits"></a><code>property <b>AlphaBits</b>: Cardinal
      read FAlphaBits write FAlphaBits default 0;</code></td>
</tr>
<tr><td colspan="2">
<p>
Required number of bits in alpha channel of color buffer. Zero means that alpha channel is not needed.

<p>Just like with other XxxBits property, we may get more bits than we requested. But we will never get less &mdash; if window system will not be able to provide GL context with requested number of bits, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> will raise an error.

<p>It's undefined how I'll treat this variable when indexed color mode will be possible in <a class="normal" href="CastleWindow.TCastleWindowCustom.html">TCastleWindowCustom</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AccumBits"></a><code>property <b>AccumBits</b>: <a  href="CastleVectors.html#TVector4Cardinal">TVector4Cardinal</a> read FAccumBits write FAccumBits; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
Required number of bits in color channels of accumulation buffer. Color channel is 0..3: red, green, blue, alpha. Zero means that given channel of accumulation buffer is not needed, so when the vector is all zeros (default value) this means that accumulation buffer is not needed at all.

<p>Just like with other XxxBits property, we may get more bits than we requested. But we will never get less &mdash; if window system will not be able to provide GL context with requested number of bits, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a> will raise an error.

<p> This property is deprecated, since modern OpenGL deprecated accumulation buffer. It may not be supported by some backends (e.g. now LCL backend, the default backend on Mac OS X, doesn't support it).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GtkIconName"></a><code>property <b>GtkIconName</b>: string read FGtkIconName write FGtkIconName;</code></td>
</tr>
<tr><td colspan="2">
<p>
Name of the icon for this window used by GTK 2 backend.

<p>This is simply passed to <code>gtk_window_set_icon_name</code>, see [<a  href="http://library.gnome.org/devel/gtk/stable/GtkWindow.html#gtk-window-set-icon-name">http://library.gnome.org/devel/gtk/stable/GtkWindow.html#gtk-window-set-icon-name</a>]. This allows you to use an installed icon (in /usr/share/icons/ or &tilde;/.local/share/icons/) for your program. See [<a  href="http://library.gnome.org/devel/integration-guide/stable/icons.html.en">http://library.gnome.org/devel/integration-guide/stable/icons.html.en</a>] for short information how and where to install your icons.

<p>It's ignored on non-GTK 2 backends.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Visible"></a><code>property <b>Visible</b>: boolean read FVisible write FVisible default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Should this window be actually displayed on the desktop. In all normal programs you want to leave this as <code>True</code>, as the main purpose of the window is to actually be visible and interactive on the desktop.

<p>Setting this to <code>False</code> allows you to get an OpenGL context without showing anything on the desktop. This can be used for rendering and capturing OpenGL stuff without showing it on the desktop. One example is the --screenshot option of view3dscene, see [<a  href="http://castle-engine.sourceforge.net/view3dscene.php#section_screenshot">http://castle-engine.sourceforge.net/view3dscene.php#section_screenshot</a>].

<p>If you implement such thing, remember that you should not render and capture the normal front or back buffer contents. OpenGL makes no guarantee that a hidden window will have any allocated memory, so capturing hidden window contents isn't useful (you may get something valid, or you may get random / blank screen, depending on OS and GPU). However, you can create Framebuffer Object on modern GPUs, and capture it's contents. An example code snippet:

<p></p>

<pre class="longcode">
<span class="pascal_comment">{ add CastleGLImages, CastleImages to your uses clause }</span>

<span class="pascal_keyword">var</span>
  ScreenshotRender: TGLRenderToTexture;
  Image: TRGBImage;
<span class="pascal_keyword">begin</span>
  ScreenshotRender := TGLRenderToTexture.Create(Width, Height);
  <span class="pascal_keyword">try</span>
    ScreenshotRender.Buffer := tbNone;
    ScreenshotRender.GLContextOpen;
    ScreenshotRender.RenderBegin;

    <span class="pascal_comment">{ render your stuff here }</span>

    <span class="pascal_comment">{ capture the screen }</span>
    Image := SaveScreen_NoFlush(Rectangle(<span class="pascal_numeric">0</span>, <span class="pascal_numeric">0</span>, Width, Height),
      ScreenshotRender.ColorBuffer);
    <span class="pascal_keyword">try</span>
      SaveImage(Image, <span class="pascal_string">'aaa.png'</span>);
    <span class="pascal_keyword">finally</span> FreeAndNil(Image) <span class="pascal_keyword">end</span>;

    ScreenshotRender.RenderEnd;
  <span class="pascal_keyword">finally</span> FreeAndNil(ScreenshotRender) <span class="pascal_keyword">end</span>;
<span class="pascal_keyword">end</span>;
</pre>

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Caption"></a><code>property <b>Caption</b>: string read GetPublicCaption write SetPublicCaption;</code></td>
</tr>
<tr><td colspan="2">
<p>
Caption of the window. By default it's initialized to ApplicationName. May be changed even when the window is already open.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnRender"></a><code>property <b>OnRender</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnRender write SetOnRender;</code></td>
</tr>
<tr><td colspan="2">
<p>
Render window contents here.

<p>Called when window contents must be redrawn, e.g. after creating a window, after resizing a window, after uncovering the window etc. You can also request yourself a redraw of the window by the Invalidate method, which will cause this event to be called at nearest good time.

<p>Note that calling Invalidate while in EventRender (<code>OnRender</code>) is not ignored. It means that in a short time next EventRender (<code>OnRender</code>) will be called.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnDraw"></a><code>property <b>OnDraw</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnRender write SetOnRender; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
 Deprecated name for <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnBeforeRender"></a><code>property <b>OnBeforeRender</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnBeforeRender write SetOnBeforeRender;</code></td>
</tr>
<tr><td colspan="2">
<p>
Always called right before EventRender (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a>). These two events, EventBeforeRender (<code>OnBeforeRender</code>) and EventRender (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a>), will be always called sequentially as a pair.

<p>The only difference between these two events is that time spent in EventBeforeRender (<code>OnBeforeRender</code>) is NOT counted as &quot;frame time&quot; by Fps.FrameTime. This is useful when you have something that needs to be done from time to time right before <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a> and that is very time-consuming. It such cases it is not desirable to put such time-consuming task inside <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a> because this would cause a sudden big change in Fps.FrameTime value. So you can avoid this by putting this in <code>OnBeforeRender</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnResize"></a><code>property <b>OnResize</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnResize write SetOnResize;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when the window size (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#Width">Width</a>, <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Height">Height</a>) changes. It's also guaranteed to be called during <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a>, right after the EventOpen (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a>) event.

<p>Our OpenGL context is already &quot;current&quot; when this event is called (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#MakeCurrent">MakeCurrent</a> is done right before), like for other events. This is a good place to set OpenGL viewport and projection matrix.

<p>See also <a class="normal" href="CastleWindow.TCastleWindowCustom.html#ResizeAllowed">ResizeAllowed</a>.

<p>In the usual case, the SceneManager takes care of setting appropriate OpenGL projection, so you don't need to do anything here.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnClose"></a><code>property <b>OnClose</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnClose write SetOnClose;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when the window is closed, right before the OpenGL context is destroyed. This is your last chance to release OpenGL resources, like textures, shaders, display lists etc. This is a counterpart to <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a> event.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnCloseObject"></a><code>property <b>OnCloseObject</b>: <a  href="CastleUIControls.html#TContainerObjectEvent">TContainerObjectEvent</a> read GetOnCloseObject write SetOnCloseObject;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnPress"></a><code>property <b>OnPress</b>: <a  href="CastleUIControls.html#TInputPressReleaseEvent">TInputPressReleaseEvent</a> read GetOnPress write SetOnPress;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when user presses a key or mouse button or moves mouse wheel.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnRelease"></a><code>property <b>OnRelease</b>: <a  href="CastleUIControls.html#TInputPressReleaseEvent">TInputPressReleaseEvent</a> read GetOnRelease write SetOnRelease;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when user releases a pressed key or mouse button.

<p>It's called right after <code>Pressed[Key]</code> changed from true to false.

<p>The <a class="normal" href="CastleKeysMouse.TInputPressRelease.html">TInputPressRelease</a> structure, passed as a parameter to this event, contains the exact information what was released.

<p>Note that reporting characters for &quot;key release&quot; messages is not perfect, as various key combinations (sometimes more than one?) may lead to generating given character. We have some intelligent algorithm for this, used to make Characters table and to detect this C for <code>OnRelease</code> callback. The idea is that a character is released when the key that initially caused the press of this character is also released.

<p>This solves in a determined way problems like &quot;what happens if I press Shift, then X, then release Shift, then release X&quot;. (will &quot;X&quot; be correctly released as pressed and then released? yes. will small &quot;x&quot; be reported as released at the end? no, as it was never pressed.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnCloseQuery"></a><code>property <b>OnCloseQuery</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read FOnCloseQuery write FOnCloseQuery;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when user tries to close the window. This is called when you use window manager features to close the window, like clicking on the &quot;close&quot; icon on the window frame or using Alt+F4 on most desktops. This is <i>not</i> called when you explicitly close the window by calling the <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Close">Close</a> method.

<p>When this callback is not assigned, we will just let the window be closed. When it's assigned, the window will not closed &mdash; you should call here <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Close">Close</a> explicitly if you want to (for example, after asking user for confirmation &quot;do you really want to quit?&quot;).

<p>When handling this event, you must remember that user may try to close our window at any time. E.g. if you're implementing here somehing like showing user text &quot;You cannot quit now&quot; or asking user &quot;Do you really want to quit&quot; remember that while you display such message to user and you're processing events (e.g. looking for keypress &quot;Yes&quot; or &quot;No&quot;), user may try to close your window again.

<p><a class="normal" href="CastleMessages.html">CastleMessages</a> unit offers some nice routines that you can safely use here, e.g. you can use it inside <code>OnCloseQuery</code> like

<p>if <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MessageYesNo">MessageYesNo</a>(Window, 'Are you sure you want to quit?') then Close;

<p>Inside <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MessageYesNo">MessageYesNo</a>, when we're processing events, and waiting for user's answer (yes or no), futher <code>OnCloseQuery</code> events will be ignored, so everything will work OK.

<p>This event is also useful if you want to call Close(false) on closing the window (i.e. QuitWhenLastWindowClosed = false). By default, if this event is undefined, we call Close(true) when user tries to close the window.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnMotion"></a><code>property <b>OnMotion</b>: <a  href="CastleUIControls.html#TInputMotionEvent">TInputMotionEvent</a> read GetOnMotion write SetOnMotion;</code></td>
</tr>
<tr><td colspan="2">
<p>
Mouse or a finger on touch device moved.

<p>For a mouse, remember you always have the currently pressed mouse buttons in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MousePressed">MousePressed</a>. When this is called, the <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MousePosition">MousePosition</a> property records the <i>previous</i> mouse position, while callback parameter NewMousePosition gives the <i>new</i> mouse position.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnUpdate"></a><code>property <b>OnUpdate</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnUpdate write SetOnUpdate;</code></td>
</tr>
<tr><td colspan="2">
<p>
Continously occuring event, called for all open windows. This event is called at least as regularly as redraw, so it is continously called even when your game is overwhelmed by messages (like mouse moves) and redraws.

<p>Called at the same time when <a class="normal" href="CastleWindow.TCastleApplication.html#OnUpdate">Application.OnUpdate</a> is called.

<p>You should add code to this window's <code>OnUpdate</code> event (not to <a class="normal" href="CastleWindow.TCastleApplication.html#OnUpdate">TCastleApplication.OnUpdate</a>) when you do something related to this window. For example when you check this window's <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Pressed">Pressed</a> keys state, or animate something displayed on this window. This allows various &quot;modal boxes&quot; and such (see <a class="normal" href="CastleMessages.html">CastleMessages</a>) to nicely &quot;pause&quot; such processing by temporarily replacing <code>OnUpdate</code> and other events of a window that displays a modal box.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnIdle"></a><code>property <b>OnIdle</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read GetOnUpdate write SetOnUpdate; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
 Deprecated name for <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnUpdate">OnUpdate</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnTimer"></a><code>property <b>OnTimer</b>: <a  href="CastleUIControls.html#TContainerEvent">TContainerEvent</a> read FOnTimer write FOnTimer;</code></td>
</tr>
<tr><td colspan="2">
<p>
Timer event is called approximately after each <a class="normal" href="CastleWindow.TCastleApplication.html#TimerMilisec">Application.TimerMilisec</a> miliseconds passed. See also <a class="normal" href="CastleWindow.TCastleApplication.html#OnTimer">Application.OnTimer</a>.

<p>This is a very simple timer mechanism, as all timers (timers for all windows and the global <a class="normal" href="CastleWindow.html#Application">Application</a> timer) use the same delay: <a class="normal" href="CastleWindow.TCastleApplication.html#TimerMilisec">Application.TimerMilisec</a>. We consciously decided to not implement anything more involved here. If you need really flexible timer mechanism, do not use this. Instead use <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnUpdate">OnUpdate</a> (or TUIControl.Update, or <a class="normal" href="Castle3D.T3D.html#Update">T3D.Update</a>) and look at it's <code>SecondsPassed</code> value to perform actions (one time or repeated) with a specified delay. The engine source is full of examples of this.

<p>Under Lazarus, you can of course also use LCL timers.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnDropFiles"></a><code>property <b>OnDropFiles</b>: <a  href="CastleWindow.html#TDropFilesFunc">TDropFilesFunc</a> read FOnDropFiles write FOnDropFiles;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when user drag and drops file(s) on the window. In case of Mac OS X bundle, this is also called when user opens a document associated with our application by double-clicking. Note: this is currently supported only by CASTLE_WINDOW_LCL backend.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AutoRedisplay"></a><code>property <b>AutoRedisplay</b>: boolean read fAutoRedisplay write SetAutoRedisplay
      default false;</code></td>
</tr>
<tr><td colspan="2">
<p>
Should we automatically redraw the window all the time, without a need for Invalidate call. If <code>True</code>, window will behave like a redraw is always needed, and EventRender (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRender">OnRender</a>) will be always called as often as posible. This may be a waste of OS resources, so don't use it, unless you know that you really have some animation displayed all the time.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MainMenu"></a><code>property <b>MainMenu</b>: <a  href="CastleWindow.TMenu.html">TMenu</a> read FMainMenu write SetMainMenu;</code></td>
</tr>
<tr><td colspan="2">
<p>
Menu bar of this window. When not assigned, we have no menu bar.

<p>Note that MainMenu.Caption will be ignored.

<p>You can change this freely while Closed.

<p>You can change this almost freely while not Closed: you can use various properties of <a class="normal" href="CastleWindow.TMenuEntry.html">TMenuEntry</a> descendants (adding, deleting items from <a class="normal" href="CastleWindow.TMenu.html">TMenu</a>, changing Caption, Key, CharKey, Checked properties &ndash; anything) and you can change value of <code>MainMenu</code> BUT you must not change <code>MainMenu</code> &lt;&gt; nil state when the window is not Closed. I.e. if you called Open with <code>MainMenu</code> = nil, then <code>MainMenu</code> must stay nil unit Close. If you called Open with <code>MainMenu</code> &lt;&gt; nil, then you can assign other <code>MainMenu</code> values while not Closed, but only values &lt;&gt;nil. I.e. you can't set <code>MainMenu</code> to nil if you called Open with <code>MainMenu</code> &lt;&gt; nil. See <code>castle_game_engine/examples/window/window_menu.lpr</code> for demo of changing value of <code>MainMenu</code> while window is not Closed.

<p>Note that MainMenu.Enabled is honoured (as well as Enabled for all menu items inside, of course). You can use this to disallow user from clicking on the whole menu. When MainMenu.Enabled = <code>False</code> then no MenuItem.DoClick, no <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnMenuClick">OnMenuClick</a> will be called when user presses some menu item. When user presses some keyboard shortcut for some menu item, no MenuItem.DoClick and no <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnMenuClick">OnMenuClick</a> will be called, but instead normal EventPress (<a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnPress">OnPress</a>) will be called.

<p>When it is useful to set this to false? For example hen using <a class="normal" href="CastleWindowModes.html">CastleWindowModes</a>. When you're changing modes (e.g. at the beginning of <a class="normal" href="CastleMessages.html#MessageOK">CastleMessages.MessageOk</a>) you're temporary setting <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnMenuClick">OnMenuClick</a> to nil, but this doesn't block <a class="normal" href="CastleWindow.TMenuItem.html#DoClick">TMenuItem.DoClick</a> functions. The only way to block menu from triggering ANY event is to set this to MainMenu.Enabled to <code>False</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MainMenuVisible"></a><code>property <b>MainMenuVisible</b>: boolean
      read FMainMenuVisible write FMainMenuVisible default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MainMenu">MainMenu</a> visible. <code>False</code> means that we do not show main menu bar, but menu key shortcuts should still work. Right now, you can reliably change this only before window is open.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OwnsMainMenu"></a><code>property <b>OwnsMainMenu</b>: boolean read FOwnsMainMenu write FOwnsMainMenu default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
If true then in <a class="normal" href="CastleWindow.TCastleWindowCustom.html">TCastleWindowCustom</a> destructor <a class="normal" href="CastleWindow.TCastleWindowCustom.html#MainMenu">MainMenu</a> will be destroyed too (if not nil, od course). Usually this is something useful.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnMenuClick"></a><code>property <b>OnMenuClick</b>: <a  href="CastleWindow.html#TMenuClickFunc">TMenuClickFunc</a> read FOnMenuClick write FOnMenuClick;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called each time user chooses some menu item and it's not handled in <a class="normal" href="CastleWindow.TMenuItem.html#DoClick">TMenuItem.DoClick</a>. By default, menu item handling is passed to <a class="normal" href="CastleWindow.TMenuItem.html#DoClick">TMenuItem.DoClick</a>. Only when it return <code>False</code> (not handled) then we call this window's event.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnMenuCommand"></a><code>property <b>OnMenuCommand</b>: <a  href="CastleWindow.html#TMenuClickFunc">TMenuClickFunc</a> read FOnMenuClick write FOnMenuClick; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
Deprecated name for <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnMenuClick">OnMenuClick</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MousePressed"></a><code>property <b>MousePressed</b>: <a  href="CastleKeysMouse.html#TMouseButtons">TMouseButtons</a> read FMousePressed;</code></td>
</tr>
<tr><td colspan="2">
<p>
Currently pressed mouse buttons. When this changes, you're always notified by <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnPress">OnPress</a> or <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRelease">OnRelease</a> calls.

<p>This value is always current, in particular it's already updated before we call events <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnPress">OnPress</a> or <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnRelease">OnRelease</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Focused"></a><code>property <b>Focused</b>: boolean read FFocused;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is the window focused now, which means that keys/mouse events are directed to this window.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="UserData"></a><code>property <b>UserData</b>: Pointer read FUserData write FUserData;</code></td>
</tr>
<tr><td colspan="2">
<p>
Place for your pointer, for any purposes. No code in this unit <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Touches">touches</a> the value of this field. This is similar to TComponent.Tag property.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Closed"></a><code>property <b>Closed</b>: boolean read FClosed default true;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Cursor"></a><code>property <b>Cursor</b>: <a  href="CastleKeysMouse.html#TMouseCursor">TMouseCursor</a> read FCursor write SetCursor default mcDefault;</code></td>
</tr>
<tr><td colspan="2">
<p>
Sets mouse cursor appearance over this window. See <a class="normal" href="CastleKeysMouse.html#TMouseCursor">TMouseCursor</a> for a list of possible values and their meanings.

<p>TODO: for now, mcCustom is not handled anywhere.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="CustomCursor"></a><code>property <b>CustomCursor</b>: <a  href="CastleImages.TRGBAlphaImage.html">TRGBAlphaImage</a> read FCustomCursor
      write SetCustomCursor;</code></td>
</tr>
<tr><td colspan="2">
<p>
Image for cursor, used only when <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Cursor">Cursor</a> = mcCustom. We will try hard to use any cursor image as appropriate, but on some platforms cursor size may be limited (16 x 16 seems standard for GTK) and cursor may be forced to monochrome.

<p>Note that you still own the <a class="normal" href="CastleImages.TRGBAlphaImage.html">TRGBAlphaImage</a> instance passed here &mdash; you're responsible for freeing it etc. If this is <code>Nil</code>, and <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Cursor">Cursor</a> = mcCustom, then it will be treated like <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Cursor">Cursor</a> = mcDefault. (I don't raise error in such case, as that would make changing both Cursor and CustomCursor values unnecessarily tricky for the programmer.)

<p>TODO: for now, this is not implemented. <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Cursor">Cursor</a> ignores mcCustom value, under every <a class="normal" href="CastleWindow.html">CastleWindow</a> backend... sorry, CustomCursor is only a plan.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="RenderStyle"></a><code>property <b>RenderStyle</b>: <a  href="CastleUIControls.html#TRenderStyle">TRenderStyle</a> read GetRenderStyle write SetRenderStyle default rs2D;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Pressed"></a><code>property <b>Pressed</b>: <a  href="CastleKeysMouse.TKeysPressed.html">TKeysPressed</a> read FPressed;</code></td>
</tr>
<tr><td colspan="2">
<p>
Tracks which keys, characters, modifiers are pressed.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Fps"></a><code>property <b>Fps</b>: <a  href="CastleTimeUtils.TFramesPerSecond.html">TFramesPerSecond</a> read FFps;</code></td>
</tr>
<tr><td colspan="2">
<p>
Frames per second measuring.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FpsShowOnCaption"></a><code>property <b>FpsShowOnCaption</b>: boolean
      read FFpsShowOnCaption write FFpsShowOnCaption default false;</code></td>
</tr>
<tr><td colspan="2">
<p>
Show current frames per second on window caption. You can modify this property only <i>before calling <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a>.</i></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SwapFullScreen_Key"></a><code>property <b>SwapFullScreen_Key</b>: <a  href="CastleKeysMouse.html#TKey">TKey</a>
      read FSwapFullScreen_Key write FSwapFullScreen_Key default K_None;</code></td>
</tr>
<tr><td colspan="2">
<p>
Key to use to switch between FullScreen and not FullScreen. Set to K_None (default) to disable this functionality. Suggested value to enable this functionality is K_F11, this is consistent will fullscreen key in other programs. You can freely modify it at any time, even after calling <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a>.

<p>The fullscreen is switched by closing it, changing <a class="normal" href="CastleWindow.TCastleWindowCustom.html#FullScreen">FullScreen</a> property and opening it again. So be sure to have good <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a> / <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnClose">OnClose</a> implementations: you have to be able to recreate in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnOpen">OnOpen</a> everything that was released in <a class="normal" href="CastleWindow.TCastleWindowCustom.html#OnClose">OnClose</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Close_CharKey"></a><code>property <b>Close_CharKey</b>: char
      read FClose_CharKey write FClose_CharKey default #0;</code></td>
</tr>
<tr><td colspan="2">
<p>
Key to use to close the window. Set to #0 (default) to disable this functionality. Suggested value to enable this functionality is <a class="normal" href="CastleStringUtils.html#CharEscape">CharEscape</a>. You can freely modify it at any time, even after calling <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Open">Open</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FpsCaptionUpdateInterval"></a><code>property <b>FpsCaptionUpdateInterval</b>: <a  href="CastleTimeUtils.html#TMilisecTime">TMilisecTime</a>
      read FFpsCaptionUpdateInterval write FFpsCaptionUpdateInterval
      default <a  href="CastleWindow.html#DefaultFpsCaptionUpdateInterval">DefaultFpsCaptionUpdateInterval</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
The amount of time (in miliseconds) between updating Caption with current FPS value. Used when <a class="normal" href="CastleWindow.TCastleWindowCustom.html#FpsShowOnCaption">FpsShowOnCaption</a>.

<p>Note that updating Caption of the window too often <i>may</i> cause a significant FPS dropdown, in other words: don't set this to too small value. I once used here value 200. It's 5 times per second, this didn't seem too often, until once I checked my program with this turned off and found that my program runs now much faster (you can see that looking at FpsRealTime (FpsFrameTime does not change)).

<p>That's why I use here quite big value by default, <a class="normal" href="CastleWindow.html#DefaultFpsCaptionUpdateInterval">DefaultFpsCaptionUpdateInterval</a>.

<p>If you really want to show FPS counts updated more constantly, you should display them each frame as a text in OpenGL (like I do in view3dscene).</p>
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "1"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Piwik Code -->

<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:13</em>
</span>
</td></tr></table></body></html>