@17140@
@13830@
@13245@
@13635@
@13440@
@13245@

Modified by Robert H”hne to be used for RHIDE.

@13245@
@13245@
@14024@

#if defined( Uses_TFileViewer ) && !defined( __TFileViewer )
#define __TFileViewer

@16849@

const hlChangeDir = cmChangeDir;

const unsigned short
          hcFileViewer     = 599,
          cmSaveFile       = 598,
          cmFileViewAnswer = 599; // I hope this conflicts with
                                  // nothing else

class TLineCollection : public TCollection
@23372@

@21035@

    TLineCollection(ccIndex lim, ccIndex delta) : TCollection(lim, delta) {}
    virtual void  freeItem(void *p) { delete p; }

#if !defined( NO_STREAM )
@20890@

    virtual void *readItem( ipstream& ) { return 0; }
    virtual void writeItem( void *, opstream& ) {}
#endif // NO_STREAM
    friend class TFileViewer;

@24833@

class TFileViewer : public TScroller
@23372@

@21035@

    char *fileName;
@06398@
    TFileViewer( const TRect& bounds,
@01403@
                 TScrollBar *aVScrollBar,
                 const char *aFileName
@02113@
    ~TFileViewer();
#if !defined( NO_STREAM )
    TFileViewer( StreamableInit ) : TScroller(streamableInit) { };
#endif // NO_STREAM
    void draw();
    void readFile( const char *fName );
    virtual void saveFile(const char *fName);
    virtual void handleEvent(TEvent &);
    void setState( ushort aState, Boolean enable );
    void scrollDraw();
    virtual void changeBounds(const TRect &);
    Boolean valid( ushort command );
    void insertLine(const char *line);
    const char * const operator [] (int index);
    int Count() { return count; }

@20890@

/* I have moved the fileLines in the private section, because
   I'm using now a faster way for the FileViewer in which the user
   is not allowed to insert or delete a line from the fileLines.
   For inserting a line use the TFileViewer::insertLine.
   For accessing the lines use TFileViewer::operator []
@17080@
    TLineCollection *fileLines;
@07524@
    int real_bufsize;

@20938@

    const char * const getBuffer() { return buffer; }
    int getBufsize() { return real_bufsize; }

@09222@
@09113@

#if !defined( NO_STREAM )
@20890@
@11444@
@05648@

@20938@
@11784@
@11541@

@21035@

@10762@
@10665@
#endif // NO_STREAM
@24833@

class TFileWindow : public TWindow
@23372@

@21035@

    TFileWindow( const char *fileName );

@24833@

@15582@

