home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / utils / precognition / include / listbrowser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-24  |  1.8 KB  |  75 lines

  1. /* ==========================================================================
  2. **
  3. **                         ListBrowser.h
  4. **
  5. ** PObject<GraphicObject<Interactor<StringLister<ListBrowser
  6. **
  7. ** A ListBrowser displays a list of strings, and allows the user to select
  8. ** one or more of them.
  9. **
  10. ** ©1991 WILLISoft
  11. **
  12. ** ==========================================================================
  13. */
  14.  
  15. #ifndef LISTBROWSER_H
  16. #define LISTBROWSER_H
  17.  
  18. #include "StringList.h"
  19. #include "StringLister.h"
  20. #include "Precognition3D.h"
  21. #include "EmbossedGadget.h"
  22.  
  23. typedef struct ListBrowser
  24.    {
  25.       EmbossedGadget     eg;
  26.       StringList         List;
  27.       BOOL               SelectMany;
  28.       USHORT             nRows;
  29.       USHORT             nColumns;
  30.       USHORT             YOffset;
  31.    } ListBrowser;
  32.  
  33.  
  34.  
  35.  
  36. void ListBrowser_Init( 
  37.    #ifdef ANSI_HEADERS
  38.                        ListBrowser   *self,
  39.                        PIXELS         LeftEdge,
  40.                        PIXELS         TopEdge,
  41.                        PIXELS         Width,
  42.                        PIXELS         Height,
  43.                        pcg_3DPens     Pens,
  44.                        BOOL           SelectMany 
  45.    #endif
  46.                     );
  47.  
  48.  
  49. USHORT ListBrowser_SetYOffset( 
  50.    #ifdef ANSI_HEADERS
  51.                                ListBrowser *Browser,
  52.                                USHORT       YOffset 
  53.    #endif
  54.                              );
  55. /*
  56. **  Scrols the list to set YOffset at the top.
  57. **
  58. **  e.g. YOffset = 0  -> the first element in the list is at the top.
  59. **       YOffset = 10 -> the 11th element....
  60. */
  61.  
  62.  
  63.  
  64. /* -- Qualifiers for 'AddString()'.
  65. **
  66. ** ENTRY_SELECTED    : This element is selected.
  67. ** ENTRY_SPECIAL     : Displayed in a different pen color.
  68. ** ENTRY_DISABLED    : Displayed ghosted.
  69. */
  70. #define ENTRY_SELECTED     1
  71. #define ENTRY_SPECIAL      2
  72. #define ENTRY_DISABLED     4
  73.  
  74. #endif
  75.