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.

126 lines
2.9 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. #if defined( Uses_TGroup ) && !defined( __TGroup )
  12. #define __TGroup
  13. class TGroup : public TView
  14. {
  15. public:
  16. friend void genRefs();
  17. TGroup( const TRect& bounds );
  18. ~TGroup();
  19. virtual void shutDown();
  20. ushort execView( TView *p );
  21. virtual ushort execute();
  22. void insertView( TView *p, TView *Target );
  23. void remove( TView *p );
  24. void removeView( TView *p );
  25. void resetCurrent();
  26. void setCurrent( TView *p, selectMode mode );
  27. void selectNext( Boolean forwards );
  28. TView *firstThat( Boolean (*func)( TView *, void * ), void *args );
  29. void forEach( void (*func)( TView *, void * ), void *args );
  30. void insert( TView *p );
  31. void insertBefore( TView *p, TView *Target );
  32. TView *current;
  33. TView *at( short index );
  34. TView *firstMatch( ushort aState, ushort aOptions );
  35. short indexOf( TView *p );
  36. Boolean matches( TView *p );
  37. TView *first();
  38. virtual void setState( ushort aState, Boolean enable );
  39. virtual void handleEvent( TEvent& event );
  40. void drawSubViews( TView *p, TView *bottom );
  41. virtual void changeBounds( const TRect& bounds );
  42. virtual uint32 dataSize();
  43. virtual void getData( void *rec );
  44. virtual void setData( void *rec );
  45. virtual void draw();
  46. void redraw();
  47. void Redraw();
  48. void lock();
  49. void unlock();
  50. virtual void resetCursor();
  51. // SET: A view should ask your owner (a group) if that's right
  52. // time to show the cursor or we are locked.
  53. virtual Boolean canShowCursor();
  54. virtual void endModal( ushort command );
  55. virtual void eventError( TEvent& event );
  56. virtual ushort getHelpCtx();
  57. virtual Boolean valid( ushort command );
  58. void freeBuffer();
  59. void getBuffer();
  60. TView *last;
  61. TRect clip;
  62. phaseType phase;
  63. ushort *buffer;
  64. uchar lockFlag;
  65. ushort endState;
  66. private:
  67. Boolean invalid( TView *p, ushort command );
  68. void focusView( TView *p, Boolean enable );
  69. void selectView( TView *p, Boolean enable );
  70. #if !defined( NO_STREAM )
  71. virtual const char *streamableName() const
  72. { return name; }
  73. protected:
  74. TGroup( StreamableInit );
  75. virtual void write( opstream& );
  76. virtual void *read( ipstream& );
  77. public:
  78. static const char * const name;
  79. static TStreamable *build();
  80. #endif // NO_STREAM
  81. };
  82. #if !defined( NO_STREAM )
  83. inline ipstream& operator >> ( ipstream& is, TGroup& cl )
  84. { return is >> (TStreamable&)cl; }
  85. inline ipstream& operator >> ( ipstream& is, TGroup*& cl )
  86. { return is >> (void *&)cl; }
  87. inline opstream& operator << ( opstream& os, TGroup& cl )
  88. { return os << (TStreamable&)cl; }
  89. inline opstream& operator << ( opstream& os, TGroup* cl )
  90. { return os << (TStreamable *)cl; }
  91. #endif // NO_STREAM
  92. #endif // Uses_TGroup