home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / amiga / gui / mui / mui14-dv.lha / MUI / Developer / Autodocs / MUI_List.doc < prev    next >
Encoding:
Text File  |  1993-10-28  |  20.1 KB  |  765 lines

  1. TABLE OF CONTENTS
  2.  
  3. List.mui/List.mui
  4. List.mui/MUIM_List_Clear
  5. List.mui/MUIM_List_Exchange
  6. List.mui/MUIM_List_GetEntry
  7. List.mui/MUIM_List_Insert
  8. List.mui/MUIM_List_Jump
  9. List.mui/MUIM_List_NextSelected
  10. List.mui/MUIM_List_Redraw
  11. List.mui/MUIM_List_Remove
  12. List.mui/MUIM_List_Select
  13. List.mui/MUIM_List_Sort
  14. List.mui/MUIA_List_Active
  15. List.mui/MUIA_List_AdjustHeight
  16. List.mui/MUIA_List_AdjustWidth
  17. List.mui/MUIA_List_CompareHook
  18. List.mui/MUIA_List_ConstructHook
  19. List.mui/MUIA_List_DestructHook
  20. List.mui/MUIA_List_DisplayHook
  21. List.mui/MUIA_List_Entries
  22. List.mui/MUIA_List_First
  23. List.mui/MUIA_List_Format
  24. List.mui/MUIA_List_MultiTestHook
  25. List.mui/MUIA_List_Quiet
  26. List.mui/MUIA_List_Visible
  27. List.mui/List.mui
  28.  
  29.     MUI's list class is very powerful. It handles all types
  30.     of entries, from a simple string to a complicated structure
  31.     with many associated resources. Multi column lists are
  32.     also supported, the format for a column is adjustable.
  33.  
  34.     Lists support any kind of sorting, multi selection and
  35.     an active entry that can be controlled with the mouse
  36.     or the cursor keys.
  37.  
  38.     Note: A list object alone doesn't make much sense, you
  39.           should always use it as child of a listview object.
  40.           This one attaches a scrollbar and handles all user
  41.           input.
  42. List.mui/MUIM_List_Clear
  43.  
  44.     NAME
  45.     MUIM_List_Clear
  46.  
  47.     SYNOPSIS
  48.     DoMethod(obj,MUIM_List_Clear,);
  49.  
  50.     FUNCTION
  51.     Clear the list, all entries are removed. If a destruct
  52.     hook is set it will be called for every entry.
  53.  
  54.     SEE ALSO
  55.     MUIM_List_Insert, MUIA_List_DestructHook
  56. List.mui/MUIM_List_Exchange
  57.  
  58.     NAME
  59.     MUIM_List_Exchange
  60.  
  61.     SYNOPSIS
  62.     DoMethod(obj,MUIM_List_Exchange,LONG pos1, LONG pos2);
  63.  
  64.     FUNCTION
  65.     Exchange two entries in a list.
  66.  
  67.     INPUTS
  68.     pos1 - number of the first entry.
  69.     pos2 - number of the second entry.
  70.  
  71.     MUIV_List_Exchange_Active for pos1 or pos2 
  72.     addresses the currently active entry.
  73.  
  74.     SEE ALSO
  75.     MUIM_List_Insert, MUIA_List_Remove
  76. List.mui/MUIM_List_GetEntry
  77.  
  78.     NAME
  79.     MUIM_List_GetEntry
  80.  
  81.     SYNOPSIS
  82.     DoMethod(obj,MUIM_List_GetEntry,LONG pos, APTR *entry);
  83.  
  84.     FUNCTION
  85.     Get an entry of a list.
  86.  
  87.     INPUTS
  88.     pos   - Number of entry, MUIV_List_GetEntry_Active can
  89.             be used to get the active entry.
  90.  
  91.     entry - Pointer to a longword where the entry will
  92.             be stored. If the entry is not available
  93.             (either because you are out of bounds or
  94.             because there is no active entry), you will
  95.             receive a NULL.
  96.  
  97.     EXAMPLE
  98.     /* iterate through a list containing file info blocks */
  99.  
  100.     for (i=0;;i++)
  101.     {
  102.         struct FileInfoBlock *fib;
  103.  
  104.         DoMethod(list,MUIM_List_GetEntry,i,&fib);
  105.         if (!fib) break;
  106.  
  107.         printf("%s\n",fib->fib_FileName);
  108.     }
  109.  
  110.     SEE ALSO
  111.     MUIM_List_Insert, MUIM_List_Remove
  112. List.mui/MUIM_List_Insert
  113.  
  114.     NAME
  115.     MUIM_List_Insert
  116.  
  117.     SYNOPSIS
  118.     DoMethod(obj,MUIM_List_Insert,APTR *entries, LONG count, LONG pos);
  119.  
  120.     FUNCTION
  121.     Insert new entries into a list.
  122.     When the list has a construct hook, the given pointers
  123.     won't be inserted directly but instead passed through 
  124.     to the construct hook.
  125.  
  126.     INPUTS
  127.     entries - pointer to an array of pointers to be inserted.
  128.               Warning: This is a pointer to a pointer. See
  129.               example for details.
  130.  
  131.     count   - Number of elements to be inserted. If count==-1,
  132.               entries will be inserted until NULL pointer in
  133.               the entries array is found.
  134.  
  135.     pos     - New entries will be added in front of this entry.
  136.               MUIV_List_Insert_Top:
  137.                  insert as first entry.
  138.               MUIV_List_Insert_Active:
  139.                  insert in front of the active entry.
  140.               MUIV_List_Insert_Sorted:
  141.                  insert sorted.
  142.               MUIV_List_Insert_Bottom:
  143.                  insert as last entry.
  144.  
  145.     EXAMPLE
  146.     /* insert a string */
  147.     char *str = "New entry";
  148.     DoMethod(list,MUIM_List_Insert,&str,1,MUIV_List_Insert_Bottom);
  149.  
  150.     /* insert an array */
  151.     char *str[] =
  152.     {
  153.        "Entry 1",
  154.        "Entry 2",
  155.        "Entry 3",
  156.        "Entry 4",
  157.        NULL
  158.     };
  159.     DoMethod(list,MUIM_List_Insert,&str,-1,MUIV_List_Insert_Bottom);
  160.  
  161.     SEE ALSO
  162.     MUIM_List_Remove, MUIA_List_ConstructHook
  163. List.mui/MUIM_List_Jump
  164.  
  165.     NAME
  166.     MUIM_List_Jump
  167.  
  168.     SYNOPSIS
  169.     DoMethod(obj,MUIM_List_Jump,LONG pos);
  170.  
  171.     FUNCTION
  172.     Scroll any entry into the visible part of a list.
  173.  
  174.     Note: Jumping to an entry doesn't mean to make this
  175.           entry the active one. This can be done by 
  176.           setting the MUIA_List_Active attribute.
  177.  
  178.     INPUTS
  179.     pos - Number of the entry that should be made visible.
  180.           Use MUIV_List_Jump_Active to jump to the active
  181.           entry.
  182.  
  183.     EXAMPLE
  184.     /* line 42 is interesting, so make it visible */
  185.     DoMethod(list,MUIM_List_Jump,42);
  186.  
  187.     SEE ALSO
  188.     MUIA_List_Active
  189. List.mui/MUIM_List_NextSelected
  190.  
  191.     NAME
  192.     MUIM_List_NextSelected
  193.  
  194.     SYNOPSIS
  195.     DoMethod(obj,MUIM_List_NextSelected,LONG *pos);
  196.  
  197.     FUNCTION
  198.     Iterate through the selected entries of a list.
  199.     This method steps through the contents of a (multi
  200.     select) list and returns every entry that is currently
  201.     selected. When no entry is selected but an entry is
  202.     active, only the active entry will be returned.
  203.  
  204.     This behaviour will result in not returning the
  205.     active entry when you have some other selected
  206.     entries somewhere in your list. Since the active
  207.     entry just acts as some kind of cursor mark,
  208.     this seems to be the only sensible possibility
  209.     to handle multi selection together with keyboard
  210.     control.
  211.  
  212.     INPUTS
  213.     pos - a pointer to longword that will hold the number
  214.           of the returned entry. Must be set to -1 at
  215.           start of iteration. Is set to -1 when iteration
  216.           is finished.
  217.  
  218.     EXAMPLE
  219.  
  220.     /* Iterate through a list with FileInfoBlocks */
  221.  
  222.     struct FileInfoBlock *fib;
  223.     LONG id = -1;
  224.  
  225.     for (;;)
  226.     {
  227.        DoMethod(list,MUIM_List_NextSelected,&id);
  228.        if (id==-1) break;
  229.  
  230.        DoMethod(list,MUIM_List_GetEntry,id,&fib);
  231.        printf("selected: %s\n",fib->fib_FileName);
  232.     }
  233.  
  234.  
  235.     SEE ALSO
  236.     MUIM_List_Select
  237. List.mui/MUIM_List_Redraw
  238.  
  239.     NAME
  240.     MUIM_List_Redraw
  241.  
  242.     SYNOPSIS
  243.     DoMethod(obj,MUIM_List_Redraw,LONG pos);
  244.  
  245.     FUNCTION
  246.     If you made some changes to an entry of your list and
  247.     want these changes to be shown in the display, you will
  248.     have to call this method.
  249.  
  250.     INPUTS
  251.     pos - Number of the line to redraw. When the line is not
  252.           currently visible, nothing will happen. Specials:
  253.           MUIV_List_Redraw_Active:
  254.              redraw the active line (if any),
  255.           MUIV_List_Redraw_All:
  256.              redraw all lines.
  257.  
  258.     EXAMPLE
  259.     /* do a complete refresh: */
  260.     DoMethod(list,MUIM_List_Redraw,MUIV_List_Redraw_All);
  261. List.mui/MUIM_List_Remove
  262.  
  263.     NAME
  264.     MUIM_List_Remove
  265.  
  266.     SYNOPSIS
  267.     DoMethod(obj,MUIM_List_Remove,LONG pos);
  268.  
  269.     FUNCTION
  270.     Remove an entry from a list.
  271.  
  272.     INPUTS
  273.     pos - number of the entry to be removed or one of
  274.           MUIV_List_Remove_First,
  275.           MUIV_List_Remove_Active,
  276.           MUIV_List_Remove_Last.
  277.           When the active entry is removed, the following entry
  278.           will become active.
  279.  
  280.     EXAMPLE
  281.     /* when delete is pressed, remove the active entry */
  282.     DoMethod(btdel,MUIM_Notify,MUIA_Pressed,FALSE,
  283.        list,2,MUIM_List_Remove,MUIV_List_Remove_Active);
  284.  
  285.     SEE ALSO
  286.     MUIM_List_Insert, MUIA_List_DestructHook
  287. List.mui/MUIM_List_Select
  288.  
  289.     NAME
  290.     MUIM_List_Select
  291.  
  292.     SYNOPSIS
  293.     DoMethod(obj,MUIM_List_Select,LONG pos, LONG seltype, LONG *state);
  294.  
  295.     FUNCTION
  296.     Select/deselect a list entry or ask an entry if its
  297.     selected.
  298.  
  299.     INPUTS
  300.  
  301.     pos     - Number of the entry or
  302.               MUIV_List_Select_Active for the active entry.
  303.  
  304.     seltype - MUIV_List_Select_Off     unselect entry.
  305.               MUIV_List_Select_On      select entry.
  306.               MUIV_List_Select_Toggle  toggle entry.
  307.               MUIV_List_Select_Ask     just ask about the state.
  308.  
  309.     state   - Pointer to a longword. If not NULL, this will
  310.               be filled with the current selection state.
  311.  
  312.     EXAMPLE
  313.     /* toggle selection of active entry */
  314.     DoMethod(list,MUIM_List_Select,MUIV_List_Select_Active,
  315.        MUIV_List_Select_Toggle,NULL);
  316.  
  317.     SEE ALSO
  318.     MUIA_List_MultiTest_Hook
  319. List.mui/MUIM_List_Sort
  320.  
  321.     NAME
  322.     MUIM_List_Sort
  323.  
  324.     SYNOPSIS
  325.     DoMethod(obj,MUIM_List_Sort,);
  326.  
  327.     FUNCTION
  328.     Sort the list. MUI uses an iterative quicksort algorithm,
  329.     no stack problems will occur.
  330.  
  331.     SEE ALSO
  332.     MUIA_List_CompareHook
  333. List.mui/MUIA_List_Active
  334.  
  335.     NAME
  336.     MUIA_List_Active -- [ISG], LONG
  337.  
  338.     SPECIAL INPUTS
  339.     MUIV_List_Active_Off
  340.     MUIV_List_Active_Top
  341.     MUIV_List_Active_Bottom
  342.     MUIV_List_Active_Up
  343.     MUIV_List_Active_Down
  344.     MUIV_List_Active_PageUp
  345.     MUIV_List_Active_PageDown
  346.  
  347.     FUNCTION
  348.     Reading this attribute will return the number of
  349.     the active entry (the one with the cursor on it).
  350.     The result is between 0 and MUIA_List_Entries-1
  351.     or MUIV_List_Active_Off, in which case there is
  352.     currently no active entry.
  353.  
  354.     Setting the attribute will cause the list to
  355.     move the cursor to the new position and scroll
  356.     this position into the visible area.
  357.  
  358.     SEE ALSO
  359.     MUIA_List_Entries, MUIA_List_First, MUIA_List_Visible
  360. List.mui/MUIA_List_AdjustHeight
  361.  
  362.     NAME
  363.     MUIA_List_AdjustHeight -- [I..], BOOL
  364.  
  365.     FUNCTION
  366.     A list with MUIA_List_AdjustHeight set to true is exactly
  367.     as high as all of its entries and not resizable. This is
  368.     only possible when the list is filled *before* the window
  369.     is opened.
  370.  
  371.     SEE ALSO
  372.     MUIA_List_AdjustWidth
  373. List.mui/MUIA_List_AdjustWidth
  374.  
  375.     NAME
  376.     MUIA_List_AdjustWidth -- [I..], BOOL
  377.  
  378.     FUNCTION
  379.     A list with MUIA_List_AdjustWidth set to true is exactly
  380.     as wide as the widest entry and not resizable. This is
  381.     only possible when the list is filled *before* the window
  382.     is opened.
  383.  
  384.     SEE ALSO
  385.     MUIA_List_AdjustHeight
  386. List.mui/MUIA_List_CompareHook
  387.  
  388.     NAME
  389.     MUIA_List_CompareHook -- [I..], struct Hook *
  390.  
  391.     FUNCTION
  392.     If you plan to have the entries of your list sorted
  393.     (either by inserting them sorted or by using the
  394.     MUIM_List_Sort method) and if the entries of your
  395.     list are not simple strings, you *must* supply
  396.     a compare hook.
  397.  
  398.     This hook will be called with one list element in A1
  399.     and another one in A2. You should return
  400.  
  401.     -1   e1 <  e2
  402.      0   e1 == e2
  403.      1รก  e1 >  e2
  404.  
  405.     EXAMPLE
  406.     /* the builtin string compare function */
  407.  
  408.         LONG __asm cmpfunc(_a1 char *s1,_a2 char *s2)
  409.     {
  410.        return(stricmp(s1,s2));
  411.     }
  412.  
  413.     SEE ALSO
  414.     MUIA_List_ConstructHook, MUIA_List_DestructHook
  415. List.mui/MUIA_List_ConstructHook
  416.  
  417.     NAME
  418.     MUIA_List_ConstructHook -- [I..], struct Hook *
  419.  
  420.     SPECIAL INPUTS
  421.     MUIV_List_ConstructHook_String
  422.  
  423.     FUNCTION
  424.     The construct hook is called whenever you add an
  425.     entry to your list. MUI will not insert the given
  426.     pointer directly, but instead call the construct
  427.     hook and add its result code.
  428.  
  429.     Imagine you want to display a list of entries
  430.     in a directory. You could step through it
  431.     using Examine()/ExNext() and directly use the
  432.     MUIM_List_Insert method on your file info block
  433.     buffer.
  434.  
  435.     Your construct hook will be called with this
  436.     file info block as parameter, makes a copy of
  437.     it and returns the address of that copy. Thats
  438.     what is actually added to the list.
  439.  
  440.     The corresponding destruct hook is called whenever
  441.     an entry shall be removed. It's task would simply be
  442.     to free the memory and maybe other resources concering
  443.     this entry that were allocated by the construct hook.
  444.  
  445.     Using these two functions, you will never have to
  446.     worry about freeing the memory used by your list
  447.     entries. Clearing the list or disposing the list
  448.     object will automatically remove all entries and
  449.     thus free the associated resources.
  450.  
  451.     The construct hook will be called with the hook
  452.     in A0, the data given to MUIM_List_Insert as message
  453.     in register A1 and with pointer to a standard kick 3.x
  454.     memory pool in A2. If you want, you can use the exec
  455.     or amiga.lib functions for allocating memory within
  456.     this pool, but this is only an option.
  457.  
  458.     If the construct hook returns NULL, nothing will be
  459.     added to the list.
  460.  
  461.     There is a builtin construct hook available called
  462.     MUIV_List_ConstructHook_String. This expects that
  463.     you only add strings to your list and will make
  464.     a local copy of this string to allow you destroying
  465.     the original. Of course you *must* also use
  466.     MUIV_List_DestructHook_String in this case.
  467.  
  468.     Without construct and destruct hooks, you are responsible
  469.     for allocating and freeing entries yourself.
  470.  
  471.     EXAMPLE
  472.     /* the builtin string construct and destruct functions: */
  473.  
  474.     APTR __asm consfunc(_a2 APTR pool,_a1 char *str)
  475.     {
  476.        char *new;
  477.        if (new=AllocPooled(pool,strlen(str)+1))
  478.           strcpy(new,str);
  479.        return(new);
  480.     }
  481.  
  482.     VOID __asm desfunc(_a2 APTR pool,_a1 char *entry)
  483.     {
  484.        FreePooled(pool,entry,strlen(entry)+1);
  485.     }
  486.  
  487.     /* for more sophisticated hooks see demo program WbMan.c */
  488.  
  489.     SEE ALSO
  490.     MUIA_List_DestructHook, MUIA_List_DisplayHook
  491. List.mui/MUIA_List_DestructHook
  492.  
  493.     NAME
  494.     MUIA_List_DestructHook -- [I..], struct Hook *
  495.  
  496.     SPECIAL INPUTS
  497.     MUIV_List_DestructHook_String
  498.  
  499.     FUNCTION
  500.     Set up a destruct hook for your list. For detailed
  501.     explanation see MUIA_List_ConstructHook.
  502.  
  503.     SEE ALSO
  504.     MUIA_List_ConstructHook, MUIA_List_DisplayHook
  505. List.mui/MUIA_List_DisplayHook
  506.  
  507.     NAME
  508.     MUIA_List_DisplayHook -- [I..], struct Hook *
  509.  
  510.     FUNCTION
  511.     Since MUI's lists can handle any kind of entries,
  512.     you have to supply a display hook to specify what
  513.     should actually be shown in the display.
  514.  
  515.     The hook will be called with a pointer to the
  516.     entry to be displayed in A1 and a pointer to
  517.     a string array containing as many entries as
  518.     your list may have columns in A2.
  519.  
  520.     You must fill this array with the strings that
  521.     you want to display.
  522.  
  523.     Note: You can of course use MUI's text engine
  524.           facilities here to create e.g. right aligned
  525.           or centered columns.
  526.  
  527.     Without a display hook, MUI expects a simple one
  528.     columned string list.
  529.  
  530.     See MUIA_List_Format for details about column handling.
  531.  
  532.     Note: Since version 6 of MUI, the display hook also gets the
  533.         position of the current entry as additional parameter. You
  534.     can easily do e.g. some line numbering using this feature. The
  535.     number (from 0 to NumEntries-1) is stored in the longword
  536.     *preceding* the column array (see example below).
  537.  
  538.     EXAMPLE
  539.     /* list of file info blocks, two columned, name and size */
  540.  
  541.     LONG __asm dispfunc(_a2 char **array,_a1 struct FileInfoBlock *fib)
  542.     {
  543.        static char buf1[20],buf2[20];
  544.  
  545.        if (fib->fib_EntryType<0)
  546.          sprintf(buf2,"\33r%ld",fib->fib_Size);
  547.        else
  548.          strcpy(buf2,"\33r(dir)");
  549.  
  550.        sprintf(buf1,"%ld",array[-1]);   // get the line number.
  551.  
  552.        *array++ = buf1;
  553.        *array++ = fib->fib_FileName;
  554.        *array   = buf2;
  555.  
  556.        return(0);
  557.     }
  558.  
  559.     SEE ALSO
  560.     MUIA_List_Format, MUIA_Text_Contents
  561. List.mui/MUIA_List_Entries
  562.  
  563.     NAME
  564.     MUIA_List_Entries -- [..G], LONG
  565.  
  566.     FUNCTION
  567.     Get the current number of entries in the list.
  568.  
  569.     SEE ALSO
  570.     MUIA_List_First, MUIA_List_Visible, MUIA_List_Active
  571. List.mui/MUIA_List_First
  572.  
  573.     NAME
  574.     MUIA_List_First -- [..G], LONG
  575.  
  576.     FUNCTION
  577.     Get the number of the entry displayed on top of
  578.     the list.
  579.  
  580.     SEE ALSO
  581.     MUIA_List_Visible, MUIA_List_Entries, MUIA_List_Active
  582. List.mui/MUIA_List_Format
  583.  
  584.     NAME
  585.     MUIA_List_Format -- [ISG], STRPTR
  586.  
  587.     FUNCTION
  588.     MUI has the ability to handle multi column lists. To define
  589.     how many columns should be displayed and how they should be
  590.     formatted, you specify a format string.
  591.  
  592.     This format string must contain one entry for each column
  593.     you want to see. Entries are seperated by commas, one
  594.     entry is parsed via dos.library/ReadArgs().
  595.  
  596.     The template for a single entry looks like this:
  597.  
  598.     DELTA=D/N,PREPARSE=P/K,WEIGHT=W/N,
  599.     MINWIDTH=MIW/N,MAXWIDTH=MAW/N,COL=C/N
  600.  
  601.     DELTA
  602.        Space in pixel between this column and the next.
  603.        the last displayed column ignores this setting.
  604.        Defaults to 4.
  605.  
  606.     PREPARSE
  607.        A preparse value for this column. Setting this
  608.        e.g. to "\33c" would make the column centered.
  609.        See MUIA_Text_Contents for other control codes.
  610.  
  611.     WEIGHT
  612.        The weight of the column. As with MUI's group
  613.        class, columns are layouted with a minimum
  614.        size, a maximum size and weight. A column with
  615.        a weight of 200 would gain twice the space than
  616.        a column with a weight of 100.
  617.        Defaults to 100.
  618.  
  619.     MINWIDTH
  620.        Minimum percentage width for the current column.
  621.        If your list is 200 pixel wide and you set this
  622.        to 25, your column will at least be 50 pixel.
  623.        The special value -1 for this parameter means that
  624.        the minimum width is as wide as the widest entry in
  625.        this column. This ensures that every entry will be
  626.        completely visible (as long as the list is wide enough).
  627.        Defaults to -1.
  628.  
  629.     MAXWIDTH
  630.        Maximum percentage width for the current column.
  631.        If your list is 200 pixel wide and you set this
  632.        to 25, your column will not be wider as 50 pixel.
  633.        The special value -1 for this parameter means that
  634.        the maximum width is as wide as the widest entry in
  635.        this column.
  636.        Defaults to -1.
  637.  
  638.     COL
  639.        This value adjusts the number of the current column.
  640.        This allows you to adjust the order of your columns
  641.        without having to change your display hook. See
  642.        example for details.
  643.        Defaults to current entry number (0,1,...)
  644.  
  645.     If your list object gets so small there is not enough
  646.     place for the minwidth of a column, this column will
  647.     be hidden completely and the remaining space is
  648.     distributed between the remaining columns. This is not
  649.     true if the column is the first column, in this case
  650.     the entries will simply be clipped.
  651.  
  652.     Note: You will have as many columns in your list as
  653.           entries in the format string (i.e. number of
  654.           commas + 1). Empty entries, e.g. a format string
  655.           of ",,,," are perfectly ok.
  656.  
  657.     The default list format is an empty string (""), this
  658.     means a one column list without special formatting.
  659.  
  660.     BUGS
  661.     Currently there is a maximum of 64 columns for a list.
  662.  
  663.     EXAMPLE
  664.     /* Three column list without further formatting: */
  665.     MUIA_List_Format: ",,"
  666.  
  667.     /* Three column list, middle column centered: */
  668.     MUIA_List_Format: ",P=\33c,"
  669.  
  670.     /* Three column list, display order 2 1 0: */
  671.     MUIA_List_Format: "COL=2,COL=1,COL=0"
  672.  
  673.     /* now something more complex.           */
  674.     /* the display hook defines six entries: */
  675.     dispfunc(_a2 char **array,_a1 struct Article *at)
  676.     {
  677.        *array++ = at->FromName; // col 0
  678.        *array++ = at->FromPath; // col 1
  679.        *array++ = at->ToName;   // col 2
  680.        *array++ = at->ToPath;   // col 3
  681.        *array++ = at->Date;     // col 4
  682.        *array   = at->Subject;  // col 5
  683.     }
  684.  
  685.     /* but we only want to have fromname, date and subject
  686.     /* actually displayed, subject shoud be centered: */
  687.     MUIA_List_Format, "COL=0,COL=4,COL=5 P=\33c"
  688.  
  689.     /* maybe this looks kind of silly, why not make our  */
  690.     /* display hook only fill in these three columns.    */
  691.     /* well, if you would e.g. make the format string    */
  692.     /* user configurable and document what your display  */
  693.     /* hook puts into the array, the user could decide   */
  694.     /* what columns he actually wants to see.            */
  695.     /* The supplied example DFView does something like   */
  696.     /* that.                                             */
  697.  
  698.     /* two column list:   ! Eye    1234 !
  699.                               ! Foot     22 !
  700.                               ! Nose  22331 ! */
  701.  
  702.     MUIA_List_Format, "MAW=100,P=\33r"
  703.  
  704.     SEE ALSO
  705.     MUIA_List_DisplayHook
  706. List.mui/MUIA_List_MultiTestHook
  707.  
  708.     NAME
  709.     MUIA_List_MultiTestHook -- [I..], struct Hook *
  710.  
  711.     FUNCTION
  712.     If you plan to have a multi selecting list but not
  713.     all of your entries are actually multi selectable
  714.     (e.g. in a file requester), you can supply a
  715.     MUIA_List_MultiTestHook.
  716.  
  717.     It will be called with a pointer to an entry in
  718.     A1 and should return TRUE if the entry is multi
  719.     selectable, FALSE otherwise.
  720.  
  721.     EXAMPLE
  722.     /* multi test func for a list of file info blocks */
  723.  
  724.     LONG __asm mtfunc(_a1 struct FileInfoBlock *fib)
  725.     {
  726.        if (fib->fib_DirEntryType<0)
  727.           return(TRUE);
  728.        else
  729.           return(FALSE);
  730.     }
  731.  
  732.     SEE ALSO
  733.     MUIA_List_ConstructHook, MUIA_List_DestructHook
  734. List.mui/MUIA_List_Quiet
  735.  
  736.     NAME
  737.     MUIA_List_Quiet -- [.S.], BOOL
  738.  
  739.     FUNCTION
  740.     If you add/remove lots of entries to/from a currently visible
  741.     list, this will cause lots of screen action and slow down
  742.     the operation. Setting MUIA_List_Quiet to true will
  743.     temporarily prevent the list from being refreshed, this
  744.     refresh will take place only once when you set it back
  745.     to false again.
  746.  
  747.     EXAMPLE
  748.     set(list,MUIA_List_Quiet,TRUE);
  749.     AddThousandEntries(list);
  750.     set(list,MUIA_List_Quiet,FALSE);
  751.  
  752.     SEE ALSO
  753.     MUIM_List_Insert, MUIM_List_Remove
  754. List.mui/MUIA_List_Visible
  755.  
  756.     NAME
  757.     MUIA_List_Visible -- [..G], LONG
  758.  
  759.     FUNCTION
  760.     Get the current number of visible entries in the list.
  761.     This attribute is propably not of much use.
  762.  
  763.     SEE ALSO
  764.     MUIA_List_First, MUIA_List_Entries, MUIA_List_Active
  765.