#if !defined( __HELP_H )
#define __HELP_H

#define Uses_TStreamable
#define Uses_ipstream
#define Uses_opstream
#define Uses_TObject
#define Uses_TPoint
#define Uses_TRect
#define Uses_TEvent
#define Uses_TScroller
#define Uses_TScrollBar
#define Uses_TWindow
#define Uses_fpstream
#include <tv.h>

#include "helpbase.h"

// THelpViewer

class THelpViewer : public TScroller
{
public:

    THelpViewer( const TRect&, TScrollBar*, TScrollBar*, THelpFile*, ushort, int);
    ~THelpViewer();

    virtual void changeBounds( TRect& );
    virtual void draw();
    virtual TPalette& getPalette() const;
    virtual void handleEvent( TEvent& );
    void makeSelectVisible( int, TPoint&, uchar&, int& );
    void switchToTopic( int, int, int, int );
    int checkCursTopic();
    void refreshMap();
    void execSpeedSearch();

    THelpFile *hFile;
    THelpTopic *topic;
    TPoint cursor;
    int selected;
    char *topicMap;
	char speedSearch[256];
};

// THelpWindow

class THelpWindow : public TWindow
{
public:

    THelpWindow( TRect&, THelpFile*, ushort );

    virtual TPalette& getPalette() const;
};


extern void notAssigned( opstream& s, int value );

extern TCrossRefHandler crossRefHandler;

#endif  // __HELP_H
