User:Callek/Prefwindow API Variants: Difference between revisions

(Add Mnyromyr's)
Line 60: Line 60:
=== Example Use ===
=== Example Use ===


In Mnyromyr's implementation, he adds <code><preftree></code> and <code><preftreeitem></code> elements. Which serve the purpose of defining the structure of the tree.  The <code>preftreeitem</code>'s themselves ''point'' to the pane via the pane's id in a <code>prefpane</code> attribute. The <code><preftreeitem></code> element will look first on itself for a <code>label</code> attribute to use as the treeitem's label; if there is no <code>label</code> set on itself, it will look on the referenced <code><prefpane></code> element for a label.
In Mnyromyr's implementation, he adds <code><preftree></code> and <code><preftreeitem></code> elements which serve the purpose of defining the hierarchical structure of the tree.  The <code><preftreeitem></code>'s themselves ''point'' to the pane via the pane's id in a <code>prefpane</code> attribute. The <code><preftreeitem></code> element will look first on itself for a <code>label</code> attribute to use as the treeitem's label; if there is no <code>label</code> set on itself, it will look on the referenced <code><prefpane></code> element for a label.


In the absense of a <code><preftree></code> element all panes will be listed as top-level panes.  While if <code><preftree></code> is present, and <code><prefpane></code>'s not referenced by <code><preftreeitem></code>'s will effectively be innaccessible.
If no <code><preftree></code> element is given, all panes will be listed as top-level panes; if a <code><preftree></code> is present, only those panes are accessible that are referenced by a <code><preftreeitem></code>!


<pre>
<pre>
235

edits