You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1003 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Turbo Vision - Version 2.0
  3. *
  4. * Copyright (c) 1994 by Borland International
  5. * All Rights Reserved.
  6. *
  7. Modified by Robert H�hne to be used for RHIDE.
  8. *
  9. *
  10. */
  11. #if defined( Uses_TTerminal ) && !defined( __TTerminal )
  12. #define __TTerminal
  13. class TRect;
  14. class TScrollBar;
  15. class TTerminal: public TTextDevice
  16. {
  17. public:
  18. TTerminal( const TRect& bounds,
  19. TScrollBar *aHScrollBar,
  20. TScrollBar *aVScrollBar,
  21. uint32 aBufSize
  22. );
  23. virtual ~TTerminal();
  24. virtual int do_sputn( const char *s, int count );
  25. void bufInc(uint32& val) { if (++val>=bufSize) val=0; }
  26. Boolean canInsert( uint32 amount );
  27. short calcWidth();
  28. virtual void draw();
  29. uint32 nextLine( uint32 pos );
  30. uint32 prevLines( uint32 pos, uint32 lines );
  31. Boolean queEmpty();
  32. protected:
  33. uint32 bufSize;
  34. char *buffer;
  35. uint32 queFront, queBack;
  36. void bufDec(uint32& val) { if (val==0) val=bufSize - 1; else val--; }
  37. };
  38. #endif // Uses_TTerminal