home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / smarts / ioc / iclui.hpp < prev    next >
Encoding:
Text File  |  1996-02-21  |  2.7 KB  |  100 lines

  1. --------------------------------------------------------------------------------
  2. --
  3. -- COPYRIGHT:
  4. --   IBM WorkFrame - Project Smarts
  5. --   (C) Copyright International Business Machines Corporation 1996
  6. --   Licensed Material - Program-Property of IBM - All Rights Reserved.
  7. --   US Government Users Restricted Rights - Use, duplication, or disclosure
  8. --   restricted by GSA ADP Schedule Contract with IBM Corp.
  9. --
  10. --------------------------------------------------------------------------------
  11.  
  12. <include prologcp.tde>
  13.  
  14. #include <iframe.hpp>
  15. #include <ititle.hpp>
  16. #include <icmdhdr.hpp>
  17. #include <istring.hpp>
  18. #include <imenubar.hpp>
  19. #include <iinfoa.hpp>
  20. #include <imle.hpp>
  21.  
  22. class AppWindow;
  23.  
  24. /*************************************************/
  25. /* Class: AppCommandHandler                      */
  26. /*                                               */
  27. /* Purpose: Handle command events for the main   */
  28. /*          application window.  It subclasses   */
  29. /*          ICommandHandler.                     */
  30. /*************************************************/
  31. class AppCommandHandler : public ICommandHandler
  32. {
  33.   public:
  34.     AppCommandHandler( AppWindow* mainWindow );
  35.  
  36.   protected:
  37.     virtual Boolean command( ICommandEvent& event );
  38.  
  39.   private:
  40.     AppWindow* app;
  41. };
  42.  
  43.  
  44. /*************************************************/
  45. /* Class: AppWindow                              */
  46. /*                                               */
  47. /* Purpose: Main window for an ICLUI application.*/
  48. /*          It is a subclass of IFrameWindow.    */
  49. /*************************************************/
  50. class AppWindow : public IFrameWindow
  51. {
  52.   public:
  53.     // Constructor and destructor
  54.     //------
  55.     AppWindow( unsigned long windowId );
  56.     ~AppWindow();
  57.  
  58.     virtual Boolean
  59.       isHelpAvailable() const;
  60.  
  61.     AppWindow
  62.      &setStatus( const char * string ),
  63.      &setStatus( IResourceId string ),
  64.      &setFileName( const char * file ),
  65.      &productInfo(),
  66.      &enablePaste( Boolean which = true );
  67.  
  68.     IMultiLineEdit
  69.      *editor();
  70.  
  71.     Boolean
  72.       hasFileName();
  73.  
  74.     IString
  75.       fileName();
  76.  
  77.     IHelpWindow
  78.      *helpWin();
  79.  
  80.   private:
  81.     ITitle          title;        // Title bar
  82.  
  83.     IMenuBar        menuBar;      // Window menu bar
  84.  
  85.     IMultiLineEdit  mle;          // MLE as the client area
  86.  
  87.     IInfoArea       infoarea;     // Information text
  88.  
  89.     IHelpWindow*    help;         // Help window
  90.  
  91.     AppCommandHandler cmdHdr;     // Command handler
  92.  
  93.     IString         openFileName; // Name of file opened
  94.  
  95.     Boolean         hasHelp;      // Help available flag
  96.  
  97.     Boolean         hasFile;      // File name available flag
  98.  
  99.  };
  100.