| 1 |
<?xml version="1.0"?> |
| 2 |
|
| 3 |
<PropertyList> |
| 4 |
|
| 5 |
<name>highlighting</name> |
| 6 |
<layout>vbox</layout> |
| 7 |
<resizable>true</resizable> |
| 8 |
<default-padding>6</default-padding> |
| 9 |
|
| 10 |
|
| 11 |
<group> |
| 12 |
<layout>hbox</layout> |
| 13 |
<default-padding>1</default-padding> |
| 14 |
|
| 15 |
<text> |
| 16 |
<label>Highlighting</label> |
| 17 |
</text> |
| 18 |
|
| 19 |
<empty><stretch>1</stretch></empty> |
| 20 |
|
| 21 |
<button> |
| 22 |
<legend>X</legend> |
| 23 |
<key>Esc</key> |
| 24 |
<pref-width>20</pref-width> |
| 25 |
<pref-height>20</pref-height> |
| 26 |
<binding> |
| 27 |
<command>dialog-close</command> |
| 28 |
</binding> |
| 29 |
</button> |
| 30 |
</group> |
| 31 |
|
| 32 |
<hrule/> |
| 33 |
|
| 34 |
|
| 35 |
<checkbox> |
| 36 |
<row>0</row> |
| 37 |
<col>0</col> |
| 38 |
<property>sim/highlighting/enabled</property> |
| 39 |
<label>Enable highlighting</label> |
| 40 |
<binding> |
| 41 |
<command>dialog-apply</command> |
| 42 |
</binding> |
| 43 |
</checkbox> |
| 44 |
|
| 45 |
<hrule/> |
| 46 |
|
| 47 |
|
| 48 |
<property-list> |
| 49 |
<name>property-list</name> |
| 50 |
<pref-height>200</pref-height> |
| 51 |
<pref-width>200</pref-width> |
| 52 |
<halign>fill</halign> |
| 53 |
<valign>fill</valign> |
| 54 |
<stretch>true</stretch> |
| 55 |
<property>/sim/highlighting/current-ptr</property> |
| 56 |
<readonly>true</readonly> |
| 57 |
<binding> |
| 58 |
<command>dialog-apply</command> |
| 59 |
<object-name>property-list</object-name> |
| 60 |
</binding> |
| 61 |
</property-list> |
| 62 |
|
| 63 |
<nasal> |
| 64 |
<open> |
| 65 |
printf("open"); |
| 66 |
var self = cmdarg(); |
| 67 |
var dlgname = self.getNode("name").getValue(); |
| 68 |
var dlg = props.globals.getNode("/sim/gui/dialogs/" ~ dlgname, 1); |
| 69 |
var update_interval = 0.5; |
| 70 |
|
| 71 |
var update = func(w) { |
| 72 |
self.setValues({ "dialog-name": dlgname, "object-name": w }); |
| 73 |
fgcommand("dialog-update", self); |
| 74 |
} |
| 75 |
var auto_update = func { |
| 76 |
update("property-list"); |
| 77 |
if (update_interval) |
| 78 |
settimer(auto_update, update_interval, 1); |
| 79 |
} |
| 80 |
auto_update(); |
| 81 |
</open> |
| 82 |
<close> |
| 83 |
update_interval = 0; |
| 84 |
</close> |
| 85 |
</nasal> |
| 86 |
|
| 87 |
</PropertyList> |