;ň ýőCc@s”dZdklZdkZdkZdklZlZdklZl Z d„Z dfd„ƒYZ de fd „ƒYZ d fd „ƒYZ dS( sœ To use the Options system: 1. Create an OptionGroup: options = OptionGroup('MyProg', 'Options') You can also use the handy rox.setup_app_options() in most applications. 2. Create the options: colour = Option('colour', 'red', options) size = Option('size', 3, options) icons = ListOption('icons', ('circle', 'square', 'triangle'), options) 3. Register any callbacks (notification of options changing): def my_callback(): if colour.has_changed: print "The colour is now", colour.value options.add_notify(my_callback) 4. Notify any changes from defaults: options.notify() See OptionsBox for editing options. Do not change the value of options yourself. (s generatorsN(schoicessbasedir(sNodesminidomcCsOdigi}|iD]*}|itijo||i ƒqq~ƒSdS(s2Return all the text directly inside this DOM Node.sN( sjoinsappends_[1]snodes childNodesstextsnodeTypesNodes TEXT_NODEs nodeValue(snodes_[1]stext((sU/mnt/gmirror/ports/devel/py-roxlib/work/rox-lib2-2.0.5/ROX-Lib2/python/rox/options.pysdata"ssOptioncBs5tZdZed„Zd„Zd„Zd„ZRS(sAn Option stores a single value. Every option is part of exactly one OptionGroup. The read-only attributes value and int_value can be used to get the current setting for the Option. int_value will be -1 if the value is not a valid integer. The has_changed attribute is used during notify() calls to indicate whether this Option's value has changed since the last notify (or option creation). You may set has_changed = 1 right after creating an option if you want to force notification the first time even if the default is used. cCs| otipt‚ti}n||_d|_t|ƒ|_ ||_t |_t |_ t |_ |ii|ƒdS(sźCreate a new option with this name and default value. Add to 'group', or to rox.app_options if no group is given. The value cannot be used until the first notify() call to the group.iN(sgroupsroxs app_optionssAssertionErrorsnamesselfs has_changedsstrsvalues default_valuesNones int_valuesTruesstores _register(sselfsnamesvaluesgroup((sU/mnt/gmirror/ports/devel/py-roxlib/work/rox-lib2-2.0.5/ROX-Lib2/python/rox/options.pys__init__2s       cCs™|i|jo…t|ƒ|_d|_yV|idjo d|_n6|idjo d|_ntt|iƒƒ|_Wq•d|_q•XndS(NisTruesFalseii˙˙˙˙(sselfsvaluesstrs has_changeds int_valuesintsfloat(sselfsvalue((sU/mnt/gmirror/ports/devel/py-roxlib/work/rox-lib2-2.0.5/ROX-Lib2/python/rox/options.pys_setDs   cCsU|i}|idƒ}|id|iƒ|i|i |i ƒƒ|i|ƒdS(NsOptionsname( sparents ownerDocumentsdocs createElementsnodes setAttributesselfsnames appendChildscreateTextNodesvalue(sselfsparentsnodesdoc((sU/mnt/gmirror/ports/devel/py-roxlib/work/rox-lib2-2.0.5/ROX-Lib2/python/rox/options.pys_to_xmlRs  cCsd|i|ifSdS(Ns