/*
* textview.h
*
* Turbo Vision - Version 2.0
*
* Copyright (c) 1994 by Borland International
* All Rights Reserved.
*
* Modified by Sergio Sigala <ssigala@globalnet.it>
*/
#if defined( Uses_TTextDevice ) && !defined( __TTextDevice )
#define __TTextDevice
#include <iostream.h>
class TRect;
class TScrollBar;
class TTextDevice : public TScroller
{
public:
TTextDevice( const TRect& bounds,
TScrollBar *aHScrollBar,
TScrollBar *aVScrollBar
);
virtual int do_sputn( const char *s, int count ) = 0;
};
#endif // Uses_TTextDevice
#if defined( Uses_TTerminal ) && !defined( __TTerminal )
#define __TTerminal
class TRect;
class TScrollBar;
class TTerminal: public TTextDevice
{
public:
TTerminal( const TRect& bounds,
TScrollBar *aHScrollBar,
TScrollBar *aVScrollBar,
ushort aBufSize
);
~TTerminal();
virtual int do_sputn( const char *s, int count );
void bufInc( ushort& val );
Boolean canInsert( ushort amount );
short calcWidth();
virtual void draw();
ushort nextLine( ushort pos );
ushort prevLines( ushort pos, ushort lines );
Boolean queEmpty();
protected:
ushort bufSize;
char *buffer;
ushort queFront, queBack;
void bufDec(ushort& val);
#ifndef __UNPATCHED
ushort curLineWidth; // Added horizontal cursor tracking
#endif
};
#endif // Uses_TTerminal
#if defined( Uses_otstream ) && !defined( __otstream )
#define __otstream
#include <iostream.h>
class TerminalBuf: public streambuf
{
protected:
TTerminal *term;
public:
TerminalBuf(TTerminal *tt);
virtual int overflow( int = EOF );
virtual int sync();
};
/**
* @internal
*/
class otstream : public ostream
{
protected:
TerminalBuf buf;
public:
otstream( TTerminal *tt );
};
#endif
Documentation generated by sergio@athena.milk.it on Wed Feb 10 22:11:47 CET 1999