home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sompar.zip / SOMPARTS.HPP < prev    next >
C/C++ Source or Header  |  1994-01-10  |  2KB  |  94 lines

  1. //
  2. // Project: Digitalk Parts like Toolbar and SOMObjects Demo
  3. // File:    Somparts.hpp
  4. // Author:  Stewart Hyde
  5. // Created: Dec   17, 1993
  6. // Updated: Jan   10, 1993
  7. //
  8. // Description:
  9. //
  10.  
  11. #ifndef _SOMPARTS_HPP_
  12.     #define _SOMPARTS_HPP_
  13.   
  14. #ifndef _IFRAME_
  15.   #include <iframe.hpp>
  16. #endif
  17.  
  18. #ifndef _ISTATTXT_
  19.   #include <istattxt.hpp>
  20. #endif
  21.  
  22. #ifndef _ICMDHDR_
  23.   #include <icmdhdr.hpp>
  24. #endif
  25.  
  26. #ifndef _IMENUBAR_
  27.   #include <imenubar.hpp>
  28. #endif
  29.  
  30. #ifndef _ITITLE_
  31.   #include <ititle.hpp>
  32. #endif
  33.  
  34. #ifndef _SOMACT_HPP_
  35.     #include "somact.hpp"
  36. #endif
  37.  
  38. class IString;
  39. class PartsWindow;
  40.  
  41. // ------------------------------------------------------------------------
  42. //  Class:            PartsWindow
  43. //  Derived:        IFrameWindow
  44. //                        ICommandHander
  45. //                
  46. //  Description:    This class describes the main application window in
  47. //                        this demo
  48. //
  49. // ------------------------------------------------------------------------
  50.  
  51.  
  52. class PartsWindow : public IFrameWindow,
  53.                     public ICommandHandler
  54. {
  55.     typedef IFrameWindow Inherited;
  56.       public:
  57.         PartsWindow(IWindow *parent, IWindow *owner=0);
  58.         ~PartsWindow();
  59.   
  60.   protected:
  61.         virtual Boolean command(ICommandEvent &evt);
  62.         void DoPartsNoteBook();
  63.        void DoPartsListBox();
  64.         void DoProdInformation();
  65.         void DSOM_DebugMessage(Boolean Status);
  66.            
  67.   private:
  68.         IStaticText clientWin;
  69.         IMenuBar    menuBar;
  70.         ITitle      title;
  71.         SomAction   *somAction;
  72.         Boolean        DebugStatus;
  73.  
  74.         // default exception handler class
  75.         class ExceptionHandler : public IWindow::ExceptionFn
  76.         {
  77.           public:
  78.                 virtual Boolean handleException(IException &exception, 
  79.                                               IEvent     &event);
  80.         };
  81.         ExceptionHandler                      excHandler;
  82. };
  83.  
  84. //
  85. // inline functions
  86. //
  87.  
  88. inline PartsWindow::~PartsWindow()
  89. {
  90.     delete somAction;
  91. }
  92.  
  93. #endif // _SOMPARTS_HPP_
  94.