home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / acdf4 / acdfvw4.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  1.9 KB  |  60 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //                                              SAMPLE CODE
  3. //
  4. // FileName: ACDFVw4.hpp
  5. //
  6. // ClassName: ACompDocFwkView
  7. //
  8. // Description: Compound Document Framework (SimpleContainer) View
  9. //              This is a container view which inherits from IView.
  10. //              This sample illustrates how the embedded object can be
  11. //              manipulated (shrink and grow)  on the screen. It also 
  12. //              shows how to programmatically select,unselect and launch the 
  13. //              embedded objects.                
  14. ///////////////////////////////////////////////////////////////////////////////
  15. #ifndef _COMPDOCFWK_VIEW_
  16. #define _COMPDOCFWK_VIEW_
  17.  
  18. #ifdef IC_TRACE_DEVELOP
  19.     #include <itrace.hpp>
  20. #else
  21.     #define IFUNCTRACE_DEVELOP()
  22.     #define ITRACE_DEVELOP(x)
  23. #endif
  24.  
  25. #include <iview.hpp>
  26.  
  27. #include <icmdhdr.hpp>
  28.  
  29. class ACompDocFwkModel;
  30.  
  31. class ACompDocFwkView : public IView  // Inherit from IView class
  32. {
  33. public:
  34.                                 ACompDocFwkView(IGUIBundle& );
  35.     virtual                     ~ACompDocFwkView();
  36.  
  37.     virtual void                initialize();
  38.  
  39.     // This is convenience function that downcast the model
  40.     virtual ACompDocFwkModel*   getModelPointer() const;
  41.  
  42.     virtual void                drawContents(IPresSpaceHandle& hdl,
  43.                                              const IRectangle& invalidArea,
  44.                                              Boolean metaFile);
  45.  
  46.             void                handleSelectAll(Boolean );
  47.  
  48. protected:
  49.     // handle functions
  50.     virtual Boolean            handleCommand(ICommandEvent&);
  51.  
  52.                                 ACompDocFwkView(const ACompDocFwkView&);
  53.  
  54. private:
  55.     ACompDocFwkView&            operator=( const ACompDocFwkView& );
  56.     // All the handlers 
  57.     ICommandConnectionTo<ACompDocFwkView>   fCommandHandler;
  58. };
  59. #endif
  60.