Text widget based listitem display
Not logged in

http://tkoutline.sourceforge.net/cvs/lib/outlinewidget/listitem.tcl

This functionality is an effort to extract the generic listitem based code that is independent of the tree structure. This functionality is being extracted from http://tkoutline.sourceforge.net/cvs/lib/outlinewidget/treedisplay.tcl.

The listitem display functionality consists of items and within each item, there are fields. Items are separated by newlines and fields are tab character separated.

Beyond the standard text widget indices, indices of the form item.field.first and item.field.last are allowed.

The API (TODO: examples and more details):

Inserts an item with the given itemId and the contents given by fieldList into the text widget at the given index. FieldList is a list of the form:

fieldName {text ?{tag1 tag2...}?}

extraTags is a list of the following form and is used to apply more tags to the fields:

fieldPattern tagList ?fieldPattern tagList..?

Examples: TODO

Deletes the range of items starting with the given startItem and ending with the given endItem. If endItem is omitted, then only the item identified by startItem will be deleted.

Returns the numeric text widget index corresponding to the given index.

Returns the id of the item preceding the given itemId. The empty string is returned if the given item is the firstt item.

Returns the id of the item following the given itemId. The empty string is returned if the given item is the last item.

Returns 1 if the given itemId is present in the widget. Returns 0 otherwise.

Returns the id of the item at the given index

Returns the ids of the items with the given tag

Changes the value of the given field in the given item to the given value

Returns the value of the given field in the given item