#if !defined( __MESSAGE_H )
#define __MESSAGE_H

#define Uses_TCollection
#define Uses_TScroller
#define Uses_TWindow
#define Uses_TListBox
#define Uses_TDialog
#include <tv.h>

#define cMessageViewer "\x09\x09\x0A\x0B\x0C"



class TMessageViewer : public TListBox
{

public:

    char *fileName;
    TCollection *fileLines;
    Boolean isValid;
    TMessageViewer( const TRect& bounds,
		 ushort aNumCols,
		 TScrollBar *aVScrollBar,
		 const char *aFileName
	       );
    ~TMessageViewer();
    TMessageViewer( StreamableInit ) : TListBox(streamableInit) { };
    void readFile( const char *fName );
    Boolean valid( ushort command );
    void handleEvent( TEvent& );
    void trackError( int );
    void update( const char *fName );
    void removeAll();
	virtual TPalette& getPalette() const;

private:

    virtual const char *streamableName() const
	{ return name; }

public:

    static const char * const name;
    static TStreamable *build();

};

class TMessageWindow : public TWindow
{

public:

    TMessageWindow( const char *fileName, const int winnum );

};

//const int maxLineLength = 256;

#endif

