Changes between Version 93 and Version 94 of TaggingPresets


Ignore:
Timestamp:
2014-11-07T15:48:27+01:00 (11 years ago)
Author:
Klumbumbus
Comment:

joined "combo"

Legend:

Unmodified
Added
Removed
Modified
  • TaggingPresets

    v93 v94  
    9090   A text edit field to enter any arbitrary string from the user. ''key'' is mandatory, ''text'', ''default'', ''use_last_as_default'', ''auto_increment'', ''length'', ''alternative_autocomplete_keys'' and ''match'' is optional
    9191 '''<combo>'''::
    92    Displays a multiple choice combo box. ''key'' and ''values'' are mandatory and ''text'', ''default'', ''editable'' and ''match'' is optional.
     92   Displays a multiple choice combo box. ''key'' and ''values'' are mandatory, ''text'', ''default'', ''editable'', ''delimiter'', ''values_from'', ''display_values'', ''schort_descriptions'', ''use_last_as_default'', ''values_searchable'', ''length'' and ''match'' is optional.
    9393   If editable is true (default), combo boxes can be edited as if they were text fields (additional to the drop down menu). Non editable
    9494   combo boxes can only contain one of the specified values.
     
    114114   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.
    115115 '''icon_size="a number"'''::
    116    The maximal size of an icon in px. If no value is given, default is 16 for <label>.
     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>.
    117117 '''key="some_key"'''::
    118118   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.
     
    122122   Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
    123123 '''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> 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> and <combo> defaults to "".
    125125 '''values="entry1,entry2,entry3"'''::
    126126   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 '''values_from="JAVA code"'''::
     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".
    127129 '''values_context="context"'''::
    128130   Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
    129131 '''display_values="Entry1,Entry2,Entry3"'''::
    130    A list of entries that is displayed to the user. Must be the same number 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''.
    131133 '''value="foobar"'''::
    132134   Specify a value to be entered in the <key> tag.
     
    138140   Whether the off value of a <check> is disabled in the dialog, i.e., only unset or yes are provided.
    139141 '''editable="false"'''::
    140    The combo box is readonly, which means that the user can only select an item in the list.
     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.
    141143 '''use_last_as_default="true|false|force"'''::
    142    For combo boxes or 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> boxes or <text> fields the last value is used as default. Using "force" enforces this behaviour also for already tagged objects. Default is "false".
    143145 '''rows="count"'''::
    144146   Specify the number of rows in multiselect entry.
     
    170172   Whether to insert "[preset name]" label in dialog (defaults to "false" for backward-compatibility on external presets).
    171173 '''length="a number"'''::
    172    The length of a <text> box (number of characters allowed).
     174   The length of a <text> or <combo> box (number of characters allowed).
    173175 '''alternative_autocomplete_keys="some_key(s)"'''::
    174176   A comma separated list of alternative keys to use for autocompletion of <text>.
    175177 '''auto_increment="-2,-1,+1,+2"'''::
    176178   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 '''delimiter="special character"'''::
     180   The character that separates values (in case of <combo>: default: comma)
     181 '''short_descriptions=""Entry1,Entry2,Entry3"'''::
     182   A comma 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 '''values_searchable="true|false"'''::
     184   Whether to search in <combo> (display_)values when searching for presets.
     185
     186
    177187
    178188== Format description from XML document (needs to be joined with above texts) ==
     
    180190
    181191{{{
    182 
    183 combo: combo box, with multiple choices and possible to enter free form text
    184   key: key to set
    185   text: fixed label to display
    186   delimiter: character that separates values (default: comma)
    187   values: separated list of values
    188   values_from: to use instead of "values" if the list of values has to be obtained with a Java method
    189                of this form: public static String[] getValues();
    190                The value must be: "full.package.name.ClassName#methodName"
    191   display_values: comma separated list of values to be displayed instead of the
    192                   database values, order and number must be equal to values
    193   short_descriptions: comma separated list of texts to be displayed below each
    194                       display_value. (Only if it is not possible to describe
    195                       the entry in 2-3 words.) Instead of comma separated list
    196   instead using values, display_values and short_descriptions, the following form is also supported:
    197     <list_entry value="" display_value="" short_description="" icon="" icon_size="" />
    198         icon: location of icon
    199         icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
    200   default: default string to display (defaults to "")
    201   use_last_as_default: true/false/force (default is "false")
    202   editable: allow to add other values as text (default is "true")
    203   values_searchable: true/false (whether to search in combo (display_)values when searching for presets)
    204   length: length of input box (number of characters allowed)
    205192
    206193multiselect: list of values from which zero or more can be selected