-
Notifications
You must be signed in to change notification settings - Fork 0
/
CSQ-SHAQ-Frames.lisp
3198 lines (3020 loc) · 112 KB
/
CSQ-SHAQ-Frames.lisp
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
;;******************************* CSQ-SHAQ-Frames.lisp *********************
;;
;;INTERFACES/FRAMES USED FOR CSQ AND SHAQ QUESTIONNAIRES
;;
;;
;;INTERFACE ARGS
(defparameter *initial-x 20)
(defparameter *initial-y 0)
(defparameter *visible-border-p T)
(defparameter *fr-internal-border 20)
(defparameter *external-border 20)
(defparameter *internal-border-width 25)
(defparameter *fr-visible-min-width 960)
(defparameter *fr-visible-min-height 750) ;; error :maximize)
(defparameter *fr-border-color :red)
(defparameter *frame-title "Cognitive Systems Questionnaire (CSQ) QUESTIONS")
(when *run-shaq-p (setf *frame-title "Success and Happiness Attributes Questionnaire (SHAQ) QUESTIONS"))
(defparameter *shaq-frame-title "SHAQ CARES-Computer Assessment and Referral System" "Used on some intro frames?")
;;for multi-selection questions
(defparameter *default-multi-choice-title "MULTIPLE-SELECTION QUESTION"
"primary-title-text default text")
(defparameter *default-multi-choice-instr "Select ALL that apply to you"
"primary-instr-text default text")
(defparameter *current-multi-selection-qnum 0)
;;pane args
;;title-rich-text-pane
(defparameter *title-pane-height 70)
(defparameter *instructions-pane-height 100)
(defparameter *title-pane-width nil)
(defparameter *title-text-left-margin-spaces 20)
(defparameter *title-pane-font-face nil)
(defparameter *title-pane-font-size 14)
(defparameter *title-pane-font-color :red )
(defparameter *title-pane-background :LIGHTYELLOW )
(defparameter *title-area-text (format nil "Question scale description goes here."))
;;title-pane fonts SSS CREATE FONT DESCRIPTIONS HERE INSTEAD?
#|(defparameter *title-pane-char-format '(:face "times new roman" :size 18
:color :red :bold T :slant :roman :underline nil ))
(defparameter *title-pane-parag-format '(:alignment :center ;; :left :right
:offset-indent 20 :tab-stops nil ;;eg (10 20 10)
:numbering nil ;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
;; :start-indent 5
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
)) |#
;;instr-rich-text-pane
(defparameter *instr-pane-height 70)
(defparameter *instr-pane-width nil)
(defparameter *instr-text-left-margin-spaces 7)
(defparameter *instr-text-width (- *fr-visible-min-width 40))
(defparameter *instr-pane-background :LIGHT-BLUE )
(defparameter *instr-pane-font-face nil)
(defparameter *instr-pane-font-size 12)
(defparameter *instr-pane-font-color :black )
(defparameter *instr-area-text (format nil "Question instructions text goes here."))
;;quest-rich-text-pane
(defparameter *quest-pane-height nil) ;; 460)
(defparameter *quest-pane-width 430)
(defparameter *quest-text-width (- *quest-pane-width 20))
(defparameter *quest-text-left-margin-spaces 0)
(defparameter *quest-pane-background :LIGHT-BLUE)
(defparameter *quest-pane-font-face nil)
(defparameter *quest-pane-font-size 12)
(defparameter *quest-pane-font-weight nil) ;;or :bold
(defparameter *quest-pane-font-color :black )
(defparameter *quest-area-text (format nil "~%~%Question areas text goes here."))
;;answer-button-panel
(defparameter *answer-pane-height *quest-pane-height)
(defparameter *answer-pane-width 470)
(defparameter *answer-pane-background :yellow)
(defparameter *answer-pane-font-face nil)
(defparameter *answer-pane-font-size 11)
(defparameter *answer-pane-font-color :black)
(defparameter *answer-panel-y-gap 10)
(defparameter *answer-font-family nil)
(defparameter *answer-font-size 11)
(defparameter *max-ans-text-line-length 66 "Max length of answer text line--leads to second line if longer and increased pane height")
(defparameter *button-text-pane-height 22 "Determines height of each button-text-item row")
;; (defparameter *answer-area-text (format nil "~%~%ANSWER areas text goes here."))
;;button-panel
(defparameter *button-panel-background :red)
(defparameter *button-pane-height 40)
(defparameter *button-pane-width 940)
;; (defparameter *button-pane-font-size 14)
;; (defparameter *button-pane-font-color :black)
(defparameter *button-panel-visible-border nil) ;; to keep from prob w/ red border?
;;to change color (setf (capi:simple-pane-foreground self) color))
;;buttons (types of panes) ;;yyy
;;go-frame-button
(defparameter *go-frame-button-background :red)
(defparameter *go-frame-button-foreground :green)
(defparameter *go-frame-button-text " GO to NEXT Question >>> ")
(defparameter *go-frame-button-width 330)
(defparameter *go-frame-button-height 30)
(defparameter *go-frame-button-x nil)
(defparameter *go-frame-button-y nil)
(defparameter *go-frame-button-font (gp:make-font-description :family "times new roman" :size 14 :weight :bold :slant :italic :underline nil )) ;;:size 13 :color :black
;;added for CSQ
(defparameter *text-go-button-callback nil)
(defparameter *help-font (gp:make-font-description :family "times new roman" :size 12 :weight :bold)) ;; :slant :italic :underline nil )
;; :family :weight :slant :underline :strikeout :width :orientation :charset :w-family
;; (gp:make-font-description :size 13 );; :color :red :weight :bold :face "times new roman":slant :roman :underline nil))
;;previous-frame-button
(defparameter *previous-frame-button-background :green)
(defparameter *previous-frame-button-text " << GO to PREVIOUS Question ")
(defparameter *previous-frame-button-width 180)
(defparameter *previous-frame-button-height 20)
(defparameter *previous-frame-button-x 50)
(defparameter *previous-frame-button-y 10)
(defparameter *previous-frame-button-font (gp:make-font-description :family "times new roman" :size 10 :weight :bold :slant :roman :underline nil ))
;; :size 11 :color :black :bold T :underline nil ))
;;exit-shaq-button
(defparameter *exit-shaq-button-background :red)
(defparameter *exit-shaq-button-text " EXIT ALL of SHAQ ")
(defparameter *exit-shaq-button-width 100)
(defparameter *exit-shaq-button-height 30)
(defparameter *exit-shaq-button-x 120)
(defparameter *exit-shaq-button-y 10)
(defparameter *exit-shaq-button-font (gp:make-font-description :family "times new roman" :size 10 :weight :bold :slant :roman :underline nil )) ;; :color
;;yyy
;;left-button-filler-pane
(defparameter *left-button-filler-pane-width 50)
;;end set-global-question-variables
(defparameter *csq-step-button-strings '("1. Complete ALL CSQ parts--including SHAQ" "2. Complete ALL CSQ parts--EXCEPT SHAQ" "3. BEGIN AFTER Elements NAMED" "4. BEGIN after COMPARING 3 elements at a time." "5. BEGIN after RATING all values" "6. AFTER ratings, EXPLORE a Cognitive System in DEPTH" "7. Complete ONLY SHAQ." "8. LOAD, PROCESS, & VIEW CSQ/SHAQ data" "9. LOAD & VIEW CSYM data" "10. Only STORE & VIEW current data" "11. Only VIEW current data") "In csq-choices frame")
(defparameter *Default-CSQ-userdata-path NIL "Used as default in testing CSQ parts") ;;here66
(defparameter *csq-load-user-data-options '("1. Load last user data" "2. Start user data from beginning." "3. Load *Default-CSQ-userdata-path " "4. SELECT another user data path " "5. Use EXISTING DATA: DO NOT LOAD any data") "In csq-choices frame")
(defparameter *cs-explore-options '("1. Explore ONE Cog System in DEPTH" "2. Do NOT explore any Cog Systems") "In csq-choices frame")
#|FROM SHAQ
(defparameter *go-frame-button-background :red)
(defparameter *go-frame-button-foreground :green)
(defparameter *go-frame-button-text " GO to NEXT Question >>> ")
(defparameter *go-frame-button-width 330)
(defparameter *go-frame-button-height 30)
(defparameter *go-frame-button-x nil)
(defparameter *go-frame-button-y nil)|#
;; )
;;FRAME-QUEST-SINGLE-R-INTERFACE
;;
;;ddd
;;
(capi:define-interface frame-quest-single-R-interface ()
((selected-item-datalist
:initarg :selected-item-datalist
:accessor selected-item-datalist
:initform nil
:type :list
:documentation "Data from selected item")
(quest-num
:initarg :quest-num
:accessor quest-num
:initform nil
:type :integer
:documentation "Question number")
)
(:PANES
;;TITLE-RICH-TEXT-PANE xxx
(title-rich-text-pane
capi:rich-text-pane
:accepts-focus-p NIL
:character-format (list ;; :face *title-pane-font-face
:size *title-pane-font-size
:color *title-pane-font-color
:bold T :italic nil :underline nil )
:paragraph-format (list :alignment :center ;; :left :right
;;no effect? :start-indent 20
;;no effect? :offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
;;only adds at bottom when use format?
:internal-border 8
:visible-min-height *title-pane-height ;; :visible-max-height *title-pane-height
:external-min-width *title-pane-width ;; :external-max-width *title-pane-width
;; :foreground *title-pane-foreground
:background *title-pane-background
;;text done elsewhere :text *title-area-text
;;doesn't work :y 10
)
;;INSTR-RICH-TEXT-PANE
(instr-rich-text-pane
capi:rich-text-pane
:character-format (list ;; :face *instr-pane-font-face
:size *instr-pane-font-size
:color *instr-pane-font-color
:bold nil :italic nil :underline nil )
:paragraph-format '(:alignment :center ;; :left :right
:start-indent 20
:offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 8
:visible-min-height *instr-pane-height ;;:visible-max-height *instr-pane-height
:external-min-width *instr-pane-width ;; :external-max-width *instr-pane-width
;; :foreground *instr-pane-foreground
:background *instr-pane-background
;;text done elsewhere :text (format nil "~% ~A " *instr-area-text)
)
;;QUESTION-RICH-TEXT-PANE xxx
(quest-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;; :face *quest-pane-font-face
:size *quest-pane-font-size
:color *quest-pane-font-color
:bold *quest-pane-font-weight
:italic nil :underline nil )
:paragraph-format '(:alignment :left ;; :center ;; :left :right
;; :start-indent 5
:offset-indent 10
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops nil ;;eg (10 20 10)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 10
;; :visible-min-height *quest-pane-height :visible-max-height *quest-pane-height
:visible-min-width *quest-pane-width ;; :visible-max-width *quest-pane-width
;; :foreground *quest-pane-foreground
:background *quest-pane-background
;; :text *quest-area-text
)
#| (answer-button-panel
capi:radio-button-panel
)|#
(previous-frame-button
capi:push-button
:background *previous-frame-button-background
:text *previous-frame-button-text
:internal-min-width *previous-frame-button-width
:internal-min-height *previous-frame-button-height
:default-x *previous-frame-button-x
:default-y *previous-frame-button-y
:font *previous-frame-button-font
:callback 'previous-quest-frame-callback
:callback-type :interface
;;was (gp:make-font-description :size *button-font-size :weight :bold) ;; :slant :italic)
;;doesn't work :character-format *title-pane-char-format
;;doesn't work? :x 20 :y 20
)
;;end panes
)
(:layouts
;;overall, column layout, 5 rows.
(column-layout-1
capi:column-layout ;; capi:grid-layout
'(row-layout-1 row-layout-2 button-row-layout quest-ans-row-layout)
)
;;first row --title text
(row-layout-1
capi:row-layout
'(title-rich-text-pane)
:visible-min-height *title-pane-height
)
;;second row --instructions text
(row-layout-2
capi:row-layout
'(instr-rich-text-pane )
:visible-min-height *instructions-pane-height
)
;;third row -- push buttons
(button-row-layout
capi:row-layout
'(previous-frame-button) ;; go-frame-button) ;;left-button-filler-pane
;; :visible-border *button-panel-visible-border
:background *button-panel-background
:visible-min-height (- *button-pane-height 10)
:visible-min-width *button-pane-width
;; :x-adjust :center
:y-adjust :center
;; :x-ratios '(1.0 1.5)
;; :x-gap 400
:visible-border nil
)
;;fourth row -- question text and answer buttons/text
;;QUEST-ANS-ROW-LAYOUT
(quest-ans-row-layout
capi:row-layout
'( quest-rich-text-pane answer-button-layout) ;;was answer-button-panel)
;; :visible-min-height *info-pane-height
;; :background *fr-border-color
;; :visible-min-height *answer-pane-height
;; :visible-max-height *answer-pane-height
;; :visible-min-width (- *fr-visible-min-width (* 2 *fr-internal-border)) ;; :visiblel-max-width *answer-pane-width
:background *answer-pane-background
)
(answer-button-layout
capi:row-layout
()
:internal-border 10
:background *answer-pane-background
)
;;end layouts
)
;;MENUS
(:menu-bar help-menu )
(:menus
(help-menu
"SHAQ Help"
(
("Help"
:callback 'shaq-help-callback
:callback-type :interface
)
("Question Help"
:callback 'question-help-callback
:callback-type :interface
)
("SAVING Your SHAQ Results"
:callback 'shaq-saving-results-help-callback
:callback-type :interface
)
("Your SHAQ Results Help"
:callback 'shaq-results-help-callback
:callback-type :interface
)
("Close"
:callback 'close-frame-callback
:callback-type :interface
)
("Exit SHAQ"
:callback 'exit-shaq-callback
:callback-type :interface
;; photo-order-menu
;; dir-or-file-order-menu
))))
;;end new menus
(:default-initargs
:x *initial-x :y *initial-y
:visible-min-width *fr-visible-min-width
:visible-min-height *fr-visible-min-height
:external-border *external-border
:internal-border *internal-border-width
;; :window-styles '(:always-on-top)
:layout 'column-layout-1
:background *fr-border-color
:title *shaq-frame-title
)
;;END FRAME-QUEST-SINGLE-R-INTERFACE
)
;;FRAME-QUEST-MULTI-R-INTERFACE
;;
;;ddd
(capi:define-interface frame-quest-multi-R-interface ()
((selected-item-datalist
:initarg :selected-item-datalist
:accessor selected-item-datalist
:initform nil
:type :list
:documentation "Data from selected item")
(quest-num
:initarg :quest-num
:accessor quest-num
:initform nil
:type :list
:documentation "Question number")
)
(:PANES
;;TITLE-RICH-TEXT-PANE
(title-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;; ;;:face *title-pane-font-face
:size *title-pane-font-size
:color *title-pane-font-color
:bold T :italic nil :underline nil )
:paragraph-format (list :alignment :center ;; :left :right
;;no effect? :start-indent 20
;;no effect? :offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
;;only adds at bottom when use format?
:internal-border 8
:visible-min-height *title-pane-height :visible-max-height *title-pane-height
:external-min-width *title-pane-width ;; :external-max-width *title-pane-width
;; :foreground *title-pane-foreground
:background *title-pane-background
;;text done elsewhere :text *title-area-text
;;doesn't work :y 10
)
;;INSTR-RICH-TEXT-PANE
(instr-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;;:face *instr-pane-font-face
:size *instr-pane-font-size
:color *instr-pane-font-color
:bold T :italic nil :underline nil )
:paragraph-format '(:alignment :center ;; :left :right
:start-indent 20
:offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 5
:visible-min-height *instr-pane-height :visible-max-height *instr-pane-height
:external-min-width *instr-pane-width ;; :external-max-width *instr-pane-width
;; :foreground *instr-pane-foreground
:background *instr-pane-background
;;text done elsewhere :text (format nil "~% ~A " *instr-area-text)
)
;;QUESTION-RICH-TEXT-PANE xxx
(quest-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;;:face *quest-pane-font-face
:size *quest-pane-font-size
:color *quest-pane-font-color
:bold *quest-pane-font-weight
:italic nil :underline nil )
:paragraph-format '(:alignment :left ;; :center ;; :left :right
;; :start-indent 5
:offset-indent 10
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops nil ;;eg (10 20 10)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 10
;; :visible-min-height *quest-pane-height :visible-max-height *quest-pane-height
:visible-min-width *quest-pane-width ;; :visible-max-width *quest-pane-width
;; :foreground *quest-pane-foreground
:background *quest-pane-background
;; :text *quest-area-text
)
(go-frame-button
capi:push-button
:background *go-frame-button-background
:foreground *go-frame-button-foreground
:text *go-frame-button-text
:internal-min-width *go-frame-button-width
:internal-max-width *go-frame-button-width
:internal-min-height *go-frame-button-height
:internal-max-height *go-frame-button-height
:external-min-width (+ *go-frame-button-width 10)
;; :external-max-width *go-frame-button-width
:external-min-height (+ *go-frame-button-height 20) ;;was 10
;; :external-max-height *go-frame-button-height
:default-x *go-frame-button-x
:default-y *go-frame-button-y
:font *go-frame-button-font
;; :color-requirements
;; :selected T
:default-p T ;;means if return hit, selects this button
:callback 'go-multiple-selection-callback
;; :callback-type :interface
;;was (gp:make-font-description :size *button-font-size :weight :bold) ;; :slant :italic)
;;doesn't work :character-format *title-pane-char-format
;;doesn't work? :x 20 :y 20
;; :button-group
)
(previous-frame-button
capi:push-button
:background *previous-frame-button-background
:text *previous-frame-button-text
:internal-min-width *previous-frame-button-width
:internal-min-height *previous-frame-button-height
:default-x *previous-frame-button-x
:default-y *previous-frame-button-y
:font *previous-frame-button-font
:callback 'previous-quest-frame-callback
:callback-type :interface
;;was (gp:make-font-description :size *button-font-size :weight :bold) ;; :slant :italic)
;;doesn't work :character-format *title-pane-char-format
;;doesn't work? :x 20 :y 20
)
;;end panes
)
(:layouts
;;overall, column layout, 5 rows.
(column-layout-1
capi:column-layout ;; capi:grid-layout
'(row-layout-1 row-layout-2 button-row-layout quest-ans-row-layout)
)
;;first row --title text
(row-layout-1
capi:row-layout
'(title-rich-text-pane)
;; :visible-min-height *title-pane-height
)
;;second row --instructions text
(row-layout-2
capi:row-layout
'(instr-rich-text-pane )
;; :visible-min-height *instructions-pane-height
)
;;AAA
;;third row -- push buttons
(button-row-layout
capi:row-layout
'(previous-frame-button go-frame-button) ;;left-button-filler-pane
;; :visible-border *button-panel-visible-border
:background *button-panel-background
:visible-min-height *button-pane-height
:visible-min-width *button-pane-width
;; :x-adjust :center
:y-adjust :center
;; :x-ratios '(1.0 1.5)
:x-gap 450
:visible-border nil
)
;;fourth row -- question text and answer buttons/text
;;QUEST-ANS-ROW-LAYOUT
(quest-ans-row-layout
capi:row-layout
'(quest-rich-text-pane answer-button-layout)
;; :visible-min-height *info-pane-height
;; :background *fr-border-color
;; :visible-min-height *answer-pane-height
;; :visible-max-height *answer-pane-height
;; :visible-min-width (- *fr-visible-min-width (* 2 *fr-internal-border)) ;; :visiblel-max-width *answer-pane-width
;; :background *answer-pane-background
)
(answer-button-layout
capi:row-layout
()
:internal-border 10
:background *answer-pane-background
)
;;end layouts
)
;;MENUS
(:menu-bar help-menu )
(:menus
(help-menu
"SHAQ Help"
(
("Help"
:callback 'shaq-help-callback
:callback-type :interface
)
("Question Help"
:callback 'question-help-callback
:callback-type :interface
)
("SAVING Your SHAQ Results"
:callback 'shaq-saving-results-help-callback
:callback-type :interface
)
("Your SHAQ Results Help"
:callback 'shaq-results-help-callback
:callback-type :interface
)
("Close"
:callback 'close-frame-callback
:callback-type :interface
)
("Exit SHAQ"
:callback 'exit-shaq-callback
:callback-type :interface
;; photo-order-menu
;; dir-or-file-order-menu
))))
;;end new menus
(:default-initargs
:x *initial-x :y *initial-y
:visible-min-width *fr-visible-min-width
:visible-min-height *fr-visible-min-height
:external-border *external-border
:internal-border *internal-border-width
;; :window-styles '(:always-on-top)
:layout 'column-layout-1
:background *fr-border-color
:title *shaq-frame-title
;;end frame-quest-multi-R-interface
))
;;TEST
;; (defun testmf3 () (let ((testmf3 (make-instance 'frame-quest-multi-R-interface))) (capi:display testmf3)))
;;FRAME-TALL-QUEST-MULTI-R-INTERFACE
;;
;; for use with make-question-function for TALL/MORE ANSWERS
;;
;;ddd
(capi:define-interface frame-TALL-quest-multi-R-interface ()
((selected-item-datalist
:initarg :selected-item-datalist
:accessor selected-item-datalist
:initform nil
:type :list
:documentation "Data from selected item")
(quest-num
:initarg :quest-num
:accessor quest-num
:initform nil
:type :list
:documentation "Question number")
)
(:PANES
;;TITLE-RICH-TEXT-PANE
(title-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;; ;;:face *title-pane-font-face
:size *title-pane-font-size
:color *title-pane-font-color
:bold T :italic nil :underline nil )
:paragraph-format (list :alignment :center ;; :left :right
;;no effect? :start-indent 20
;;no effect? :offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
;;only adds at bottom when use format?
:internal-border 8
:visible-min-height (* 2 *title-pane-height)
:visible-max-height (* 2 *title-pane-height)
;; :external-min-width (* 0.5 *title-pane-width) ;; :external-max-width *title-pane-width
;; :foreground *title-pane-foreground
:background *title-pane-background
;;text done elsewhere :text *title-area-text
;;doesn't work :y 10
)
;;INSTR-RICH-TEXT-PANE
(instr-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;;:face *instr-pane-font-face
:size *instr-pane-font-size
:color *instr-pane-font-color
:bold T :italic nil :underline nil )
:paragraph-format '(:alignment :center ;; :left :right
:start-indent 20
:offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 5
:visible-min-height (* 2 *instr-pane-height)
:visible-max-height (* 2 *instr-pane-height)
;; :external-min-width (* 0.5 *instr-pane-width) ;; :external-max-width *instr-pane-width
;; :foreground *instr-pane-foreground
:background *instr-pane-background
;;text done elsewhere :text (format nil "~% ~A " *instr-area-text)
)
;;QUESTION-RICH-TEXT-PANE xxx
(quest-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;;:face *quest-pane-font-face
:size *quest-pane-font-size
:color *quest-pane-font-color
:bold *quest-pane-font-weight
:italic nil :underline nil )
:paragraph-format '(:alignment :left ;; :center ;; :left :right
;; :start-indent 5
:offset-indent 10
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops nil ;;eg (10 20 10)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 10
:visible-max-height 350
:visible-min-width *quest-pane-width ;; :visible-max-width *quest-pane-width
;; :foreground *quest-pane-foreground
:visible-max-width *quest-pane-width
:background *quest-pane-background
;; :text *quest-area-text
)
(go-frame-button
capi:push-button
:background *go-frame-button-background
:foreground *go-frame-button-foreground
:text *go-frame-button-text
:internal-min-width *go-frame-button-width
:internal-max-width *go-frame-button-width
:internal-min-height *go-frame-button-height
:internal-max-height *go-frame-button-height
:external-min-width (+ *go-frame-button-width 10)
;; :external-max-width *go-frame-button-width
:external-min-height (+ *go-frame-button-height 20) ;;was 10
;; :external-max-height *go-frame-button-height
:default-x *go-frame-button-x
:default-y *go-frame-button-y
:font *go-frame-button-font
;; :color-requirements
;; :selected T
:default-p T ;;means if return hit, selects this button
:callback 'go-multiple-selection-callback
;; :callback-type :interface
;;was (gp:make-font-description :size *button-font-size :weight :bold) ;; :slant :italic)
;;doesn't work :character-format *title-pane-char-format
;;doesn't work? :x 20 :y 20
;; :button-group
)
(previous-frame-button
capi:push-button
:background *previous-frame-button-background
:text *previous-frame-button-text
:internal-min-width *previous-frame-button-width
:internal-min-height *previous-frame-button-height
:default-x *previous-frame-button-x
:default-y *previous-frame-button-y
:font *previous-frame-button-font
:callback 'previous-quest-frame-callback
:callback-type :interface
;;was (gp:make-font-description :size *button-font-size :weight :bold) ;; :slant :italic)
;;doesn't work :character-format *title-pane-char-format
;;doesn't work? :x 20 :y 20
)
;;end panes
)
(:layouts
;;overall, column layout, 5 rows.
(top-row-layout
capi:row-layout
'(column-layout-1 answer-button-layout)
)
#| (test-layout
capi:row-layout
'()
:background :green
:visible-min-width 200
:visible-min-height 200
)|#
(column-layout-1
capi:column-layout ;; capi:grid-layout
'(row-layout-1 row-layout-2 button-row-layout quest-ans-row-layout)
:visible-max-width 400
)
;;first row --title text
(row-layout-1
capi:row-layout
'(title-rich-text-pane)
;; :visible-min-height *title-pane-height
)
;;second row --instructions text
(row-layout-2
capi:row-layout
'(instr-rich-text-pane )
;; :visible-min-height *instructions-pane-height
)
;;AAA
;;third row -- push buttons
(button-row-layout ;;kept same name as non-tall frame
capi:column-layout
'(go-frame-button previous-frame-button ) ;;left-button-filler-pane
;; :visible-border *button-panel-visible-border
:background *button-panel-background
:visible-min-height (* 2.2 *button-pane-height)
:visible-max-width (* 0.5 *button-pane-width)
;; :x-adjust :center
:y-adjust :center
;; :x-ratios '(1.0 1.5)
:y-gap 10
:visible-border nil
)
;;fourth row -- question text and answer buttons/text
;;QUEST-ANS-ROW-LAYOUT
(quest-ans-row-layout
capi:row-layout
'(quest-rich-text-pane ) ;;did incl answer-button-layout
;; :visible-min-height *info-pane-height
;; :background *fr-border-color
;; :visible-min-height *answer-pane-height
;; :visible-max-height *answer-pane-height
;; :visible-min-width (- *fr-visible-min-width (* 2 *fr-internal-border)) ;; :visiblel-max-width *answer-pane-width
;; :background *answer-pane-background
)
(answer-button-layout
capi:row-layout
()
:internal-border 10
:background :yellow ;;*answer-pane-background
:visible-min-width 500
)
;;end layouts
)
;;MENUS
(:menu-bar help-menu )
(:menus
(help-menu
"SHAQ Help"
(
("Help"
:callback 'shaq-help-callback
:callback-type :interface
)
("Question Help"
:callback 'question-help-callback
:callback-type :interface
)
("SAVING Your SHAQ Results"
:callback 'shaq-saving-results-help-callback
:callback-type :interface
)
("Your SHAQ Results Help"
:callback 'shaq-results-help-callback
:callback-type :interface
)
("Close"
:callback 'close-frame-callback
:callback-type :interface
)
("Exit SHAQ"
:callback 'exit-shaq-callback
:callback-type :interface
;; photo-order-menu
;; dir-or-file-order-menu
))))
;;end new menus
(:default-initargs
:x *initial-x :y *initial-y
:visible-min-width *fr-visible-min-width
:visible-min-height *fr-visible-min-height
:external-border *external-border
:internal-border *internal-border-width
;; :window-styles '(:always-on-top)
:layout 'top-row-layout
:background *fr-border-color
:title *shaq-frame-title
;;end frame-quest-multi-R-interface
))
;;TEST
;; (let ((inst (make-instance 'frame-quest-multi-R-interface))) (capi:display inst))
;;HIGH-ANSWER-BUTTON-INTERFACE
;;
;;ddd
(capi:define-interface frame-tall-multi-answer-button-interface ()
;; "In frame-quest-functions.lisp, for MORE buttons, lacks a second top text pane."
((selected-item-datalist
:initarg :selected-item-datalist
:accessor selected-item-datalist
:initform nil
:type :list
:documentation "Data from selected item")
(quest-num
:initarg :quest-num
:accessor quest-num
:initform nil
:type :list
:documentation "Question number")
)
(:panes
(top-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL ;;WAS ~%SHAQ SUBPARTS and SCALES first
:background :light-blue
;;no effect :internal-border 20
:visible-border :default
:character-format (list :face *title-pane-font-face
:size 16 ;;*title-pane-font-size
:color *title-pane-font-color :bold T :italic nil :underline nil )
:paragraph-format (list :alignment :center ;; :left :right
;;no effect? :start-indent 20
;;no effect? :offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
)
#|(bottom-rich-text-pane
capi:rich-text-pane
:text (format nil "")
:background :yellow
:character-format (list :face *quest-pane-font-face :size *intro-text-font-size
:color *quest-pane-font-color :bold T :italic nil :underline nil )
:paragraph-format '(:alignment :left ;; :center ;; :left :right
;; :start-indent 5
:offset-indent 10
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops nil ;;eg (10 20 10)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
)|#
;;panes--buttons
(go-fr-button
capi:push-button
:background *go-frame-button-background
:foreground *go-frame-button-foreground
:text "GO to NEXT Frame >>"
:visible-min-width *go-frame-button-width
:visible-max-width *go-frame-button-width
:visible-min-height *go-frame-button-height
:visible-max-height *go-frame-button-height
;; :external-max-height *go-frame-button-height
#| :default-x *go-frame-button-x
:default-y *go-frame-button-y|#
:font *go-frame-button-font
;; :color-requirements
;; :selected T
:default-p T ;;means if return hit, selects this button
;;was (gp:make-font-description :size *button-font-size :weight :bold) ;; :slant :italic)
:callback 'go-select-scales-frame-callback
:callback-type :data-interface
:data *go-next-frame-callback-data
;;was (gp:make-font-description :size *button-font-size :weight :bold) ;; :slant :italic)
;;doesn't work :character-format *title-pane-char-format
;;doesn't work? :x 20 :y 20
)
(previous-fr-button
capi:push-button
:background :yellow
:background *previous-frame-button-background
:text "<< GO to PREVIOUS Frame"
:internal-min-width *previous-frame-button-width
:internal-min-height *previous-frame-button-height
:default-x *previous-frame-button-x
:default-y *previous-frame-button-y
:font *previous-frame-button-font
:callback 'previous-intro-frame-callback
:callback-type :data-interface
:data *previous-intro-frame-callback-data
)
(quest-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;;:face *instr-pane-font-face
:size *instr-pane-font-size
:color *instr-pane-font-color
:bold T :italic nil :underline nil )
:paragraph-format '(:alignment :center ;; :left :right
:start-indent 20
:offset-indent 20
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops '(5 10 15 20)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 5
:visible-min-height (+ *instr-pane-height 200)
;;:visible-max-height *instr-pane-height
:external-min-width *instr-pane-width ;; :external-max-width *instr-pane-width
;; :foreground *instr-pane-foreground
:background *instr-pane-background
;;text done elsewhere :text (format nil "~% ~A " *instr-area-text)
)
;;INSTR-RICH-TEXT-PANE
(instr-rich-text-pane
capi:rich-text-pane :accepts-focus-p NIL
:character-format (list ;;:face *quest-pane-font-face
:size *quest-pane-font-size
:color *quest-pane-font-color
:bold *quest-pane-font-weight
:italic nil :underline nil )
:paragraph-format '(:alignment :left ;; :center ;; :left :right
;; :start-indent 5
:offset-indent 10
;; :relative-indent 1.0 ;;relative indent for rest of paragraphs
:tab-stops nil ;;eg (10 20 10)
:numbering nil
;;OR :bullet, :arabic, :lowercase,:uppercase, :lower-roman or :upper-roman.
)
:visible-border T
:internal-border 10
;; :visible-min-height *quest-pane-height :visible-max-height *quest-pane-height
:visible-min-width (- *quest-pane-width 20) ;; :visible-max-width *quest-pane-width
;; :foreground *quest-pane-foreground
:background *quest-pane-background
;; :text *quest-area-text