Konfabulator Ref 1.5.1
Konfabulator Ref 1.5.1
Game Manuals · PDF
| Filename | Konfabulator_Ref_1.5.1.pdf |
|---|---|
| Size | 0.46 MB |
| Subsection | Konfabulator Ref 1.5.1 |
| Downloads | 1 |
Enjoying MacTrove?
Anonymous downloads are free and unlimited.
Create a free account to track favorites,
contribute metadata corrections, and join the
community chat.
Reader
Loading…
OCR / Text contents
Konfabulator
Reference Manual
Version 1.5.1
September 26, 2003
Release History
First Release February 10, 2003
Second Release February 12, 2003
Third Release February 15, 2003
Fourth Release February 19, 2003
Fifth Release - Version 1.5 July 23, 2003
Sixth Release - Version 1.5.1 September 26, 2003
Thanks to all who have submitted comments and corrections.
Copyright ” 2003 Arlo Rose and Perry Clarke.
2 | Konfabulator Reference
The Basics
Konfabulator uses XML to define Widgets and the objects that make them up.
This makes a clear hierarchy for what each object is, and the order it’s drawn in
as well as associating the correct attributes with each object.
A very simple Widget might look like this:
<widget>
<debug>on</debug>
<window title="Sample Konfabulator Widget">
<name>main_window</name>
<width>500</width>
<height>500</height>
</window>
<image src="Images/Sun.png" name="sun1">
<hOffset>250</hOffset>
<vOffset>250</vOffset>
<alignment>center</alignment>
</image>
<text data="Click Here" size="36" style="bold">
<name>text1</name>
<hOffset>250</hOffset>
<vOffset>100</vOffset>
<alignment>center</alignment>
<onMouseUp>
sun1.opacity = (sun1.opacity / 100) * 90;
</onMouseUp>
</text>
</widget>
All it does is reduce the opacity of an image by 10% every time the user clicks on
the text that says "Click Here". Obviously this isn’t terrifically useful but we’ll
use this simplified example to illustrate a few points. This sample depends on
Konfabulator Reference | 3
one external file, Images/Sun.png if you run it without that it will display a
"missing image" placeholder.
Firstly, note the structure of the Widget: XML is a symmetrical language in that
each object specifier (e.g. <text>) has a corresponding terminator (</text>).
Within these pairs the attributes of the objects are defined such as screen
positions, alignments, etc. Also note that objects defined in XML (like sun1) can
be manipulated in JavaScript (see the onMouseDown handler in the text1
object).
Real Widgets can have dozens of images and text objects, multiple JavaScript
sections (often in external files) and will usually create new objects at runtime
using JavaScript to implement complex functionality. These are packaged
together in a Mac OS X bundle which is a directory that is treated as a single unit
by the operating system. A .widget bundle has the following str…
Showing first 3,000 characters of 153,122 total. Open the full document →