home *** CD-ROM | disk | FTP | other *** search
- ;; Some redefinition to make the demo working.
- ;; No care has been taken for trying to make this demo working well since
- ;; Tk 4.0 will enhance greatly the text widget.
- ;; This is just for playing with the BLT hyper text widget.
- ;; If this widget is really needed, I could try to provide a better support
-
- (set! *load-path* (cons ".." *load-path*))
- (require "blt")
-
-
- (define global list) ;; Kludge
- (define blt_htext{line} #f) ;; Kludge
- (define blt_htext{widget} '.htext) ;; Kludge
- (define blt_htext{file} #f) ;; Kludge
-
-
- (option 'add "*Blt_htext.foreground" "navyblue")
-
- ;;; Create horizontal and vertical scrollbars
- (scrollbar '.vscroll :command (lambda l (apply .htext 'yview l)) :orient 'vertical)
- (scrollbar '.hscroll :command (lambda l (apply .htext 'xview l)) :orient 'horizontal)
-
- ;;;; Create the hypertext widget
- (blt_htext '.htext
- :file "./htext.txt"
- :yscrollcommand (lambda l (apply .vscroll 'set l))
- :xscrollcommand (lambda l (apply .hscroll 'set l))
- :height '6i
- :yscrollunits '10m
- :xscrollunits '0.25i)
-
- ;;;;
- ;;;; Use BLT_TABLE for placing widgets
- ;;;;
- (blt_table *root*
- .htext "0,0" :fill 'both
- .vscroll "0,1" :fill 'y
- .hscroll "1,0" :fill 'x)
-
- (blt_table 'row *root* 'configure 1 :resize 'none)
- (blt_table 'column *root* 'configure 1 :resize 'none)
-
- (wm 'maxsize *root* 1000 1000)
- (wm 'minsize *root* 0 0)
-