home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / runnable / ibmc / ibmclass / icnrehdr.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-26  |  4.6 KB  |  102 lines

  1. #ifndef _ICNREHDR_
  2.   #define _ICNREHDR_
  3. /*******************************************************************************
  4. * FILE NAME: icnrehdr.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     ICnrEditHandler                                                          *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   (C) Copyright IBM Corporation 1992                                         *
  12. *   All Rights Reserved                                                        *
  13. *   Licensed Materials * Property of IBM                                       *
  14. *                                                                              *
  15. * HISTORY:                                                                     *
  16. * $Log:   R:/ibmclass/icnr/vcs/icnrehdr.hpv  $
  17. //
  18. //   Rev 1.6   26 Oct 1992 00:37:42   BOBLOVE
  19. //External Beta Release
  20. //
  21. //   Rev 1.5   25 Oct 1992 16:27:54   nunn
  22. //changed library name to ICLUI
  23. //
  24. //   Rev 1.4   25 Oct 1992 11:17:28   BOBLOVE
  25. //External Beta Release
  26. *                                                                              *
  27. *******************************************************************************/
  28.  
  29. #ifndef _IHANDLER_
  30.   #include <ihandler.hpp>
  31. #endif
  32.  
  33. #ifndef _ICNREEVT_
  34.   #include <icnreevt.hpp>
  35. #endif
  36.  
  37. class IHandlerWindow;
  38.  
  39. class ICnrEditHandler : public IHandler
  40. {
  41. /*******************************************************************************
  42. * This class handles direct editing of data in the container.                  *
  43. *******************************************************************************/
  44. public:
  45.  
  46. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  47. | There is only one way to construct instances of this class:                  |
  48. |   1. The default with no parameters.                                         |
  49. ------------------------------------------------------------------------------*/
  50. ICnrEditHandler();  
  51.  
  52. /*------------------------ EVENT PROCESSING FUNCTIONS --------------------------
  53. | These functions must be supplied by a derived class in order to provide      |
  54. | processing for an edit event.                                                |
  55. |   beginEdit      - An edit window has been opened in the container.          |
  56. |   reallocString  - Text has been modified in the container and storage needs |
  57. |                    to be reallocated.  If the data is an IString, the        |
  58. |                    reallocation is provided by the default behavior of this  |
  59. |                    function otherwise reallocation must be provided in the   |
  60. |                    subclass.                                                 |
  61. |   endEdit        - Editing has ended.  This is received after the            |
  62. |                    reallocString is dispatched.                              |
  63. ------------------------------------------------------------------------------*/
  64. virtual Boolean 
  65.   beginEdit(ICnrBeginEditEvent& evt),
  66.   reallocateString(ICnrReallocStringEvent& evt),
  67.   endEdit(ICnrEndEditEvent& evt),
  68.   isDataIString();
  69.  
  70. /*-------------------------------- ACCESSORS -----------------------------------
  71. | These functions provide means of getting and setting the accessible          |
  72. | attributes of instances of this class:                                       |
  73. |                                                                              |
  74. | setMLEHandler  - Store a handler to be added to the Multiline edit field     |
  75. |                  when it gets created.                                       |
  76. ------------------------------------------------------------------------------*/
  77. void 
  78.   setMLEHandler(IHandler* MLEHandler);
  79.  
  80. protected:
  81. /*----------------------------- IMPLEMENTATION ---------------------------------
  82. | These functions are used to implement the class:                             |
  83. | dispatchHandlerEvent - This function is responsible for routing the edit     |
  84. |                        events to the appropriate event functions.            |
  85. ------------------------------------------------------------------------------*/
  86. virtual Boolean 
  87.   dispatchHandlerEvent(IEvent& evt);
  88.  
  89.  
  90. private:
  91. IHandler
  92.  *_phdrMLE;
  93.  
  94. };
  95.  
  96. /* INLINES */
  97.  
  98. inline Boolean ICnrEditHandler ::  isDataIString()
  99.  {return true; }
  100.  
  101. #endif
  102.