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.

53 lines
1.2 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 Robert H�hne to be used for RHIDE.
  8. Modified by Salvador E. Tropea to allow dynamic status bars and i18n support.
  9. *
  10. *
  11. */
  12. #if defined( Uses_TStatusItem ) && !defined( __TStatusItem )
  13. #define __TStatusItem
  14. class TStatusItem
  15. {
  16. public:
  17. TStatusItem( const char *aText,
  18. ushort key,
  19. ushort cmd,
  20. TStatusItem *aNext = 0
  21. );
  22. ~TStatusItem() { DeleteArray(text); TVIntl::freeSt(intlText); };
  23. TStatusItem *next;
  24. const char *text;
  25. stTVIntl *intlText;
  26. ushort keyCode;
  27. ushort command;
  28. };
  29. inline TStatusItem::TStatusItem( const char *aText,
  30. ushort key,
  31. ushort cmd,
  32. TStatusItem *aNext
  33. ) :
  34. next( aNext ), keyCode( key ), command( cmd )
  35. {
  36. // SET: If we don't allocate a copy is imposible to have dynamic status
  37. // lines loaded from disk files or other similar stuff. Or if we does it
  38. // we leak.
  39. text=newStr(aText);
  40. intlText=NULL;
  41. }
  42. #endif // Uses_TStatusItem