Re: Updated HTML widget by Stephen Uehler?
- From: Kevin Walzer <kw@xxxxxxxxxxxxxxx>
- Date: Sat, 06 Sep 2008 15:09:22 -0400
Larry W. Virden wrote:
On Aug 31, 2:06 pm, Kevin Walzer <k...@xxxxxxxxxxxxxxx> wrote:I've made periodic attempts in the past to modernize the ancient HTML
widget [...]
for use as a help viewer.
I believe, however, that a need for a basic, lightweight HTML renderer
I'm wondering if an effort to
simply modernize the Uehler widget, make its display a bit cleaner, and
easy to plug in to Tk applications, would be useful, especially for apps
that made use of basic HTML without CSS.
In rereading this thread today, I am struck by the thought that
perhaps what is going on is something I often see with my users... a
case where the requirements and implementation details are
intermingling a bit too soon.
I see two thoughts in this thread: "do we need a modern html rending
widget" and "do we need a rendering widget which provides a more
natural method of displaying 'rich text'".
It seems to me that some writing this thread see the word "html" and
think "html == web browser" while others think "html == text markup
language".
Perhaps a preceeding question could be:
What text markup language seems most natural and flexible when writing
dialogs, help screens, and other similar pieces of applications?
Once a text markup language is chosen, then one can think about
rendering the language.
Currently in the tcl community several rudimentary languages are in
use which may or may not suit all the original poster's needs - the
documentation markup language used in tcllib and a few other places,
the wiki's page markup, nroff, vanilla html. It's hard to say how they
fit the need until the needs are specified in some kind of detail.
For instance - the example later in the thread talked about support
for plain text, bold text, italic text, at the very least. Another
respondent talked about semantic markup - title, headings, paragraphs
perhaps, etc. Perhaps another person might find useful specification
of color, relational sizing of fonts, perhaps even hyper links. And
someone might want to indicate that ease of specification is important
- running the gamet from TeX or nroff to SGML to something simple like
POD/wiki language/stext or one of the other simple markups.
Once someone interested in the project has a set of specific features
they want to support, then they can look at the various languages
currently available and determine whether any of them meet that need.
If so, then tracking down some sort of parsing code shouldn't be too
horrible. Translating the parsed language into Tk/Ttk elements would
then be the last step... and that might be the easiest of them
all :smile:
My project is going to be very limited in scope.
It will consist mainly of updating the htmllib.tcl package at this URL:
http://noucorp.com/cgi-bin/noucorp/generic.tcl?dir=/var/www/html/tcl/utilities
Specifically, I'm going to do the following:
1. Clean its display a bit. At present it displays hyperlinks with a change in relief rather than with underlining.
2. Update its demo client with a more modern layout. At present the scrollbar is on the left, it has no method for navigating back to previously viewed pages, and so on.
3. Add a mechanism for it to call external browsers for hyperlinks that begin with http://. At present it can only display local HTML.
4. If possible, add hooks for the client to be displayed either in its own toplevel window, for instance as a help viewer (which it currently supports) and also to make the display a child widget--this might allow HTML to function as rich text in an "about the app" dialog, or to provide more detailed error messages, etc.
I do not envision turning this project into a general-purpose way to display HTML in an arbitrary widget (for instance, in a label). Nor do I envision this turning into a full-fledged web browser. To be honest, it will probably be limited to its current support for HTML 2.0--I have no plans to fiddle with the rendering code at that level. Nor will I add support for CSS.
If others want to play with the code once I release something, and take it in a different direction, of course they are more than welcome to do so.
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
.
- Follow-Ups:
- Re: Updated HTML widget by Stephen Uehler?
- From: dave.joubert@xxxxxxxxxxxxxx
- Re: Updated HTML widget by Stephen Uehler?
- From: Gerald W. Lester
- Re: Updated HTML widget by Stephen Uehler?
- References:
- Re: Updated HTML widget by Stephen Uehler?
- From: Larry W. Virden
- Re: Updated HTML widget by Stephen Uehler?
- Prev by Date: Re: Updated HTML widget by Stephen Uehler?
- Next by Date: stubs, tcc
- Previous by thread: Re: Updated HTML widget by Stephen Uehler?
- Next by thread: Re: Updated HTML widget by Stephen Uehler?
- Index(es):
Relevant Pages
|