home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / MSGTRACE.ZIP / MyProjects / MsgTrace / MsgTracer / OutputLine.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-30  |  3.2 KB  |  101 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // File        : OutputLine.h
  4. // Project     : MsgTrace
  5. // Component   : MsgTracer
  6. //---------------------------------------------------------------------------
  7. // Description : defines an output line
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10. //
  11. // SourceSafe Strings. Do not change.
  12. //---------------------------------------------------------------------------
  13. // $Author: jeskes $
  14. // $Date: $
  15. // $Revision: $
  16. //
  17. /////////////////////////////////////////////////////////////////////////////
  18.  
  19. #ifndef OUTPUTLINE_H
  20. #define OUTPUTLINE_H
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23.  
  24. class COutputLineFormat;
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27.  
  28. class COutputLine : public CString
  29. {
  30. //---------------------------------------------------------------------------
  31. // construction
  32. //---------------------------------------------------------------------------
  33. public:
  34.     COutputLine();
  35.     COutputLine( LPCSTR pszText );
  36.     COutputLine( const CString& sText );
  37.     COutputLine( const COutputLine& sToCopy );
  38.  
  39.     virtual ~COutputLine();
  40.  
  41. //---------------------------------------------------------------------------
  42. // operators
  43. //---------------------------------------------------------------------------
  44. public:
  45.     COutputLine& operator=( const COutputLine& aToCopy );
  46.     COutputLine& operator=( const CString& sToCopy );
  47.     COutputLine& operator=( LPCSTR lpszToCopy );
  48.  
  49. //---------------------------------------------------------------------------
  50. // format
  51. //---------------------------------------------------------------------------
  52. protected:
  53.     static COutputLineFormat m_aDefaultFormat;
  54.     COutputLineFormat* m_pFormat;
  55.     
  56. public:
  57.     void SetFormat( const COutputLineFormat& );
  58.     const COutputLineFormat& GetFormat() const;
  59. };
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62.  
  63. class COutputLineFormat : public CObject
  64. {
  65. //---------------------------------------------------------------------------
  66. // construction
  67. //---------------------------------------------------------------------------
  68. public:
  69.     COutputLineFormat();
  70.     COutputLineFormat( const COutputLineFormat& aToCopy );
  71.  
  72.     virtual ~COutputLineFormat();
  73.  
  74. //---------------------------------------------------------------------------
  75. // operators
  76. //---------------------------------------------------------------------------
  77. public:
  78.     COutputLineFormat& operator=( const COutputLineFormat& aToCopy );
  79.  
  80. //---------------------------------------------------------------------------
  81. // tab stops
  82. //---------------------------------------------------------------------------
  83. protected:
  84.     int m_nTabStops;
  85.         // number of tab stops
  86.  
  87.     int* m_pnTabStopPositions;
  88.         // array of tab stops
  89.  
  90. public:
  91.     void InitTabStops( int nTabStops = 0, const int* = NULL );
  92.     void SetTabStop( int nIndex, int nTabPos );
  93.  
  94.     int GetTabStops() const;
  95.     const int* GetTabStopPositions() const;
  96.     const int* GetTabStopPositionsPixel( const CDC& ) const;
  97. };
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100. #endif
  101.