-
Notifications
You must be signed in to change notification settings - Fork 3
/
windowObject.e
1380 lines (1183 loc) · 52.7 KB
/
windowObject.e
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
OPT MODULE, OSVERSION=37,LARGE
MODULE 'reaction/reaction_macros',
'window','classes/window',
'gadgets/layout','layout',
'reaction/reaction_lib',
'button','gadgets/button',
'images/bevel',
'string',
'gadgets/integer','integer',
'gadgets/chooser','chooser',
'gadgets/checkbox','checkbox',
'images/label','label',
'amigalib/boopsi',
'libraries/gadtools',
'intuition/intuition',
'intuition/screens',
'intuition/imageclass',
'intuition/gadgetclass',
'exec'
MODULE '*reactionObject','*reactionForm','*sourceGen','*stringlist','*validator'
EXPORT ENUM WINGAD_IDENT, WINGAD_TITLE, WINGAD_SCREENTITLE, WINGAD_ICONTITLE, WINGAD_ICONFILE,
WINGAD_LEFTEDGE, WINGAD_TOPEDGE, WINGAD_WIDTH, WINGAD_HEIGHT,
WINGAD_MINWIDTH, WINGAD_MINHEIGHT, WINGAD_MAXWIDTH, WINGAD_MAXHEIGHT,
WINGAD_WINDOWPOS, WINGAD_LOCKWIDTH, WINGAD_LOCKHEIGHT,
WINGAD_SHAREDPORT, WINGAD_ICONIFYGAD, WINGAD_GADGETHELP,
WINGAD_OK, WINGAD_FLAGS, WINGAD_IDCMP, WINGAD_CANCEL
CONST NUM_WIN_GADS=WINGAD_CANCEL+1
->These are not proper WFLG values
CONST WFLG_ZOOM = 1<<28
CONST WFLG_NOTIFY_DEPTH = 1<<29
CONST WFLG_MENUHELP = 1<<30
CONST WFLG_HELPGROUP = 1<<31
EXPORT ENUM WINGAD_FLAGS_REFRESH,
WINGAD_FLAGS_CLOSE,WINGAD_FLAGS_DEPTH, WINGAD_FLAGS_SIZE, WINGAD_FLAGS_SIZEBRIGHT,
WINGAD_FLAGS_SIZEBBOTTOM,WINGAD_FLAGS_DRAG,WINGAD_FLAGS_GIMME00,WINGAD_FLAGS_BORDERLESS,
WINGAD_FLAGS_ACTIVATE,WINGAD_FLAGS_RMBTRAP,WINGAD_FLAGS_SUPERBITMAP,WINGAD_FLAGS_BACKDROP,
WINGAD_FLAGS_ZOOM,WINGAD_FLAGS_NOTIFYDEPTH,WINGAD_FLAGS_MENUHELP,WINGAD_FLAGS_HELPGROUP,
WINGAD_FLAGS_OK, WINGAD_FLAGS_CANCEL
CONST NUM_WIN_FLAGS_GADS=WINGAD_FLAGS_CANCEL+1
EXPORT ENUM WINGAD_IDCMP_MOUSEBUTTONS, WINGAD_IDCMP_MOUSEMOVE, WINGAD_IDCMP_DELTAMOVE, WINGAD_IDCMP_GADGETDOWN,
WINGAD_IDCMP_GADGETUP, WINGAD_IDCMP_CLOSEWINDOW, WINGAD_IDCMP_MENUPICK, WINGAD_IDCMP_MENUVERIFY,
WINGAD_IDCMP_MENUHELP, WINGAD_IDCMP_NEWSIZE, WINGAD_IDCMP_REFRESHWIN, WINGAD_IDCMP_SIZEVERIFY,
WINGAD_IDCMP_VANILLAKEY, WINGAD_IDCMP_RAWKEY, WINGAD_IDCMP_NEWPREFS, WINGAD_IDCMP_DISKINSERT,
WINGAD_IDCMP_DISKREMOVE, WINGAD_IDCMP_TICKS, WINGAD_IDCMP_UPDATE, WINGAD_IDCMP_CHANGEWINDOW,
WINGAD_IDCMP_OK, WINGAD_IDCMP_CANCEL
CONST NUM_WIN_IDCMP_GADS=WINGAD_IDCMP_CANCEL+1
EXPORT OBJECT windowObject OF reactionObject
title[80]:ARRAY OF CHAR
screentitle[80]:ARRAY OF CHAR
iconTitle[80]:ARRAY OF CHAR
iconFile[80]:ARRAY OF CHAR
leftEdge:INT
topEdge:INT
width:INT
height:INT
windowPos:CHAR
lockWidth:CHAR
lockHeight:CHAR
sharedPort:CHAR
iconifyGadget:CHAR
gadgetHelp:CHAR
refreshType:CHAR
flags:LONG
idcmp:LONG
appPort:LONG
previewOpen:CHAR
previewRootLayout:LONG
previewLeft:INT
previewTop:INT
previewWidth:INT
previewHeight:INT
previewHintInfo:PTR TO hintinfo
ENDOBJECT
OBJECT windowSettingsForm OF reactionForm
PRIVATE
windowObject:PTR TO windowObject
tmpRefreshType:CHAR
tmpFlags:LONG
tmpIDCMP:LONG
labels1:PTR TO LONG
ENDOBJECT
OBJECT windowFlagsSettingsForm OF reactionForm
labels1:PTR TO LONG
ENDOBJECT
OBJECT windowIDCMPSettingsForm OF reactionForm
labels1:PTR TO LONG
ENDOBJECT
PROC create() OF windowIDCMPSettingsForm
DEF gads:PTR TO LONG
NEW gads[NUM_WIN_IDCMP_GADS]
self.gadgetList:=gads
NEW gads[NUM_WIN_IDCMP_GADS]
self.gadgetActions:=gads
self.windowObj:=WindowObject,
WA_TITLE, 'Window IDCMP Attribute Setting',
WA_LEFT, 0,
WA_TOP, 0,
WA_HEIGHT, 80,
WA_WIDTH, 150,
WA_MINWIDTH, 150,
WA_MAXWIDTH, 8192,
WA_MINHEIGHT, 80,
WA_MAXHEIGHT, 8192,
WA_ACTIVATE, TRUE,
WINDOW_POSITION, WPOS_CENTERSCREEN,
WA_PUBSCREEN, 0,
->WA_CustomScreen, gScreen,
->WINDOW_AppPort, gApp_port,
WA_CLOSEGADGET, TRUE,
WA_DEPTHGADGET, TRUE,
WA_SIZEGADGET, TRUE,
WA_DRAGBAR, TRUE,
WA_IDCMP,IDCMP_GADGETDOWN OR IDCMP_GADGETUP OR IDCMP_CLOSEWINDOW OR 0,
WINDOW_PARENTGROUP, VLayoutObject,
LAYOUT_SPACEOUTER, TRUE,
LAYOUT_DEFERLAYOUT, TRUE,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_MOUSEBUTTONS ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_MOUSEBUTTONS,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'MouseButtons',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_MOUSEMOVE ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_MOUSEMOVE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'MouseMove',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_DELTAMOVE ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_DELTAMOVE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'DeltaMove',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_GADGETDOWN ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_GADGETDOWN,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'GadgetDown',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_GADGETUP ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_GADGETUP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'GadgetUp',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_CLOSEWINDOW ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_CLOSEWINDOW,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'CloseWindow',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_MENUPICK ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_MENUPICK,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'MenuPick',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_MENUVERIFY ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_MENUVERIFY,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'MenuVerify',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_MENUHELP ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_MENUHELP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'MenuHelp',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_NEWSIZE ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_NEWSIZE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'NewSize',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_REFRESHWIN ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_REFRESHWIN,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'RefreshWindow',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_SIZEVERIFY ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_SIZEVERIFY,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'SizeVerify',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_VANILLAKEY ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_VANILLAKEY,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'VanillaKey',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_RAWKEY ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_RAWKEY,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'RawKey',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_NEWPREFS ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_NEWPREFS,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'NewPrefs',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_DISKINSERT ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_DISKINSERT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'DiskInserted',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_DISKREMOVE ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_DISKREMOVE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'DiskRemoved',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_TICKS ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_TICKS,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'IntuiTicks',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_UPDATE ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_UPDATE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'IDCMPUpdate',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_CHANGEWINDOW ]:=CheckBoxObject,
GA_ID, WINGAD_IDCMP_CHANGEWINDOW,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'ChangeWindow',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_OK ]:=ButtonObject,
GA_ID, WINGAD_IDCMP_OK,
GA_TEXT, '_OK',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP_CANCEL ]:=ButtonObject,
GA_ID, WINGAD_IDCMP_CANCEL,
GA_TEXT, '_Cancel',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
LayoutEnd,
LayoutEnd,
WindowEnd
self.gadgetActions[WINGAD_IDCMP_CANCEL]:=MR_CANCEL
self.gadgetActions[WINGAD_IDCMP_OK]:=MR_OK
ENDPROC
PROC end() OF windowIDCMPSettingsForm
END self.gadgetList[NUM_WIN_IDCMP_GADS]
END self.gadgetActions[NUM_WIN_IDCMP_GADS]
DisposeObject(self.windowObj)
ENDPROC
PROC editSettingsIDCMP(idcmpPtr:PTR TO LONG) OF windowIDCMPSettingsForm
DEF res
DEF idcmp
idcmp:=idcmpPtr[]
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_MOUSEBUTTONS ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_MOUSEBUTTONS,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_MOUSEMOVE ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_MOUSEMOVE,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_DELTAMOVE ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_DELTAMOVE,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_GADGETDOWN ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_GADGETDOWN,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_GADGETUP ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_GADGETUP,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_CLOSEWINDOW ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_CLOSEWINDOW,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_MENUPICK ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_MENUPICK,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_MENUVERIFY ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_MENUVERIFY,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_MENUHELP ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_MENUHELP,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_NEWSIZE ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_NEWSIZE,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_REFRESHWIN ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_REFRESHWINDOW,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_SIZEVERIFY ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_SIZEVERIFY,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_VANILLAKEY ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_VANILLAKEY,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_RAWKEY ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_RAWKEY,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_NEWPREFS ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_NEWPREFS,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_DISKINSERT ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_DISKINSERTED,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_DISKREMOVE ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_DISKREMOVED,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_TICKS ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_INTUITICKS,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_UPDATE ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_IDCMPUPDATE,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_IDCMP_CHANGEWINDOW ],0,0,[CHECKBOX_CHECKED,idcmp AND IDCMP_CHANGEWINDOW,0])
res:=self.showModal()
IF res=MR_OK
idcmp:=0
IF Gets(self.gadgetList[ WINGAD_IDCMP_MOUSEBUTTONS ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_MOUSEBUTTONS
IF Gets(self.gadgetList[ WINGAD_IDCMP_MOUSEMOVE ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_MOUSEMOVE
IF Gets(self.gadgetList[ WINGAD_IDCMP_DELTAMOVE ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_DELTAMOVE
IF Gets(self.gadgetList[ WINGAD_IDCMP_GADGETDOWN ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_GADGETDOWN
IF Gets(self.gadgetList[ WINGAD_IDCMP_GADGETUP ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_GADGETUP
IF Gets(self.gadgetList[ WINGAD_IDCMP_CLOSEWINDOW ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_CLOSEWINDOW
IF Gets(self.gadgetList[ WINGAD_IDCMP_MENUPICK ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_MENUPICK
IF Gets(self.gadgetList[ WINGAD_IDCMP_MENUVERIFY ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_MENUVERIFY
IF Gets(self.gadgetList[ WINGAD_IDCMP_MENUHELP ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_MENUHELP
IF Gets(self.gadgetList[ WINGAD_IDCMP_NEWSIZE ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_NEWSIZE
IF Gets(self.gadgetList[ WINGAD_IDCMP_REFRESHWIN ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_REFRESHWINDOW
IF Gets(self.gadgetList[ WINGAD_IDCMP_SIZEVERIFY ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_SIZEVERIFY
IF Gets(self.gadgetList[ WINGAD_IDCMP_VANILLAKEY ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_VANILLAKEY
IF Gets(self.gadgetList[ WINGAD_IDCMP_RAWKEY ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_RAWKEY
IF Gets(self.gadgetList[ WINGAD_IDCMP_NEWPREFS ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_NEWPREFS
IF Gets(self.gadgetList[ WINGAD_IDCMP_DISKINSERT ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_DISKINSERTED
IF Gets(self.gadgetList[ WINGAD_IDCMP_DISKREMOVE ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_DISKREMOVED
IF Gets(self.gadgetList[ WINGAD_IDCMP_TICKS ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_INTUITICKS
IF Gets(self.gadgetList[ WINGAD_IDCMP_UPDATE ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_IDCMPUPDATE
IF Gets(self.gadgetList[ WINGAD_IDCMP_CHANGEWINDOW ],CHECKBOX_CHECKED ) THEN idcmp:=idcmp OR IDCMP_CHANGEWINDOW
idcmpPtr[]:=idcmp
ENDIF
ENDPROC
PROC create() OF windowFlagsSettingsForm
DEF gads:PTR TO LONG
NEW gads[NUM_WIN_FLAGS_GADS]
self.gadgetList:=gads
NEW gads[NUM_WIN_FLAGS_GADS]
self.gadgetActions:=gads
self.windowObj:=WindowObject,
WA_TITLE, 'Window Flags Attribute Setting',
WA_LEFT, 0,
WA_TOP, 0,
WA_HEIGHT, 80,
WA_WIDTH, 150,
WA_MINWIDTH, 150,
WA_MAXWIDTH, 8192,
WA_MINHEIGHT, 80,
WA_MAXHEIGHT, 8192,
WA_ACTIVATE, TRUE,
WINDOW_POSITION, WPOS_CENTERSCREEN,
WA_PUBSCREEN, 0,
->WA_CustomScreen, gScreen,
->WINDOW_AppPort, gApp_port,
WA_CLOSEGADGET, TRUE,
WA_DEPTHGADGET, TRUE,
WA_SIZEGADGET, TRUE,
WA_DRAGBAR, TRUE,
WA_IDCMP,IDCMP_GADGETDOWN OR IDCMP_GADGETUP OR IDCMP_CLOSEWINDOW OR 0,
WINDOW_PARENTGROUP, VLayoutObject,
LAYOUT_SPACEOUTER, TRUE,
LAYOUT_DEFERLAYOUT, TRUE,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_REFRESH ]:=ChooserObject,
GA_ID, WINGAD_FLAGS_REFRESH,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
CHOOSER_POPUP, TRUE,
CHOOSER_MAXLABELS, 12,
CHOOSER_ACTIVE, 0,
CHOOSER_WIDTH, -1,
CHOOSER_LABELS, self.labels1:=chooserLabelsA(['WA_NoCareRefresh','WA_SimpleRefresh','WA_SmartRefresh','WA_SuperBitmap',0]),
ChooserEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'Refresh type',
LabelEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_CLOSE ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_CLOSE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Close Gadget',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_DEPTH ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_DEPTH,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Depth Gadget',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_SIZE ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_SIZE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Size Gadget',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_SIZEBRIGHT ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_SIZEBRIGHT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'SizeBRight',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_SIZEBBOTTOM ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_SIZEBBOTTOM,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'SizeBBottom',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_DRAG ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_DRAG,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Drag Bar',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_GIMME00 ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_GIMME00,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'GimmeZeroZero',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_BORDERLESS ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_BORDERLESS,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Borderless',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_ACTIVATE ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_ACTIVATE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Activate',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_RMBTRAP ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_RMBTRAP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'RMBTrap',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_SUPERBITMAP ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_SUPERBITMAP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'SuperBitMap',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_BACKDROP ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_BACKDROP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'BackDrop',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_EVENSIZE, TRUE,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_ZOOM ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_ZOOM,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Zoom',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_NOTIFYDEPTH ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_NOTIFYDEPTH,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'NotifyDepth',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_MENUHELP ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_MENUHELP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Menu Help',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_HELPGROUP ]:=CheckBoxObject,
GA_ID, WINGAD_FLAGS_HELPGROUP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Help Group',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_OK ]:=ButtonObject,
GA_ID, WINGAD_FLAGS_OK,
GA_TEXT, '_OK',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS_CANCEL ]:=ButtonObject,
GA_ID, WINGAD_FLAGS_CANCEL,
GA_TEXT, '_Cancel',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
LayoutEnd,
LayoutEnd,
WindowEnd
self.gadgetActions[WINGAD_FLAGS_CANCEL]:=MR_CANCEL
self.gadgetActions[WINGAD_FLAGS_OK]:=MR_OK
ENDPROC
PROC end() OF windowFlagsSettingsForm
freeChooserLabels( self.labels1 )
END self.gadgetList[NUM_WIN_FLAGS_GADS]
END self.gadgetActions[NUM_WIN_FLAGS_GADS]
DisposeObject(self.windowObj)
ENDPROC
PROC editSettingsFlags(refreshPtr:PTR TO CHAR, flagsPtr:PTR TO LONG) OF windowFlagsSettingsForm
DEF res
DEF flags,refresh
flags:=flagsPtr[]
refresh:=refreshPtr[]
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_REFRESH ],0,0,[CHOOSER_SELECTED,refresh,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_CLOSE ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_CLOSEGADGET,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_DEPTH ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_DEPTHGADGET,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_SIZE ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_SIZEGADGET,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_SIZEBRIGHT ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_SIZEBRIGHT,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_SIZEBBOTTOM ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_SIZEBBOTTOM,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_DRAG ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_DRAGBAR,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_GIMME00 ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_GIMMEZEROZERO,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_BORDERLESS ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_BORDERLESS,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_ACTIVATE ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_ACTIVATE,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_RMBTRAP ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_RMBTRAP,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_SUPERBITMAP ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_SUPER_BITMAP,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_BACKDROP ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_BACKDROP,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_ZOOM ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_ZOOM,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_NOTIFYDEPTH ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_NOTIFY_DEPTH,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_MENUHELP ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_MENUHELP,0])
SetGadgetAttrsA(self.gadgetList[ WINGAD_FLAGS_HELPGROUP ],0,0,[CHECKBOX_CHECKED,flags AND WFLG_HELPGROUP,0])
res:=self.showModal()
IF res=MR_OK
flags:=0
IF Gets(self.gadgetList[ WINGAD_FLAGS_CLOSE ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_CLOSEGADGET
IF Gets(self.gadgetList[ WINGAD_FLAGS_DEPTH ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_DEPTHGADGET
IF Gets(self.gadgetList[ WINGAD_FLAGS_SIZE ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_SIZEGADGET
IF Gets(self.gadgetList[ WINGAD_FLAGS_SIZEBRIGHT ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_SIZEBRIGHT
IF Gets(self.gadgetList[ WINGAD_FLAGS_SIZEBBOTTOM ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_SIZEBBOTTOM
IF Gets(self.gadgetList[ WINGAD_FLAGS_DRAG ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_DRAGBAR
IF Gets(self.gadgetList[ WINGAD_FLAGS_GIMME00 ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_GIMMEZEROZERO
IF Gets(self.gadgetList[ WINGAD_FLAGS_BORDERLESS ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_BORDERLESS
IF Gets(self.gadgetList[ WINGAD_FLAGS_ACTIVATE ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_ACTIVATE
IF Gets(self.gadgetList[ WINGAD_FLAGS_RMBTRAP ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_RMBTRAP
IF Gets(self.gadgetList[ WINGAD_FLAGS_SUPERBITMAP ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_SUPER_BITMAP
IF Gets(self.gadgetList[ WINGAD_FLAGS_BACKDROP ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_BACKDROP
IF Gets(self.gadgetList[ WINGAD_FLAGS_ZOOM ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_ZOOM
IF Gets(self.gadgetList[ WINGAD_FLAGS_NOTIFYDEPTH ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_NOTIFY_DEPTH
IF Gets(self.gadgetList[ WINGAD_FLAGS_MENUHELP ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_MENUHELP
IF Gets(self.gadgetList[ WINGAD_FLAGS_HELPGROUP ],CHECKBOX_CHECKED ) THEN flags:=flags OR WFLG_HELPGROUP
refresh:=Gets(self.gadgetList[ WINGAD_FLAGS_REFRESH ],CHOOSER_SELECTED )
flagsPtr[]:=flags
refreshPtr[]:=refresh
ENDIF
ENDPROC res=MR_OK
PROC create() OF windowSettingsForm
DEF gads:PTR TO LONG
DEF scr:PTR TO screen
DEF arrows
NEW gads[NUM_WIN_GADS]
self.gadgetList:=gads
NEW gads[NUM_WIN_GADS]
self.gadgetActions:=gads
scr:=LockPubScreen(NIL)
arrows:=(scr.width>=800)
UnlockPubScreen(NIL,scr)
self.windowObj:=WindowObject,
WA_TITLE, 'Window Attribute Setting',
WA_LEFT, 0,
WA_TOP, 0,
WA_HEIGHT, 80,
WA_WIDTH, 150,
WA_MINWIDTH, 150,
WA_MAXWIDTH, 8192,
WA_MINHEIGHT, 80,
WA_MAXHEIGHT, 8192,
WA_ACTIVATE, TRUE,
WINDOW_POSITION, WPOS_CENTERSCREEN,
WA_PUBSCREEN, 0,
->WA_CustomScreen, gScreen,
->WINDOW_AppPort, gApp_port,
WA_CLOSEGADGET, TRUE,
WA_DEPTHGADGET, TRUE,
WA_SIZEGADGET, TRUE,
WA_DRAGBAR, TRUE,
WA_IDCMP,IDCMP_GADGETDOWN OR IDCMP_GADGETUP OR IDCMP_CLOSEWINDOW OR 0,
WINDOW_PARENTGROUP, VLayoutObject,
LAYOUT_SPACEOUTER, TRUE,
LAYOUT_DEFERLAYOUT, TRUE,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_VERT,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDENT ]:=StringObject,
GA_ID, WINGAD_IDENT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
STRINGA_MAXCHARS, 80,
StringEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'Identifier',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_TITLE ]:=StringObject,
GA_ID, WINGAD_TITLE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
STRINGA_MAXCHARS, 80,
StringEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, '_Window Title',
LabelEnd,
LayoutEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_SCREENTITLE ]:=StringObject,
GA_ID, WINGAD_SCREENTITLE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
STRINGA_MAXCHARS, 80,
StringEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'Screen Title',
LabelEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_ICONTITLE ]:=StringObject,
GA_ID, WINGAD_ICONTITLE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
STRINGA_MAXCHARS, 80,
StringEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'Ico_n Title',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_ICONFILE ]:=StringObject,
GA_ID, WINGAD_ICONFILE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
STRINGA_MAXCHARS, 80,
StringEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'Icon File',
LabelEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_LEFTEDGE ]:=IntegerObject,
GA_ID, WINGAD_LEFTEDGE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_MAXCHARS, 4,
INTEGER_ARROWS, arrows,
INTEGER_MINIMUM, 0,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'LeftEdge',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_TOPEDGE ]:=IntegerObject,
GA_ID, WINGAD_TOPEDGE,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_MAXCHARS, 4,
INTEGER_ARROWS, arrows,
INTEGER_MINIMUM, 0,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'Top_Edge',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_WIDTH ]:=IntegerObject,
GA_ID, WINGAD_WIDTH,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_ARROWS, arrows,
INTEGER_MAXCHARS, 4,
INTEGER_MINIMUM, 0,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, '_Width',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_HEIGHT ]:=IntegerObject,
GA_ID, WINGAD_HEIGHT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_ARROWS, arrows,
INTEGER_MAXCHARS, 4,
INTEGER_MINIMUM, 0,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, '_Height',
LabelEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_MINWIDTH ]:=IntegerObject,
GA_ID, WINGAD_MINWIDTH,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_MAXCHARS, 4,
INTEGER_ARROWS, arrows,
INTEGER_MINIMUM, 0,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'MinWidth',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_MINHEIGHT ]:=IntegerObject,
GA_ID, WINGAD_MINHEIGHT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_ARROWS, arrows,
INTEGER_MAXCHARS, 4,
INTEGER_MINIMUM, 0,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'MinHeight',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_MAXWIDTH ]:=IntegerObject,
GA_ID,WINGAD_MAXWIDTH,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_MAXCHARS, 4,
INTEGER_MINIMUM, 0,
INTEGER_ARROWS, arrows,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'MaxWidth',
LabelEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_MAXHEIGHT ]:=IntegerObject,
GA_ID, WINGAD_MAXHEIGHT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
INTEGER_MAXCHARS, 4,
INTEGER_MINIMUM, 0,
INTEGER_ARROWS, arrows,
INTEGER_MAXIMUM, 9999,
IntegerEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'MaxHeight',
LabelEnd,
LayoutEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_WINDOWPOS ]:=ChooserObject,
GA_ID, WINGAD_WINDOWPOS,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
CHOOSER_POPUP, TRUE,
CHOOSER_MAXLABELS, 12,
CHOOSER_ACTIVE, 0,
CHOOSER_WIDTH, -1,
CHOOSER_LABELS, self.labels1:=chooserLabelsA(['NONE','WPOS_CENTERSCREEN','WPOS_CENTERMOUSE','WPOS_TOPLEFT','WPOS_CENTERWINDOW','WPOS_FULLSCREEN',0]),
ChooserEnd,
CHILD_LABEL, LabelObject,
LABEL_TEXT, 'Window P_osition',
LabelEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_LOCKWIDTH ]:=CheckBoxObject,
GA_ID, WINGAD_LOCKWIDTH,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Lock Width',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_LOCKHEIGHT ]:=CheckBoxObject,
GA_ID, WINGAD_LOCKHEIGHT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Lock Height',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_SHAREDPORT ]:=CheckBoxObject,
GA_ID, WINGAD_SHAREDPORT,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Shared Port',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_ICONIFYGAD ]:=CheckBoxObject,
GA_ID, WINGAD_ICONIFYGAD,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Iconify Gadget',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_GADGETHELP ]:=CheckBoxObject,
GA_ID, WINGAD_GADGETHELP,
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
GA_TEXT, 'Gadget Help',
CHECKBOX_TEXTPLACE, PLACETEXT_LEFT,
CheckBoxEnd,
LayoutEnd,
LAYOUT_ADDCHILD, LayoutObject,
LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_OK ]:=ButtonObject,
GA_ID, WINGAD_OK,
GA_TEXT, '_OK',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_FLAGS ]:=ButtonObject,
GA_ID, WINGAD_FLAGS,
GA_TEXT, '_Flags',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_IDCMP ]:=ButtonObject,
GA_ID, WINGAD_IDCMP,
GA_TEXT, '_IDCMP',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
LAYOUT_ADDCHILD, self.gadgetList[ WINGAD_CANCEL ]:=ButtonObject,
GA_ID, WINGAD_CANCEL,
GA_TEXT, '_Cancel',