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.

64 lines
1.8 KiB

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 Salvador E. Tropea (SET) for RHTVision port.
  8. *
  9. */
  10. /* ---------------------------------------------------------------------- */
  11. /* class TParamText */
  12. /* */
  13. /* Palette layout */
  14. /* 1 = Text */
  15. /* ---------------------------------------------------------------------- */
  16. #if defined( Uses_TParamText ) && !defined( __TParamText )
  17. #define __TParamText
  18. class TRect;
  19. const int tparamTextMaxLen=256;
  20. #define SAFE_CODE 1 // Don't corrupt memory if tparamTextMaxLen is small
  21. class TParamText : public TStaticText
  22. {
  23. public:
  24. TParamText( const TRect& bounds );
  25. ~TParamText();
  26. virtual void getText( char *str, int maxLen );
  27. virtual void setText( char *fmt, ... );
  28. virtual int getTextLen();
  29. protected:
  30. char *str;
  31. #if !defined( NO_STREAM )
  32. private:
  33. virtual const char *streamableName() const
  34. { return name; }
  35. protected:
  36. TParamText( StreamableInit );
  37. public:
  38. static const char * const name;
  39. static TStreamable *build();
  40. #endif
  41. };
  42. #if !defined( NO_STREAM )
  43. inline ipstream& operator >> ( ipstream& is, TParamText& cl )
  44. { return is >> (TStreamable&)cl; }
  45. inline ipstream& operator >> ( ipstream& is, TParamText*& cl )
  46. { return is >> (void *&)cl; }
  47. inline opstream& operator << ( opstream& os, TParamText& cl )
  48. { return os << (TStreamable&)cl; }
  49. inline opstream& operator << ( opstream& os, TParamText* cl )
  50. { return os << (TStreamable *)cl; }
  51. #endif // NO_STREAM
  52. #endif // Uses_TParamText