(define-method initialize-instance ((widget <fix-layout>) width height)
(call-next-method widget width height)
(%trace "; (initialize-instance <fix-layout>) "widget" "width"x"height"\n")
+ (set-fix-rect! (fix-layout-view widget) 0 0 width height)
(set-gtk-widget-draw-callback! widget layout-draw-callback)
(set-scm-widget-set-scroll-adjustments-callback! widget adjustments-callback)
(C-call "gtk_widget_set_can_focus" (gobject-alien widget) 1)
(define-method fix-widget-realize-callback ((widget <fix-layout>))
(call-next-method widget)
(%trace "; (fix-widget-realize-callback <fix-layout>) "widget"\n")
- (let ((geom (fix-widget-geometry widget)))
- (set-fix-rect! (fix-layout-view widget)
- 0 0
- (fix-rect-width geom) (fix-rect-height geom)))
(adjust-adjustments widget))
(define (adjustments-callback widget hGtkAdjustment vGtkAdjustment)
(high (fix:+ (fix-rect-low extent) extent-size))
(page-size view-size)
(page-incr (fix:max 1 (fix:- view-size step-incr))))
- (%trace "; large-drawing:"extent" view:"view"\n")
+ (%trace2 "; large-drawing:"extent" view:"view"\n")
(let ((value (clamped-value! low (fix:- high page-size))))
- (%trace "; adjustment: "low" "value" "high" "page-size"\n")
+ (%trace2 "; adjustment: "low" "value" "high" "page-size"\n")
(set-gtk-adjustment! adj value low high
page-size step-incr page-incr)))
;; Viewport is larger than drawing: thumb (page) is drawing.