home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / TBAR1 / TBAR1.HPP < prev    next >
Text File  |  1995-02-09  |  2KB  |  89 lines

  1. #ifndef _TBAR1_
  2. #define _TBAR1_
  3. #include <ifont.hpp>
  4. #include <iframe.hpp>
  5. #include <itbar.hpp>
  6. #include <itbarbut.hpp>
  7. #include <imle.hpp>
  8. #include <icmdhdr.hpp>
  9. #include <imenubar.hpp>
  10. #include <iflytext.hpp>
  11. #include <istattxt.hpp>
  12. #include <iflyhhdr.hpp>
  13. #include <icombobx.hpp>
  14. #include <iselhdr.hpp>
  15.  
  16. class Editor;
  17.  
  18. //-------------------------------------------------------------------
  19. // FontSelectHandler
  20. //
  21. // This class is used to handle selection of a new font from the font
  22. // combo box on the tool bar.
  23. //-------------------------------------------------------------------
  24. class FontSelectHandler : public ISelectHandler
  25. {
  26. public:
  27.   FontSelectHandler ( Editor& editor ) : editorFrame(editor) {}
  28.  
  29. protected:
  30. virtual Boolean 
  31.   enter ( IControlEvent& event );
  32.  
  33. private:
  34. Editor
  35.  &editorFrame;
  36. };
  37.  
  38. //-------------------------------------------------------------------
  39. // Editor
  40. //
  41. // This class is the main window of the sample problem.  It is
  42. // responsible for creating and managing all of the windows that
  43. // are used.
  44. //-------------------------------------------------------------------
  45. class Editor : public IFrameWindow,
  46.                public ICommandHandler
  47. {
  48. public:
  49.   Editor();
  50.  
  51. Boolean
  52.  command ( ICommandEvent& event );
  53.  
  54. IMultiLineEdit
  55.  &editorWindow ( ) { return editWindow; }
  56.  
  57. IFont
  58.  &editorFont ( ) { return editFont; }
  59.  
  60. private:
  61. IToolBar
  62.   toolBar;            
  63. IFlyText            
  64.   flyText;
  65. IStaticText
  66.   infoText;
  67. IFlyOverHelpHandler
  68.   flyHelpHandler;
  69. IMultiLineEdit
  70.   editWindow;
  71. FontSelectHandler
  72.   fontSelectHandler;
  73. IToolBarButton
  74.   cutButton,
  75.   copyButton,
  76.   pasteButton,
  77.   boldButton,
  78.   italicButton,
  79.   underscoreButton;
  80. IComboBox
  81.   fontCombo;
  82. IMenuBar
  83.   menu;
  84. IFont
  85.   editFont;
  86. };
  87.  
  88. #endif /* _TBAR1_ */
  89.