next up previous contents index
Next: XList_Button Up: Classes and Methods Previous: Textmessage

XList

  (subclass of 9.1.3.12 Group)

An Xlist is used to select one of several items. The content of the input can be completed using the TAB key. The XList will try to find a matching item in the list.

typedef enum sort_method {
  smUnsorted,
  smAlphabetic,
  smFileList,
  smMethodList
} SORT_METHOD;

   GRAPE(xlist, "add-key-to-list")(newstr, key)
XLIST *xlist
char *newstr
int key
The same as "add-to-list" except that the inserted string is associated with the number key. In the list method one can distinguish between similar entries by comparing the instance variable xlist->chosen_key instead on interpreting only xlist->chosen. Note that xlist->chosen_key is only valid if xlist->chosen is set.
   GRAPE(xlist, "add-to-list")(newstr)
XLIST *xlist
char *newstr
Add the string "newstr to the list. If a sorting mode is set, using the method "set-sorting-mode", the item will be added at the right position.
   GRAPE(xlist, "focus-element")(element)
XLIST *xlist
char * element
Set the list element matching element to be chosen; it appears pressed in the list and the list is scrolled to show it.
   GRAPE(xlist, "list-is-empty")()
XLIST *xlist
Return non NULL, if xlist has list entries, i.e. the list does not need to be rebuilt.
   GRAPE(XList, "new-instance")(meth, inst, name)
CLASS *XList
char *meth
INSTANCE *inst
char *name
   GRAPE(xlist, "remove-from-list")(str)
XLIST *xlist
char * str
Remove a list entry by string.
   GRAPE(xlist, "remove-key-from-list")(key)
XLIST *xlist
int key
Remove a list entry by key.
   GRAPE(xlist, "remove-list")()
XLIST *xlist
Empty the list, to be prepared for creating new entries.
   GRAPE(xlist, "set-sorting-mode")(sorting_mode)
XLIST *xlist
SORT_METHOD sorting_mode
Set the kind of sorting, which is used only while adding items to the list.
   GRAPE(xlist, "strip")(class)
XLIST * xlist
CLASS * class
Remove all entries of xlist that are of class class. This is the only way to remove unused Inputs or Buttons. class may be only Input or Button for this reason.


next up previous contents index
Next: XList_Button Up: Classes and Methods Previous: Textmessage

SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.