home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / intrvews / xgrab.lha / xgrab / include / helper.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  1.2 KB  |  64 lines

  1. /**
  2.    GRAB Graph Layout and Browser System
  3.  
  4.    Copyright (c) 1987, 1988, 1989 Stanford University
  5.    Copyright (c) 1989, Tera Computer Company
  6.  **/
  7.  
  8. #ifndef helper_h
  9. #define helper_h
  10.  
  11. #include <InterViews/scene.h>
  12.  
  13. // Declare imported types.
  14.  
  15. class ButtonState;
  16. class IMessage;
  17. class StringList;
  18. class Graphic;
  19. class TextEdit;
  20.  
  21. // A TextBox knows how to set its message and how
  22. // to pop up itself over the underlying Interactor.
  23.  
  24. class TextBox : public MonoScene 
  25. {
  26. public:
  27.     void SetUnderlying(Interactor*);
  28. protected:
  29.     TextBox(Interactor*, StringList* s, Graphic*);
  30.     ~TextBox();
  31.     void PopUp();
  32.     void Disappear();
  33.  
  34.     TextEdit* tedit;        // displays text
  35.     Interactor* underlying;    // we'll insert ourselves into its parent
  36. };
  37.  
  38. // A Pager displays a page of text
  39.  
  40. class Pager : public TextBox 
  41. {
  42. public:
  43.     Pager(Interactor*, StringList* s, Graphic*);
  44.     char Display();
  45. protected:
  46.     void Reconfig();
  47. };
  48.  
  49. static const maxhelppage = 6;
  50. static const maxline = 80;
  51.  
  52. class Helper 
  53. {
  54. public:
  55.     Helper(Interactor*, Graphic*);
  56.     void DoHelp();
  57. private:
  58.     Pager* helppagers[maxhelppage];
  59.     int currpage;
  60.     Pager* MakePager(int, Interactor*, Graphic*);
  61. };
  62.  
  63. #endif
  64.