| genre | Fields |
| status | stable |
| author | Tobias Boskamp |
| package | MeVisLab/Standard |
| dll | MLBase |
| definition | MLBase.def |
| see also | XMarkerListContainer |
| keywords | String, list, container, ListBase |
This module StringListContainer stores a list of strings as a ml::StringList object and makes it available at its outStringList field. The contents of this string list can be displayed, edited and saved in a persistent state.
The StringListContainer controls either an internal ml::StringList StringList object or an external object connected at the inStringList field.
If an external StringList is connected, the StringListContainer acts as an inspector for the external object, i.e. it displays the contents of the external string list and the internal list object is hidden.
If the inStringList field is unconnected, the internal list object is visible. If the inStringList field is connected to an object which is no StringList, all display and edit functions are disabled.
A ml::StringList object contains a number of string list elements, each of which consists of a string and an id number. The id of a string list element is unique within a list and is left unchanged even if list elements are inserted or deleted. The id can hence be used as a reference to a list element.
In addition to the string list elements, a string list contains a description of the last action performed on the list (cf the description of the Action parameter fields below). This can be used by modules attached to a StringList object to synchronize themselves with operations performed on the list by some other module.
The StringList class is related to other list classes (e.g. ml::XMarkerList) in the sense that its properties (action) and the properties of string elements (string and id) are also part of other list objects and elements. In the context of other list classes, the string is typically used as a name property. As a consequence, the functionality of the StringListContainer module can also be found in other list container modules (e.g. XMarkerListContainer).
| Action: String | Id: Integer | Owner: Bool |
| Add: Trigger | Index: Integer | Persistent: Bool |
| Clear: Trigger | Insert: Trigger | Select: Bool |
| Copy from Item: Trigger | Item ID: Integer | String (name): String |
| Copy to Item: Trigger | Item Index: Integer | String (newName): String |
| Current: Integer | List Size: Integer | Up To Date: Bool |
| Delete: Trigger | List String: String | Update: Trigger |
| Delete All: Trigger | Max. Size: Integer | Use Template for Add/Insert: Bool |
| Enable: Bool | Overflow Mode: Enum |
Shows the contents of the list in the same format that is used for persistent storage.
The List String field is only active if the Enable checkbox next to it is checked. Since keeping the List String up to date may be expensive, it is best to disable this field if it is not needed. The List String field is updated automatically, but the Update button can be used to force an update.
Shows the index of the current list item (counting from zero).
If checked, the contents of the list are stored and restored with the network.
If checked, the field List String is active.
Shows whether the module displays and controls the internal list object (field checked) or an external object (field unchecked).
If checked, changing the Item Index results in a Select action on the list and other modules connected to this string list object are notified.
Shows the type of the last action performed on the list. Possible entries are:
Shows the index of the item to which the last action refers. The value -1 means no item.
Shows the id of the item to which the last action refers. The value -1 means no item.
Shows the index of the currently selected item, or -1 if no item is selected.
Defines the behavior if the maximum size is reached and a new item is going to be inserted.
Values:
| Title | Name | Description |
|---|---|---|
| None | None | List size is unrestricted. |
| Remove First | RemoveFirst | First list item is removed. |
| Remove Last | RemoveLast | Last list item is removed. |
| Remove All | RemoveAll | All list items are removed. |
Sets the maximum number of list items in conjunction with the Overflow Mode setting.
If pressed, the module's fields are updated to the state of an attached StringListContainer.
If checked, an added or inserted item is initialized with the values of the template fields.
If pressed, the properties of the current item are copied to the template fields.
If pressed, the properties of the template fields are copied to the current item while triggering only one Up To Date notification.