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.

76 lines
2.1 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. *
  9. *
  10. */
  11. /* ---------------------------------------------------------------------- */
  12. /* class TMenuBar */
  13. /* */
  14. /* Palette layout */
  15. /* 1 = Normal text */
  16. /* 2 = Disabled text */
  17. /* 3 = Shortcut text */
  18. /* 4 = Normal selection */
  19. /* 5 = Disabled selection */
  20. /* 6 = Shortcut selection */
  21. /* ---------------------------------------------------------------------- */
  22. #if defined( Uses_TMenuBar ) && !defined( __TMenuBar )
  23. #define __TMenuBar
  24. class TRect;
  25. class TMenu;
  26. class TMenuBar : public TMenuView
  27. {
  28. public:
  29. TMenuBar( const TRect& bounds, TMenu *aMenu );
  30. TMenuBar( const TRect& bounds, TSubMenu &aMenu );
  31. ~TMenuBar();
  32. void computeLength();
  33. virtual void draw();
  34. virtual TRect getItemRect( TMenuItem *item );
  35. virtual void changeBounds(const TRect& bounds);
  36. #if !defined( NO_STREAM )
  37. private:
  38. virtual const char *streamableName() const
  39. { return name; }
  40. protected:
  41. TMenuBar( StreamableInit );
  42. public:
  43. static const char * const name;
  44. static TStreamable *build();
  45. #endif // NO_STREAM
  46. };
  47. #if !defined( NO_STREAM )
  48. inline ipstream& operator >> ( ipstream& is, TMenuBar& cl )
  49. { return is >> (TStreamable&)cl; }
  50. inline ipstream& operator >> ( ipstream& is, TMenuBar*& cl )
  51. { return is >> (void *&)cl; }
  52. inline opstream& operator << ( opstream& os, TMenuBar& cl )
  53. { return os << (TStreamable&)cl; }
  54. inline opstream& operator << ( opstream& os, TMenuBar* cl )
  55. { return os << (TStreamable *)cl; }
  56. #endif // NO_STREAM
  57. #endif // Uses_TMenuBar