Random Bits of Open Code

Check-in [0496171a96]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed the help pic relative to the tabs to the left
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0496171a96032dad683d6afa70f59bfcc7d58303
User & Date: matt 2018-08-04 23:08:12
Context
2018-08-05
20:39
Added config placeholder to learn-teach check-in: 0f18972173 user: matt tags: trunk
2018-08-04
23:08
Fixed the help pic relative to the tabs to the left check-in: 0496171a96 user: matt tags: trunk
2018-08-03
06:14
Tweaked some wording on help page check-in: 81b0c51fed user: matt tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to multiapp/src/help.scm.

174
175
176
177
178
179
180
181


182
183
184
185
186
187
188
...
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

(define (help-drawing)
  (let* ((c1           #f)
	 (help-drawing (make-drawing))
	 (hlib         (make-lib))
	 ;; components
	 (learn     (make-comp))
	 (teach     (make-comp)))


    (add-lib help-drawing "hlib" hlib) ;; add library hlib to drawing
    ;; add objects to learn tree sketch

    (add-learn hlib learn)
    (add-teach hlib teach)

    ;; instantiate component teach from library hlib in drawing help-drawing
................................................................................
    
    (drawing-scalex-set! help-drawing 1.5)
    (drawing-scaley-set! help-drawing 1.5)
    
    (drawing-update-proc-set!
     help-drawing
     (lambda (dwg c xadj yadj)
       (set! c1 c)
       (canvas-clear! c)












       (draw dwg #t)))
    
    (let ((c (drawing-init help-drawing)))
      (print "c:   " c)
      #;(show
       (dialog
	(vbox
	 #:expand "YES"
	 (label "The drawing")
      c)))
      (thread-start! (make-thread (lambda ()(thread-sleep! 1)(draw help-drawing #t)) "Init drawing"))
      (cons c c1) ;; return the canvas and the lowerlevel accessor of that canvas
      )))

)
;; (main-loop)








|
>
>







 







|

>
>
>
>
>
>
>
>
>
>
>
>



|













174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
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

(define (help-drawing)
  (let* ((c1           #f)
	 (help-drawing (make-drawing))
	 (hlib         (make-lib))
	 ;; components
	 (learn     (make-comp))
	 (teach     (make-comp))
	 (d-xsize   (drawing-xsize help-drawing))
	 (d-ysize   (drawing-ysize help-drawing)))
    (add-lib help-drawing "hlib" hlib) ;; add library hlib to drawing
    ;; add objects to learn tree sketch

    (add-learn hlib learn)
    (add-teach hlib teach)

    ;; instantiate component teach from library hlib in drawing help-drawing
................................................................................
    
    (drawing-scalex-set! help-drawing 1.5)
    (drawing-scaley-set! help-drawing 1.5)
    
    (drawing-update-proc-set!
     help-drawing
     (lambda (dwg c xadj yadj)
       (if (not c1)(set! c1 c))
       (canvas-clear! c)
       (let-values (((x y)            (canvas-origin c1))
		    ((x0 y0 x1 y1)    (canvas-size c1)) ;; grows when window stretched beyond start limit
		    ((xoff)           (drawing-xoff help-drawing))
		    ((yoff)           (drawing-yoff help-drawing))
		    ;; ((xscreen yscreen)(screen-size))
		    )
	 (drawing-yoff-set! help-drawing (* (- y0 849) 0.4)) ;; force the drawing to align with top of page, I found the 0.4 by bisecting. No sure how it relates to 1.5 scale
	 ;; for this drawing, starting height assumed is 1000 pix.
	 ;; (print "ORIGIN: " x " " y)
	 ;; (print "SIZE:   " x0 " " y0 " " x1 " " y1) ;; 0 is pixels, 1 is mm
	 ;; (print "xoff:   " xoff " yoff: " yoff)
	 )
       (draw dwg #t)))
    
    (let ((c (drawing-init help-drawing)))
      ;; (print "c:   " c)
      #;(show
       (dialog
	(vbox
	 #:expand "YES"
	 (label "The drawing")
      c)))
      (thread-start! (make-thread (lambda ()(thread-sleep! 1)(draw help-drawing #t)) "Init drawing"))
      (cons c c1) ;; return the canvas and the lowerlevel accessor of that canvas
      )))

)
;; (main-loop)