[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hypertext in MCL?
- To: firstname.lastname@example.org
- Subject: Hypertext in MCL?
- From: email@example.com (Kurt D. Fenstermacher)
- Date: Mon, 16 May 1994 20:14:58 GMT
- Keywords: Hypertext, dialog item, button
- Newsgroups: comp.lang.lisp.mcl
- Organization: Computer Science - Univ. of Chicago
- Sender: firstname.lastname@example.org (News System)
- Summary: How do I implement hypertext links in MCL?
- Xdisclaimer: No attempt was made to authenticate the sender's name.
I'd like to implement a "hypertext" system in MCL. The program I'm
working on involves retrieving recipes from a database, given a user
request in English (e.g. "I'm looking for a recipe for a Thai peanut
salad dressing, which is spicy, but also a little sour.") After I've
recalled the appropriate recipes, I'd like the user to be able to click
on keywords (e.g. what in the recipe made the program conclude that it
was sour?) in the recipe text, and get an explanation of the program's
"chain of thought.".
At the moment the parse code which processes the recipes produces
embedded codes in the text to indicate these keywords. Currently, I
can display the plain text using a static text dialog item. But how
can I turn a plain text item (i.e. a word) into a button, indicated by
a different foreground/background color?
One solution seems to be to calculate (based on window size, font size,
etc.) the position of the word in the dialog item, and then draw a
button with the word/phrase as the button's text, in the appropriate
location, right over the existing word. But this calucation would be
complicated by such things as proportional fonts, resized windows, etc.
Are there higher-level functions to do implement hypertext more
Thanks for your help.
Kurt D. Fenstermacher
Artificial Intelligence Laboratory
University of Chicago