Changes between Version 94 and Version 95 of TaggingPresets
- Timestamp:
- 2014-11-07T16:59:30+01:00 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TaggingPresets
v94 v95 94 94 combo boxes can only contain one of the specified values. 95 95 '''<multiselect>''':: 96 Displays a list from which zero or more items can be chosen. ''key'' and ''values'' are mandatory, and ''text'', ''default'', ''delimiter'' and ''match'' are optional. The selected values will be concatenated with the specified delimiter (default: semicolon) and written to the tag value. If a tag value has already been set when the preset dialog is opened, the multiselect will attempt to mark the appropriate items in the list as select. If the tag value cannot be represented by a combination of choices in the list, then the list will be disabled so that the user cannot accidentally overwrite a custom value. In contrast to the "combo" element, the "multiselect" expects the list of values, descriptions etc. to use the specified delimiter, i.e. by default you will have to use a semicolon. You can specify delimiter="," but then a comma will also be used in the tag value. 96 Displays a list from which zero or more items can be chosen. ''key'' and ''values'' are mandatory, and ''text'', ''default'', ''delimiter'', ''values_from'', ''rows'', ''display_values'', ''short_descriptions'', ''use_last_as_default'', ''values_searchable'' and ''match'' are optional. The selected values will be concatenated with the specified delimiter (default: semicolon) and written to the tag value. If a tag value has already been set when the preset dialog is opened, the multiselect will attempt to mark the appropriate items in the list as select. If the tag value cannot be represented by a combination of choices in the list, then the list will be disabled so that the user cannot accidentally overwrite a custom value. In contrast to the "combo" element, the "multiselect" expects the list of values, descriptions etc. to use the specified delimiter, i.e. by default you will have to use a semicolon. You can specify delimiter="," but then a comma will also be used in the tag value. 97 97 '''<check>''':: 98 98 A checkbox which the user can only select or deselect (or set as unset). The ''key'' attribute is mandatory. ''text'', ''default'', ''match'', ''value_on'' , ''value_off'' and ''disable_off'' are optional. … … 114 114 A name or link to an icon. The image will be used as icon to display in the selection list and when adding the preset to the toolbar. The icon should be quadratic in size. See [[Styles#Iconhandling]] how icons can be specified. 115 115 '''icon_size="a number"''':: 116 The maximal size of an icon in px. If no value is given, default is 16 for <label> and the default icon size for <list_entry >.116 The maximal size of an icon in px. If no value is given, default is 16 for <label> and the default icon size for <list_entry /> (in <combo> and <multiselect>). 117 117 '''key="some_key"''':: 118 118 This specifies the property key that will be modified by the item. In case of <role> it is the role name used in a relation. … … 122 122 Translation context for text attribute to separate equals words with different meaning (not required for in-file translations). 123 123 '''default="default_value"''':: 124 The default value for the item. If not specified, the current value of the key is chosen as default (if applicable). In case of <check> whether the checkbox is ticked on or off by default (default is "off"). In case of <text> and<combo> defaults to "".124 The default value for the item. If not specified, the current value of the key is chosen as default (if applicable). In case of <check> whether the checkbox is ticked on or off by default (default is "off"). In case of <text>, <combo> and <multiselct> defaults to "". 125 125 '''values="entry1,entry2,entry3"''':: 126 A list of entries (for the combobox andmultiselect). The list has to be separated by commas (for the combo box) or by the specified delimiter (for the multiselect). If a value contains the delimiter, the delimiter may be escaped with a backslash. If a value contains a backslash, it must also be escaped with a backslash.126 A list of entries (for the <combo> box and <multiselect>). The list has to be separated by commas (for the combo box) or by the specified delimiter (for the multiselect). If a value contains the delimiter, the delimiter may be escaped with a backslash. If a value contains a backslash, it must also be escaped with a backslash. 127 127 '''values_from="JAVA code"''':: 128 128 To use instead of "values" if the list of values has to be obtained with a Java method of this form: public static String[] getValues(); The value must be: "full.package.name.ClassName#methodName". … … 130 130 Translation context for name attribute to separate equals words with different meaning (not required for in-file translations). 131 131 '''display_values="Entry1,Entry2,Entry3"''':: 132 A list of entries that is displayed to the user. Must be the same number and order of entries as values and ''editable'' must be false or not specified. For the delimiter character and escaping, see the remarks at ''values''. 132 A list of entries that is displayed to the user. Must be the same number and order of entries as values and ''editable'' must be false or not specified. For the delimiter character and escaping, see the remarks at ''values''. Used in <combo> and <multiselect>. 133 133 '''value="foobar"''':: 134 134 Specify a value to be entered in the <key> tag. … … 142 142 The combo box is readonly, which means that the user can only select an item in the list. Default is "true", which means, the user can add other values as text. 143 143 '''use_last_as_default="true|false|force"''':: 144 For <combo> boxesor <text> fields the last value is used as default. Using "force" enforces this behaviour also for already tagged objects. Default is "false".144 For <combo>, <multiselect> or <text> fields the last value is used as default. Using "force" enforces this behaviour also for already tagged objects. Default is "false". 145 145 '''rows="count"''':: 146 Specify the number of rows inmultiselectentry.146 Specify the number of rows to display in <multiselect> entry (default -1). 147 147 '''name_template="template", name_template_filter="search expression"''':: 148 148 Custom name formatter for osm primitives matching this preset. See [[NameTemplate]] for details. … … 178 178 May contain a comma separated list of integer increments or decrements, e.g. "-2,-1,+1,+2". A button will be shown next to the <text> field for each value, allowing the user to select auto-increment with the given stepping. Auto-increment only happens if the user selects it. There is also a button to deselect auto-increment. Default is no auto-increment. Mutually exclusive with ''use_last_as_default''. 179 179 '''delimiter="special character"''':: 180 The character that separates values (in case of <combo>: default: comma)180 The character that separates values. In case of <combo> the default is comma. In case of <multiselect> the default is semicolon and this will also be used to separate selected values in the tag. More information see <multiselect>. 181 181 '''short_descriptions=""Entry1,Entry2,Entry3"''':: 182 A commaseparated list of texts to be displayed below each ''display_value''. (Only if it is not possible to describe the entry in 2-3 words.) Instead of comma separated list instead using values, display_values and short_descriptions, the following form is also supported: <list_entry value="" display_value="" short_description="" icon="" icon_size="" />182 A delimiter-separated list of texts to be displayed below each ''display_value''. (Only if it is not possible to describe the entry in 2-3 words.) Instead of comma separated list instead using values, display_values and short_descriptions, the following form is also supported: <list_entry value="" display_value="" short_description="" icon="" icon_size="" /> 183 183 '''values_searchable="true|false"''':: 184 Whether to search in <combo> (display_)values when searching for presets. 184 Whether to search in <combo> or <multiselect> (display_)values when searching for presets. 185 185 186 187 188 == Format description from XML document (needs to be joined with above texts) ==189 (delete here the parts which you have joined with above texts)190 191 {{{192 193 multiselect: list of values from which zero or more can be selected194 key: key to set195 text: fixed label to display196 delimiter: character that separates values (default: semicolon) - this197 will also be used to separate selected values in the tag.198 values: delimiter-separated list of values (delimiter can be escaped with backslash)199 values_from: to use instead of "values" if the list of values has to be obtained with a Java method200 of this form: public static String[] getValues();201 The value must be: "full.package.name.ClassName#methodName"202 rows: specify the number of rows to display (default -1)203 display_values: delimiter-separated list of values to be displayed instead of the204 database values, order and number must be equal to values205 short_descriptions: delimiter-separated list of texts to be displayed below each206 display_value. (Only if it is not possible to describe207 the entry in 2-3 words.) Instead of a separated list208 instead using values, display_values and short_descriptions, the following form is also supported:209 <list_entry value="" display_value="' short_description="" icon="" icon_size="" />210 icon: location of icon211 icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file212 default: default string to display (defaults to "")213 use_last_as_default: true/false/force (default is "false")214 values_searchable: true/false (whether to search in multiselect (display_)values when searching for presets)215 216 }}}217 186 218 187 == Translation ==
