[XXX A blurb on why bother with "resource objects": shared resources, commonly used objects such as dialog boxes, etc.]
The object that lives in "viola/res/objs/res.font.v" is an object that maps simple font specification names to the system font name. It allows viola objects specify a font by, say, "normal_large", and map it to a system (X Windows) dependent notation such as "-adobe-helvetica-medium-r-*-*-17-*-*-*-p-*-*-*".
This is where you can customize the fonts that work the That is, if fonts are coming out funny on your system, you can replace the given fonts to ones you know look good on your system. A useful Unix/X tool for aiding in selecting a set of replacement fonts is 'xfontsel'.
Another job done in this object is to specify fall back fonts. For example, for each font, one can specify the alternative fonts for viola to try to get. Like this, for the "normal_large" type font:
The 0'th specification is tried first, then the 1'st, etc. There's no limit to the size of the list, but more than 3 is probably overkill. Notice that the order of the array goes from from the most specific font to the most general.
Please refer to the object file (viola/res/objs/res.font.v) for the specifics.
A quick way to get a line of text from the user. Here's the calling syntax:
The ideas is to keep commonly used, and sharable object, in a commonly accessilbe place -- a library. Weel, OK, so not much exists now. But it's a beginning.
Here are some ways to call and use the pre defined dialog boxes.
Execute the above application gets you this GUI:
Clicking on the button invokes the following dialog box:
Replace with default string "Bart" with "Homer", and the label of our ``getLineEntryTest'' application changes:
See the README files which came with the software for more specific information. But generally...
ViolaWWW gets many of its color settings from the ~/.Xdefault file. Here's an example of what you might insert into your X resource defaults file:
Then do this to update the X resources, to let it take effect: