home *** CD-ROM | disk | FTP | other *** search
/ NeXT 3rd Party Products 1993 / NEXT_3rd_party_products_93.iso / Xanthus / Graphity_Demo / API / Demo2 / Graphity_API.h < prev    next >
Text File  |  1993-05-07  |  2KB  |  89 lines

  1.  
  2. //
  3. // Defs for both 
  4. // the Speaker/Listener based API and 
  5. // the Distributed Object Based API
  6. //
  7.  
  8. #define GRAPHITY_NO_SUCH_DOCUMENT    -1
  9. #define GRAPHITY_NO_SUCH_GRAPH        -2
  10.  
  11. #define GRAPHITY_DONT_DISPLAY    0
  12. #define GRAPHITY_DISPLAY    1
  13. #define GRAPHITY_RECALCULATE    2
  14.  
  15. #define GRAPHITY_OK    0
  16. #define GRAPHITY_ERROR    -1
  17.  
  18.  
  19. #define GRAPHITY_SAVE        0
  20. #define GRAPHITY_SAVE_AS    1
  21. #define GRAPHITY_SAVE_TO    2
  22.  
  23. #define GRAPHITY_OPEN        0
  24. #define GRAPHITY_COPY        1
  25. #define GRAPHITY_READONLY    3    // note, not 2
  26.  
  27. #define GRAPHITY_BAR_GRAPH        0
  28. #define GRAPHITY_LINE_GRAPH        1
  29. #define GRAPHITY_AREA_GRAPH        2
  30. #define GRAPHITY_PIE_GRAPH        3
  31. #define GRAPHITY_SCATTER_GRAPH        4
  32. #define GRAPHITY_3DBAR_GRAPH        5
  33. #define GRAPHITY_3DAREA_GRAPH        6
  34. #define GRAPHITY_3DPIE_GRAPH        7
  35.  
  36. #define GRAPHITY_STOCK_GRAPH        8
  37. #define GRAPHITY_3DSCATTER_GRAPH    9
  38. #define GRAPHITY_COMBINED_GRAPH        10
  39.  
  40.  
  41. #define GRAPHITY_SERVER    "GraphityServer"
  42. #define GRAPHITY_NAME    "Graphity"
  43.  
  44. //
  45. // The Distributed Objects based API
  46. //
  47.  
  48.  
  49. @protocol GraphityRootInterface
  50. - API_openDocument:(const char *)path type:(in int)type;
  51. - API_newDocument;
  52. - API_quit;
  53. - API_hide;
  54. - API_unhide;
  55. @end
  56.  
  57.  
  58. @protocol GraphityDocumentInterface
  59. - API_addGraph:(int)type with:(const char *)name;
  60. - API_shapeDocument: (in NXRect *)aRect;
  61. - API_findGraphWithName:(const char *)name;
  62. - API_closeDocument:(in int)warn;
  63. - API_hideDocument;
  64. - API_unideDocument;
  65. - API_saveDocument:(const char *)path type:(in int)type;
  66. - API_saveDocument;
  67. @end
  68.  
  69.  
  70. @protocol GraphityGraphInterface
  71. - API_recalculate;
  72. - API_redisplay;
  73. - API_addRow:(const char *)label;
  74. - API_addSerie:(const char *)title;
  75. - API_setValueAt:(in int)row : (int)serie to:(in double)value;
  76. - API_setRowLabel:(const char *)label at:(in int)row;
  77. - API_setSerieTitle:(const char *)label at:(in int)serie;
  78. - API_setGraphType:(in int)type;
  79. - API_getRowCount:(out int *)rcount serieCount:(out int *)scount;
  80. - API_setFrame:(in NXRect *)aRect;
  81. - API_readDataFromFile:(in const char *)path;
  82. - API_readDataFromStream:(in NXStream *)stream;
  83. - API_setBackgroundColor:(in NXColor)c;
  84. - API_setBorderType:(in int)c;        
  85. @end
  86.  
  87.  
  88.  
  89.