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.

82 lines
2.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. *
  9. *
  10. */
  11. /* ---------------------------------------------------------------------- */
  12. /* class TMenuBox */
  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_TMenuBox ) && !defined( __TMenuBox )
  23. #define __TMenuBox
  24. class TRect;
  25. class TMenu;
  26. class TMenuView;
  27. class TDrawBuffer;
  28. class TMenuBox : public TMenuView
  29. {
  30. public:
  31. TMenuBox( const TRect& bounds, TMenu *aMenu, TMenuView *aParentMenu);
  32. virtual void draw();
  33. virtual TRect getItemRect( TMenuItem *item );
  34. static char frameChars[];
  35. static char oframeChars[];
  36. static char rightArrow;
  37. static char orightArrow;
  38. private:
  39. void frameLine( TDrawBuffer&, short n );
  40. void drawLine( TDrawBuffer& );
  41. #if !defined( NO_STREAM )
  42. virtual const char *streamableName() const
  43. { return name; }
  44. protected:
  45. TMenuBox( StreamableInit );
  46. public:
  47. static const char * const name;
  48. static TStreamable *build();
  49. #endif // NO_STREAM
  50. };
  51. #if !defined( NO_STREAM )
  52. inline ipstream& operator >> ( ipstream& is, TMenuBox& cl )
  53. { return is >> (TStreamable&)cl; }
  54. inline ipstream& operator >> ( ipstream& is, TMenuBox*& cl )
  55. { return is >> (void *&)cl; }
  56. inline opstream& operator << ( opstream& os, TMenuBox& cl )
  57. { return os << (TStreamable&)cl; }
  58. inline opstream& operator << ( opstream& os, TMenuBox* cl )
  59. { return os << (TStreamable *)cl; }
  60. #endif // NO_STREAM
  61. #endif // Uses_TMenuBox