home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / List Manager for Lightspeed C / ListMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-05-25  |  1.5 KB  |  82 lines  |  [TEXT/KAHL]

  1. /*    List Manager definitions
  2.     Walter R. Smith, 21 April 1986
  3.     This code is hereby placed in the public domain.
  4.  */
  5.  
  6. #ifndef _ListMgr_
  7. #define _ListMgr_
  8.  
  9. #ifndef _MacTypes_
  10. #include "MacTypes.h"
  11. #endif
  12.  
  13. #ifndef _ControlMgr_
  14. #include "ControlMgr.h"
  15. #endif
  16.  
  17. /* Masks for automatic scrolling */
  18. enum {
  19.     lDoHAutoScroll = 1,
  20.     lDoVAutoScroll
  21. };
  22.  
  23. /* Masks for selection flags */
  24. enum {
  25.     lNoNilHilite = 2,
  26.     lUseSense = 4,
  27.     lNoRect = 8,
  28.     lNoExtend = 16,
  29.     lNoDisjoint = 32,
  30.     lExtendDrag = 64,
  31.     lOnlyOne = 128
  32. };
  33.  
  34. /* Messages to list definition procedures */
  35. enum {
  36.     lInitMsg,
  37.     lDrawMsg,
  38.     lHiliteMsg,
  39.     lCloseMsg
  40. };
  41.  
  42. typedef Point Cell;
  43. typedef char DataArray[32000];
  44. typedef DataArray *DataPtr, **DataHandle;
  45. typedef struct {
  46.     Rect rView;
  47.     GrafPtr port;
  48.     Point indent;
  49.     Point cellSize;
  50.     Rect visible;
  51.     ControlHandle vScroll;
  52.     ControlHandle hScroll;
  53.     Byte selFlags;
  54.     Byte lActive;
  55.     Byte lReserved;
  56.     Byte listFlags;
  57.     long clikTime;
  58.     Point clikLoc;
  59.     Point mouseLoc;
  60.     Ptr lClikLoop;
  61.     Cell lastClick;
  62.     long refCon;
  63.     Handle listDefProc;
  64.     Handle userHandle;
  65.     Rect dataBounds;
  66.     DataHandle cells;
  67.     int maxIndex;
  68.     int cellArray[1];
  69. } ListRec;
  70. typedef ListRec *ListPtr, **ListHandle;
  71.  
  72. extern pascal ListHandle LNew();
  73. extern pascal int LAddColumn(), LAddRow();
  74. extern pascal Boolean LGetSelect(), LClick(), LNextCell(), LSearch();
  75. extern pascal long LLastClick();
  76. extern pascal void LDispose(), LDelColumn(), LDelRow(), LAddToCell(),
  77.     LClrCell(), LGetCell(), LSetCell(), LCellSize(), LSetSelect(), 
  78.     LFind(), LRect(), LSize(), LDraw(), LDoDraw(), LScroll(),
  79.     LAutoScroll(), LUpdate(), LActivate();
  80.  
  81. #endif
  82.