home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / smarts / ole / wizview.ct < prev    next >
Encoding:
Text File  |  1996-02-21  |  2.9 KB  |  101 lines

  1. --------------------------------------------------------------------------------
  2. -- FILE NAME: WIZVIEW.CT
  3. --
  4. -- DESCRIPTION:
  5. --   OLE Compound Document Framework View file template
  6. --
  7. -- COPYRIGHT:
  8. --   IBM WorkFrame - Project Smarts
  9. --   (C) Copyright International Business Machines Corporation 1996
  10. --   Licensed Material - Program-Property of IBM - All Rights Reserved.
  11. --   US Government Users Restricted Rights - Use, duplication, or disclosure
  12. --   restricted by GSA ADP Schedule Contract with IBM Corp.
  13. --
  14. --------------------------------------------------------------------------------
  15. <include wizclass.ct>
  16. --------------------------------------------------------------------------------
  17. -- View template
  18. --------------------------------------------------------------------------------
  19. <code VIEW>
  20. <define CLASS_NAME>$VIEW_CLASS_NAME$\</define>
  21. <define COPY_INIT>
  22. IView(copy)\<>
  23. </define COPY_INIT>
  24. <define NO_DEF_CONSTRUCT>t\</define>
  25. <define NO_COPY_CONSTRUCT>t\</define>
  26. $STANDARD_OPERATIONS$
  27. <define CLASS_MEMBERS>
  28. -- No streaming this is redundant!! <define NO_DEF_CONSTRUCT>t\</define>
  29. $VIEW_CLASS_NAME$::$VIEW_CLASS_NAME$( $BUNDLE_CLASS_NAME$& bundle )
  30. : IView( bundle ),
  31.   fCommandHandler( *this, handleCommand )
  32. {
  33. }
  34.  
  35. void
  36. $VIEW_CLASS_NAME$::initialize()
  37. {
  38.     $VIEW_SUPER_CLASS$::initialize();
  39.  
  40.     /////////////////////////////////////////
  41.     //  ADD initialization code here
  42.     /////////////////////////////////////////
  43.  
  44.     fCommandHandler.handleEventsFor( this );
  45. }
  46.  
  47. void
  48. $VIEW_CLASS_NAME$::finalize()
  49. {
  50.     fCommandHandler.stopHandlingEventsFor( this );
  51.  
  52.     /////////////////////////////////////////
  53.     //  ADD finalization code here
  54.     /////////////////////////////////////////
  55.  
  56.     $VIEW_SUPER_CLASS$::finalize();
  57. }
  58.  
  59. Boolean
  60. $VIEW_CLASS_NAME$::handleCommand( ICommandEvent& cmdEvent )
  61. {
  62.     /////////////////////////////////////////
  63.     //  ADD Event Processing here
  64.     /////////////////////////////////////////
  65.  
  66.     return false;
  67. }
  68.  
  69. void
  70. $VIEW_CLASS_NAME$::drawContents( IPresSpaceHandle& ps, const IRectangle&, Boolean )
  71. {
  72.     /////////////////////////////////////////
  73.     //  ADD Drawing of your view here
  74.     /////////////////////////////////////////
  75. }
  76.  
  77. </define>
  78. </code VIEW>
  79.  
  80. --------------------------------------------------------------------------------
  81. -- DocumentComponentView direct subclass template
  82. --------------------------------------------------------------------------------
  83. <code DOCUMENT_VIEW>
  84. <define CLASS_SUPERS>ITDocumentComponentView\</define>
  85. $VIEW$\<>
  86. </code DOCUMENT_VIEW>
  87.  
  88. --------------------------------------------------------------------------------
  89. -- A list of views
  90. --------------------------------------------------------------------------------
  91. <code DOCUMENT_VIEW_CLASSES>
  92. <define VIEW_SUPER_CLASS>
  93. IView\<>
  94. </define>
  95. <define BUNDLE_CLASS_NAME>
  96. IGUIBundle\<>
  97. </define BUNDLE_CLASS_NAME>
  98. $DOCUMENT_VIEW$\<>
  99. $CLASS$\<>
  100. </code DOCUMENT_VIEW>
  101.