Some features will not be generally available until the release of Kahuna 4.5.
Use of these features with Kahuna 4.13 requires installing a
patch available on The Collective.
<?xml version="1.0"?> <!DOCTYPE dialog SYSTEM "http://collective.cv.hp.com/kahuna/official/dialog.dtd/current/dialog.dtd">
Dialog elements can contain any number of layout devices
The dialog element
The root element of a dialog definition document is the dialog element.
In addition, every dialog must have an okButton, and may have an optional cancelButton, stopButton, and helpButton.
<!ELEMENT dialog ((box | strut | spring | label | image | text | password | textArea | resourceAddress | webBrowser | check | radio | combo)*, okButton, cancelButton?, stopButton?, helpButton?)>
<!ATTLIST dialog
title CDATA #IMPLIED
type (box1) "box1"
>
Example:
All attributes are optional.<dialog type="box1" title="Introduce Yourself"> <label>Please enter your name:</label> <text onCloseStore="userName"/> <okButton/> </dialog>
A box can contain any number of other boxes, struts, springs, and input widgets.
<!ELEMENT box ((box | strut | spring | label | image | text | password | textArea | resourceAddress | webBrowser | check | radio | combo)*)>
<!ATTLIST box
direction (vertical|horizontal) #REQUIRED
scrolls (true|false) "false"
forEach CDATA #IMPLIED
>
Example:
<box direction="horizontal">
<label>Name:</label>
<strut size="6"/>
<text onCloseStore="name"/>
</box>
Every box must specify its direction. Other attributes are optional.
<!ELEMENT strut EMPTY>
<!ATTLIST strut
size CDATA #REQUIRED
>
Example:
Every strut must specify its size.<label>Name:</label> <strut size="6"/> <text onCloseStore="name"/>
<!ELEMENT spring EMPTY>Example. To force a label object to the right side of a layout:
<box direction="horizontal">
<spring/>
<label>Why me?</label>
</box>
<!ELEMENT label (#PCDATA)>
<!ATTLIST label
onLoadRecall CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
>
Example:
All attributes are optional.<label>User name:</label> <strut size="6"/> <label onLoadRecall="userName"/>
This feature will not be generally available until the release of Kahuna 4.5.
Use of this feature with Kahuna 4.13 requires installing a
patch available on The Collective.
<!ELEMENT image EMPTY>
<!ATTLIST image
source CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
>
Example:
All attributes are optional.<image source="pic_data.jpg" />
<!ELEMENT text (#PCDATA)>
<!ATTLIST text
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
validatePattern CDATA #IMPLIED
>
Example:
Attributes:<label>Pixels:</label> <text onLoadRecall="pixels" onCloseStore="pixels"/> <label>Names:</label> <text onCloseStore="pixBoys">Manny, Moe, and Jack</text>
<!ELEMENT password (#PCDATA)>
<!ATTLIST password
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
validatePattern CDATA #IMPLIED
>
Example:
Attributes:<label>Name:</label> <text onCloseStore="userName"/> <label>Password:</label> <password onLoadRecall="password" onCloseStore="password"/>
<!ELEMENT textArea (#PCDATA)>
<!ATTLIST textArea
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
validatePattern CDATA #IMPLIED
>
Example:
Attributes:<label>Comments:</label> <textArea onCloseStore="comments"/> <label>Name:</label> <textArea onLoadRecall="name" onCloseStore="name"/> <label>Address:</label> <textArea onCloseStore="address">wstt@cv.hp.com</textArea>
This feature will not be generally available until the release of Kahuna 4.5.
Use of this feature with Kahuna 4.13 requires installing a
patch available on The Collective.
The resourceAddress element may contain any number of resourceType elements, which specify resource name filters for the Resouce Chooser.The first filter specified will be selected by default.
<!ELEMENT resourceAddress (resourceType*)>
<!ATTLIST resourceAddress
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
validatePattern CDATA #IMPLIED
>
Example:
<resourceAddress width="200" onCloseStore="picAddress">
<resourceType>Graphic Files (*.jpg, *.gif)
<resourceNamePattern>/^.*\.jpg$/</resourceNamePattern>
<resourceNamePattern>/^.*\.gif$/</resourceNamePattern>
</resourceType>
</resourceAddress>
Attributes:
This feature will not be generally available until the release of Kahuna 4.5.
Use of this feature with Kahuna 4.13 requires installing a
patch available on The Collective.
Resource types specify resource name filters which appear in a drop down list in the Resouce Chooser.
The resourceType element must contain one or more resourceNamePattern elements, which specify regular expressions for resource name matching. Only resources matching one of the specified patterns will appear in the Resource Chooser's list.
<!ELEMENT resourceType (#PCDATA | resourceNamePattern)*>Example:
<resourceType>Graphic Files (*.jpg, *.gif) <resourceNamePattern>/^.*\.jpg$/</resourceNamePattern> <resourceNamePattern>/^.*\.gif$/</resourceNamePattern> </resourceType>
This feature will not be generally available until the release of Kahuna 4.5.
Use of this feature with Kahuna 4.13 requires installing a
patch available on The Collective.
The pattern specifies a regular expression for resource name matching.
<!ELEMENT resourceNamePattern (#PCDATA)>Example:
<resourceNamePattern>/^.*\.jpg$/</resourceNamePattern>
This feature will not be generally available until the release of Kahuna 4.5.
Use of this feature with Kahuna 4.13 requires installing a
patch available on The Collective.
WebBrowser elements present a panel of widgets comprising a very basic web browser.
At the top is a navigation bar containing Back, Forward, and Home buttons, and a text field for entering web addresses. At the bottom is a status bar. The browser can hide the navigation and status bars, and make the address field read-only.
The browser may specify a starting address statically or load it dynamically using the loadUrlFrom attribute. The browser may also specify a home address statically or load it dynamically using the loadHomeUrlFrom attribute.
<!ELEMENT webBrowser (#PCDATA)>
<!ATTLIST webBrowser
loadUrlFrom CDATA #IMPLIED
homeUrl CDATA #IMPLIED
loadHomeUrlFrom CDATA #IMPLIED
showNavBar (true|false) "true"
showStatusBar (true|false) "true"
editAddress (true|false) "true"
width CDATA #IMPLIED
height CDATA #IMPLIED
>
Example:
<dialog type="box1" title="Surf's Up!">
<webBrowser>http://hpcvitws.cv.hp.com/kahuna/xmldialog/</webBrowser>
<okButton/>
</dialog>
All attributes are optional:
A check box may specify its initial state statically using the selected attribute, or load it dynamically using the onLoadRecall attribute. A check box which loads its state dynamically using the onLoadRecall attribute may further specify a regular expression using the selectedPattern attribute. Data which matches the pattern results in an initially checked check box.
Every check box should have a label. A check box may specify its label text statically or load it dynamically using the loadLabelFrom attribute.
<!ELEMENT check (#PCDATA)>
<!ATTLIST check
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
loadLabelFrom CDATA #IMPLIED
selectedPattern CDATA #IMPLIED
selectedValue CDATA "true"
unSelectedValue CDATA "false"
selected (true|false) "false"
>
Example:
Attributes:<check onCloseStore="doCleanup">Clean up afterwards</check> <check loadLabelFrom="option_name_one" onLoadRecall="option_one" onCloseStore="option_one"/> <check onLoadRecall="is_too" selectedPattern="/[^n]*/i">Is too.</check> <check onCloseStore="close" selectedValue="yes" unSelectedValue="no">Close files?</check>
Like check boxes, radio buttons have only two states, selected and unselected. The default selectedValue is "true" and the default unSelectedValue is "false".
A radio button may specify its initial state statically using the selected attribute, or load it dynamically using the onLoadRecall attribute. A radio button which loads its state dynamically using the onLoadRecall attribute may further specify a regular expression using the selectedPattern attribute. Data which matches the pattern results in an initially selected radio button.
Every radio button should have a label. A radio button may specify its label text statically or load it dynamically using the loadLabelFrom attribute.
<!ELEMENT radio (#PCDATA)>
<!ATTLIST radio
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
loadLabelFrom CDATA #IMPLIED
buttonGroup CDATA #IMPLIED
selectedPattern CDATA #IMPLIED
selectedValue CDATA "true"
unSelectedValue CDATA "false"
selected (true|false) "false"
>
Example:
Attributes:<label>Please make a decision:</label> <radio selectedValue="yes" onCloseStore="decision" buttonGroup="dec_one" selected="true">Yes</radio> <radio selectedValue="no" onCloseStore="decision" buttonGroup="dec_one">No</radio> <radio selectedValue="maybe" onCloseStore="decision" buttonGroup="dec_one">Maybe</radio> <label>Please vote for the lesser of four evils:</label> <radio onCloseStore="algo" buttonGroup="evils" selectedValue="1" unSelectedValue="1">Al</radio> <radio onCloseStore="junior" buttonGroup="evils" selectedValue="1" unSelectedValue="0">W.</radio> <radio onCloseStore="waldo" buttonGroup="evils" selectedValue="1" unSelectedValue="0">Ralph</radio> <radio onCloseStore="peanut" buttonGroup="evils" selectedValue="1" unSelectedValue="0">Harry</radio>
If the combo box is editable, it's more like a text field. Items in the drop-down list merely represent "canned" choices. The user can select one of them or type in anything at all. The data type of an editable combo box is plain old text.
If the combo box is not editable, then the items it the list behave more like a group of radio buttons, only one of which can be selected at any time. List items, in fact, share many of the same attributes and characteristics of radio buttons.
The combo element may contain any number of item elements.
<!ELEMENT combo (item*)>
<!ATTLIST combo
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
editable (true|false) "false"
validatePattern CDATA #IMPLIED
>
Example:
Attributes:<label>So, whaddya think?</label> <combo editable="true" onCloseStore="my_opinion" validatePattern="/.+/"> <item>I dunno</item> <item>We'd better not</item> <item>What?</item> </combo> <label>What did you notice first?</label> <combo> <item onCloseStore="first" selectedValue="flash">Brilliant flash of light</item> <item onCloseStore="first" selectedValue="boom">Loud boom</item> <item onCloseStore="first" selectedValue="heat">Intense heat</item> <item onCloseStore="first" selectedValue="smudge">Poor print quality</item> </combo>
If the combo box is editable, list items merely represent "canned" choices, and most of the list item's attributes are irrelevant.
If the combo box is not editable, list items are more like radio buttons, and share many of the same attributes and characteristics.
<!ELEMENT item (#PCDATA)>
<!ATTLIST item
onLoadRecall CDATA #IMPLIED
onCloseStore CDATA #IMPLIED
loadLabelFrom CDATA #IMPLIED
selectedPattern CDATA #IMPLIED
selectedValue CDATA "true"
unSelectedValue CDATA "false"
selected (true|false) "false"
>
Example:
Attributes:<combo> <item onCloseStore="top" selected="true">top</item> <item onCloseStore="left" >left</item> <item onCloseStore="bottom" >bottom</item> <item onCloseStore="right" >right</item> </combo> <combo> <item onCloseStore="sel_opt" loadLabelFrom="opt_1" selectedValue="1" selected="true"/> <item onCloseStore="sel_opt" loadLabelFrom="opt_2" selectedValue="2"/> <item onCloseStore="sel_opt" loadLabelFrom="opt_3" selectedValue="3"/> </combo>
This feature will not be generally available until the release of Kahuna 4.5.
Use of this feature with Kahuna 4.13 requires installing a
patch available on The Collective.
<!ELEMENT closeAfter EMPTY>
<!ATTLIST closeAfter
seconds CDATA #IMPLIED
onLoadRecall CDATA #IMPLIED
>
Example:
<dialog type="box1" title="Interrogation">
<box direction="horizontal">
<label>What is your name?</label>
<strut size="5" />
<text width="100">Who's asking?</text>
</box>
<closeAfter seconds="10" />
<okButton/>
</dialog>
Attributes:
seconds="0" (or less) will
leave the dialog open until the user dismisses it.
<!ELEMENT okButton EMPTY>Example:
<dialog type="box1" title="Unexpected Error"> <label onLoadRecall="err_msg"/> <label>Bummer.</label> <okButton/> </dialog>
<!ELEMENT cancelButton EMPTY>Example:
<dialog type="box1" title="Run Test"> <label>Please enter the test name:</label> <text onCloseStore="testName"/> <okButton/> <cancelButton/> </dialog>
<!ELEMENT stopButton EMPTY>Example:
<dialog type="box1" title="Run Test"> <label>Please enter the test name:</label> <text onCloseStore="testName"/> <okButton/> <cancelButton/> <stopButton/> </dialog>
This feature will not be generally available until the release of Kahuna 4.5.
Use of this feature with Kahuna 4.13 requires installing a
patch available on The Collective.
<!ELEMENT helpButton EMPTY>
<!ATTLIST helpButton
source CDATA #REQUIRED
>
Example:
The source attribute is required:<dialog type="box1" title="Run Test"> <label>Please enter the test name:</label> <text onCloseStore="testName"/> <okButton/> <helpButton source="http://hpcvitws.cv.hp.com/kahuna/" /> </dialog>
source="file:///C:/kahuna/help.html".