(gtk-window-set-title window "fix-layout-demo")
(gtk-window-set-default-size window 200 400)
(set-gtk-window-delete-event-callback!
- window (lambda (w) (%trace "; Closed "w".\n") 0))
+ window (lambda (w) (%trace ";closed "w"\n") 0))
(gtk-container-set-border-width window 10)
(gtk-container-add scroller1 layout1)
(gtk-container-add vbox scroller1)
drawing (list (list cursor1 layout1) (list cursor2 layout2))))
(if blink?
(let ((thread (start-blinking drawing)))
- (%trace "; Cursor blinking courtesy of "thread".\n"))
- (%trace "; Cursor blinking disabled.\n"))
+ (%trace ";cursor blinker: "thread"\n"))
+ (%trace ";cursor blinking disabled\n"))
(if spin?
(let ((thread (start-spinning drawing)))
- (%trace "; Ring spinning courtesy of "thread".\n"))
- (%trace "; Ring spinning disabled.\n"))
+ (%trace ";ring spinner: "thread"\n"))
+ (%trace ";ring spinning disabled\n"))
(set-fix-layout-drawing! layout1 drawing 175 150)
(set-fix-layout-drawing! layout2 drawing 175 150))
(gtk-widget-grab-focus layout1)
- (%trace "; Created "layout1" and "layout2"\n"))
+ (%trace ";created "layout1" and "layout2"\n"))
unspecific)
(define-class (<demo-layout> (constructor () (width height)))
(view (fix-layout-view layout))
(x (+ window-x (fix-rect-x view)))
(y (+ window-y (fix-rect-y view))))
- (%trace2 "; Pointer moved to ("x","y") in "layout".\n")
+ (%trace2 ";pointer moved to ("x","y") in "layout"\n")
(for-each
(lambda (ink)
(if (not (text-ink? ink))
- (%trace "; Picked: "ink"\n")
+ (%trace2 ";picked: "ink"\n")
(let ((index (text-ink-xy-to-index ink x y))
(text-extent (fix-ink-extent ink)))
- (%trace "; Picked: "index" in "(simple-text-ink-text ink)"\n")
+ (%trace ";picked: "index" in "ink"\n")
(with-text-ink-grapheme-rect
ink index
(lambda (xG yG widthG heightG)
(view (fix-layout-view layout))
(x (+ window-x (fix-rect-x view)))
(y (+ window-y (fix-rect-y view))))
- (outf-console "; Pointer release at ("x","y").\n")
+ (%trace ";pointer released at ("x","y")\n")
(for-each
(lambda (ink)
(if (not (text-ink? ink))
- (%trace "; Picked: "ink"\n")
+ (%trace ";picked: "ink"\n")
(let ((index (text-ink-xy-to-index ink x y)))
- (%trace "; Picked: "ink" (char "index")\n"))))
+ (%trace ";picked: "ink" (char "index")\n"))))
(fix-drawing-pick-list drawing layout x y)))
#t)
(define (demo-key-press-handler layout keyval char-bits)
- (%trace "; Key press on "layout"\n")
- (outf-console "; Keyval: "keyval" "char-bits"\n")
+ (%trace ";demo-key-press-handler "layout" "keyval" "char-bits"\n")
(if (and (char? keyval) (char=? keyval #\D))
(bkpt 'Test))
;;NOT handled.
(create-thread
#f
(lambda ()
- (%trace ";spinning start\n")
+ (%trace ";spinning started\n")
(let* ((frames 10)
(x 270) (y 190) (height 30) (width 30)
(pi (* (atan 1 1) 4))
(create-thread
#f
(lambda ()
- (%trace ";blinking start\n")
+ (%trace ";blinking started\n")
(let loop ()
;; Off!
(for-each (lambda (cursor.widgets)