21.18 Listview Interface

ORIGIN '../scrolllists';
LIB_DEF 'guienvutilslistview' '../../lib';
BODY 'private/listviewbody';

-- windowLib: attributes --


listView: textScrollList
  (* A textScrollList where each textline in the list corresponds to
   * a unique listItem object.
   *)
  (# <<SLOT listViewLib: attributes>>;
     listItem:
       (* A listItem object corresponds to a unique line in the List
        * The name if this(listItem) i the text in the corresponding
        * line. When the user selects on item by clicking, onSelect is
        * called.
        *)
       (# <<SLOT listItemLib: attributes>>;
          name:
            (* The name is the text in the line corresponding to
             * this(listItem).
             *)
            (# theName: ^text;
            enter (# enter theName[] ... #)
            exit (# ... exit theName[] #)
            #);
          position: integerValue
            (* The the item number of this(listItem) in the range
             * from 1 to numberOfItems.
             *)
            (# ... #);
          init:<
            (* Inserts this(listItem) in the list before
             * `beforeItem', if `beforeItem' is none this(listItem) is
             * appended. Init *must* be the first operation on this(listItem).
             *)
            (# beforeItem: ^listItem;
            enter beforeItem[]
            ... 
            #);
          delete:<
            (* Delete this(listItem) from this(listView). *)
            (# ... #);
          onSelect:<
            (* Called when this(listItem) is selected by the user or
             * the programmer. If the user has doubleClicked
             * this(listItem) the `doubleClick' flag is true.
             *)
            (# doubleClick: @boolean;
            enter doubleClick
            do INNER;
            #);
          select:
            (* Select this(listItem). If singeSelection is true, all
             * other items are deSelected.
             *)
            (# ... #);
          deSelect:
            (* Call this to deSelect this(listItem). *)
            (# ... #);
          private: @...;
       #);
     listItems: @list
       (# element::< listItem #);
     open::<(# ... #);
     close::<
       (# ... #);
     eventHandler::<
       (# onMouseUp::<
            (# ... #);
       #);
     private: @...;
  #)


21.18 Listview Interface
© 1994-2002 Mjølner Informatics
[Modified: Friday January 21st 2000 at 8:41]