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

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //                      SAMPLE CODE
  3. //
  4. // FileName: ACDFVw1.hpp
  5. //
  6. // ClassName: ACompDocFwkView
  7. //
  8. // Description: Compound Document Framework (SimpleServer) View Header File
  9. //              This is a simple sample to demonstrate how to create a basic
  10. //              server application. The view class inherits from the IView
  11. //              class.
  12. //              The server has an entry field on the screen. This data
  13. //              is set to "Hello World" when the view is redrawn (drawContents)
  14. //              The view does not 'set' the model data only 'get'.
  15. //              
  16. ///////////////////////////////////////////////////////////////////////////////
  17. #ifndef _COMPDOCFWK_VIEW_
  18. #define _COMPDOCFWK_VIEW_
  19.  
  20. #ifdef IC_TRACE_DEVELOP
  21.     #include <itrace.hpp>
  22. #else
  23.     #define IFUNCTRACE_DEVELOP()
  24.     #define ITRACE_DEVELOP(x)
  25. #endif
  26.  
  27. #include <iview.hpp>
  28.  
  29. #include <ientryfd.hpp>
  30.  
  31. class ACompDocFwkModel;
  32.  
  33. class ACompDocFwkView : public IView  //Inherit from the View class
  34. {
  35. public:
  36.                                 ACompDocFwkView(IGUIBundle& );
  37.     virtual                     ~ACompDocFwkView();
  38.  
  39.     virtual void                initialize();
  40.  
  41.     // This is convenience function that downcast the model
  42.     virtual ACompDocFwkModel*   getModelPointer() const;
  43.  
  44.     virtual void                drawContents( IPresSpaceHandle&,
  45.                                             const IRectangle& invalidArea,
  46.                                             Boolean metaFile );
  47.  
  48. protected:
  49.                                 ACompDocFwkView(const ACompDocFwkView&);
  50.  
  51. private:
  52.     ACompDocFwkView&            operator=( const ACompDocFwkView& );
  53.  
  54.     IEntryField                 fDataEntryField;
  55. };
  56. #endif
  57.     
  58.     
  59.