Hi!
Die Idee "
XML" ist schon mal nicht schlecht.
Die Yahoo Widget Engine bzw. der Konfabulator nutzen eine
XML-Struktur um ihre Daten zu speichern. Hier ein Ausschnitt aus dem Widget "Yahoo Weather":
XML-Code:
<prefGroup>
<name>fontPanel</name>
<title>Fonts</title>
<icon>Resources/UI/Fonts.png</icon>
<order>3</order>
</prefGroup>
<prefGroup>
<name>colorPanel</name>
<title>Colors</title>
<icon>Resources/UI/Colors.png</icon>
<order>2</order>
</prefGroup>
<preference name="backgroundType">
<title>Use Background:</title>
<group>colorPanel</group>
<type>popup</type>
<defaultValue>Dark Glass</defaultValue>
<option>Colorized</option>
<option>Dark Glass</option>
<option>(-</option>
<option>None</option>
<description>This lets you choose how the background of your weather looks. If you choose Colorized, please visit the Colors panel to adjust the color to your preference.</description>
</preference>
<preference name="dayColor">
<title>Day Background:</title>
<group>colorPanel</group>
<type>Color</type>
<defaultValue>#6592b1</defaultValue>
<description>During the day this is the color that the Widget's background will display in.</description>
</preference>
<preference name="userDayFontShadow">
<title>Adornment Is:</title>
<group>fontPanel</group>
<type>popup</type>
<option>Normal Shadow Below Text</option>
<option>Black Bevel Above Text</option>
<option>White Bevel Below Text</option>
<option>(-</option>
<option>None</option>
<defaultValue>Normal Shadow Below Text</defaultValue>
<description>Choose how or if you want an extra adornment to give your text during the day more character.</description>
</preference>
<preference name="userDisplayPref">
<title>Location:</title>
<type>text</type>
<defaultValue>Palo Alto, California</defaultValue>
<description>You can enter a US zip code, your City, State, or City, Country.</description>
<hidden>true</hidden>
</preference>
<preference name="displayNameStatePref">
<title>Use Display Name</title>
<type>checkbox</type>
<defaultValue>0</defaultValue>
<description>Check this box if you would like to use the name below as an alternative to the city name.</description>
</preference>
<preference name="displayNamePref">
<title>Display Name:</title>
<type>text</type>
<defaultValue></defaultValue>
<description>If you would like to use a name other than what the Widget fetches, enter it here.</description>
</preference>
<preference name="unitsPref">
<title>Use Metric Units</title>
<type>checkbox</type>
<defaultValue>0</defaultValue>
<description>Check this box if you would like your weather displayed in degrees Celsius rather than degrees Fahrenheit.</description>
</preference>
<preference name="showToolTips">
<title>Show Tooltips</title>
<type>checkbox</type>
<defaultValue>1</defaultValue>
<description>Check this box if you would like additional information when hovering over the weather icons.</description>
</preference>
<preference name="cityValuePref">
<hidden>true</hidden>
<type>text</type>
<defaultValue></defaultValue>
</preference>
Diese Struktur lässt nur eine einfache Struktuierung zu; d.h. das eine Gruppe, keine weiteren Gruppen enthalten kann. Das kannst du und würde ich ändern. Jede Gruppe die ein Plugin anlegt, könntest du in deinem TreeView als Node verewigen.