#!/usr/local/bin/newlisp ;; ;; html-demo.lsp - demonstrate the text pane with HTML ;;;; initialization (set-locale "C") (load (append (env "NEWLISPDIR") "/guiserver.lsp")) (gs:init) ;;;; describe the GUI (gs:frame 'HtmlDemo 100 100 400 270 "HTML text-pane demo") (gs:text-pane 'HtmlPane 'htmlpane-action "text/html" 200 500) (gs:set-editable 'HtmlPane nil) (gs:set-tab-size 'HtmlPane 4) (gs:set-font 'HtmlPane "Monospaced" 14 "plain") (gs:set-background 'HtmlPane 1 1 0.96) (if (= ostype "Windows") (set 'url (string "file:///" (env "NEWLISPDIR") "/guiserver/html-demo.lsp")) (set 'url "file:///usr/local/share/newlisp/guiserver/html-demo.lsp") ) (set 'page (format [text]

Text panes for HTML

This is a page of html text with a clickable hyperlink html-demo.lsp.

The previous link expects the file html-demo.lsp in the current directory from where the program was started.

Only simple pages are processed correctly.

[/text] url)) (gs:set-text 'HtmlPane page) (gs:append-text 'HtmlPane "This is appended text") (gs:add-to 'HtmlDemo 'HtmlPane) (gs:set-visible 'HtmlDemo true) ;;;; define actions (define (urlfield-action id txt) ) (define (htmlpane-action id text) ) ;;;; listen for incoming action requests and dispatch (gs:listen) ;; eof