home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / YellowBox / Kits / MiscTableScroll-138.1 / Palettes / MiscTableScroll / Framework / MiscExporter.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-31  |  4.1 KB  |  116 lines

  1. #ifndef __MiscExporter_h
  2. #define __MiscExporter_h
  3. //=============================================================================
  4. //
  5. //    Copyright (C) 1996-1997 by Paul S. McCarthy and Eric Sunshine.
  6. //        Written by Paul S. McCarthy and Eric Sunshine.
  7. //                All Rights Reserved.
  8. //
  9. //    This notice may not be removed from this source code.
  10. //
  11. //    This object is included in the MiscKit by permission from the authors
  12. //    and its use is governed by the MiscKit license, found in the file
  13. //    "License.rtf" in the MiscKit distribution.  Please refer to that file
  14. //    for a list of all applicable permissions and restrictions.
  15. //    
  16. //=============================================================================
  17. //-----------------------------------------------------------------------------
  18. // MiscExporter.h
  19. //
  20. //    Object that exports the contents of an MiscTableScroll in
  21. //    various useful formats.
  22. //
  23. //-----------------------------------------------------------------------------
  24. //-----------------------------------------------------------------------------
  25. // $Id: MiscExporter.h,v 1.5 97/04/15 08:57:36 sunshine Exp $
  26. // $Log:    MiscExporter.h,v $
  27. //  Revision 1.5  97/04/15  08:57:36  sunshine
  28. //  v0.125.8: Added "MiscTableScroll/" prefix to #import to facilitate new
  29. //  framework organization.
  30. //  
  31. //  Revision 1.4  97/03/10  10:27:52  sunshine
  32. //  v113.1: For OpenStep conformance, many 'col' methods rename to 'column'.
  33. //  
  34. //  Revision 1.3  97/02/07  13:53:31  sunshine
  35. //  v108: Ported to OPENSTEP 4.1 (gamma).
  36. //-----------------------------------------------------------------------------
  37. #import <MiscTableScroll/MiscTableTypes.h>
  38. MISC_TS_EXTERN_BEGIN( "Objective-C" )
  39. #import <Foundation/NSObject.h>
  40. MISC_TS_EXTERN_END
  41.  
  42. @class MiscTableScroll;
  43.  
  44. typedef enum
  45.     {
  46.     MISC_EXPORT_ASCII_FIXED,
  47.     MISC_EXPORT_ASCII_TAB,
  48.     MISC_EXPORT_ASCII_DELIMITED,
  49.     MISC_EXPORT_DBF
  50.     } MiscExportFormat;
  51.  
  52. #define    MISC_EXPORT_FORMAT_FIRST    MISC_EXPORT_ASCII_FIXED
  53. #define    MISC_EXPORT_FORMAT_LAST        MISC_EXPORT_DBF
  54. #define    MISC_EXPORT_FORMAT_DEFAULT    MISC_EXPORT_ASCII_FIXED
  55.  
  56.  
  57. typedef enum                // For ASCII formats only.
  58.     {
  59.     MISC_EXPORT_TITLES_OFF,        // No titles.
  60.     MISC_EXPORT_TITLES_ON,        // Full width, expand column if needed.
  61.     MISC_EXPORT_TITLES_WRAP,    // Wrap titles within data width.
  62.     MISC_EXPORT_TITLES_TRUNCATE,    // Truncate titles to data width.
  63.     } MiscExportTitleMode;
  64.  
  65. #define    MISC_EXPORT_TITLES_FIRST    MISC_EXPORT_TITLES_OFF
  66. #define    MISC_EXPORT_TITLES_LAST        MISC_EXPORT_TITLES_TRUNCATE
  67. #define    MISC_EXPORT_TITLES_ROW_DEFAULT    MISC_EXPORT_TITLES_OFF
  68. #define    MISC_EXPORT_TITLES_COL_DEFAULT    MISC_EXPORT_TITLES_ON
  69.  
  70.  
  71. typedef enum
  72.     {
  73.     MISC_EXPORT_GRID_OFF,        // No grid
  74.     MISC_EXPORT_GRID_LINE,        // Lines, col-grid='|', row-grid='-'
  75.     MISC_EXPORT_GRID_SPACE,        // Spaces col-grid=' ', row-grid=' '
  76.     } MiscExportGridMode;
  77.  
  78. #define    MISC_EXPORT_GRID_FIRST        MISC_EXPORT_GRID_OFF
  79. #define    MISC_EXPORT_GRID_LAST        MISC_EXPORT_GRID_SPACE
  80. #define    MISC_EXPORT_GRID_ROW_DEFAULT    MISC_EXPORT_GRID_OFF
  81. #define    MISC_EXPORT_GRID_COL_DEFAULT    MISC_EXPORT_GRID_LINE
  82.  
  83.  
  84. @interface MiscExporter : NSObject
  85.     {
  86.     MiscTableScroll*    tableScroll;    // Defaults
  87.     MiscExportFormat    exportFormat;    // MISC_EXPORT_ASCII_FIXED
  88.     MiscExportTitleMode    rowTitleMode;    // MISC_EXPORT_TITLES_OFF
  89.     MiscExportTitleMode    columnTitleMode;// MISC_EXPORT_TITLES_ON
  90.     MiscExportGridMode    rowGrid;    // MISC_EXPORT_GRID_OFF
  91.     MiscExportGridMode    columnGrid;    // MISC_EXPORT_GRID_LINE
  92.     }
  93.  
  94. - (id)init;
  95.  
  96. - (int)exportTableScroll:(MiscTableScroll*)ts;    // Run SavePanel.
  97. - (int)exportTableScroll:(MiscTableScroll*)ts toFilename:(NSString*)name;
  98.  
  99. - (void)setExportFormat:(MiscExportFormat)exportFormat;
  100. - (void)setRowExportTitleMode:(MiscExportTitleMode)rowTitleMode;
  101. - (void)setColumnExportTitleMode:(MiscExportTitleMode)columnTitleMode;
  102. - (void)setRowExportGridMode:(MiscExportGridMode)rowExportGridMode;
  103. - (void)setColumnExportGridMode:(MiscExportGridMode)columnExportGridMode;
  104.  
  105. - (MiscExportFormat)getExportFormat;
  106. - (MiscExportTitleMode)getRowExportTitleMode;
  107. - (MiscExportTitleMode)getColumnExportTitleMode;
  108. - (MiscExportGridMode)getRowExportGridMode;
  109. - (MiscExportGridMode)getColumnExportGridMode;
  110.  
  111. + (MiscExporter*)commonInstance;
  112.  
  113. @end
  114.  
  115. #endif // __MiscExporter_h
  116.