home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / icnrehdr.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.1 KB  |  92 lines

  1. #ifndef _ICNREHDR_
  2. #define _ICNREHDR_
  3. /*******************************************************************************
  4. * FILE NAME: icnrehdr.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     ICnrEditHandler                                                          *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18.  
  19. #include <ihandler.hpp>
  20. #include <icnreevt.hpp>
  21.  
  22. class IHandlerWindow;
  23. class IWindowHandle;
  24. class IMultiLineEdit;
  25.  
  26. #pragma pack(4)
  27.  
  28. class ICnrEditHandler : public IHandler {
  29. typedef IHandler
  30.    Inherited;
  31.  
  32. public:
  33. /*----------------------- Related Members ------------------------------------*/
  34. enum StringType {
  35.   isIString,
  36.   isCharacterPointer
  37.   };
  38.  
  39.  
  40. /*-------------------------- Constructors ------------------------------------*/
  41.   ICnrEditHandler    (StringType   stringType = isIString);
  42. virtual
  43.  ~ICnrEditHandler    ( );
  44.  
  45. /*-------------------------- Event Processing --------------------------------*/
  46. virtual Boolean
  47.   beginEdit            ( ICnrBeginEditEvent&     event),
  48.   reallocateString     ( ICnrReallocStringEvent& event),
  49.   endEdit              ( ICnrEndEditEvent&       event);
  50.  
  51. Boolean
  52.   isDataIString        ( )  const;
  53.  
  54. /*---------------------------- Event Dispatching -----------------------------*/
  55. virtual ICnrEditHandler
  56.  &handleEventsFor       ( IContainerControl* container ),
  57.  &stopHandlingEventsFor ( IContainerControl* container );
  58.  
  59.  
  60. /*---------------------------- Multiple-Line Edit Processing -----------------*/
  61. virtual void
  62.   setMLEHandler        ( IHandler*  anMLEHandler);
  63.  
  64. virtual IMultiLineEdit
  65.  *multiLineEdit        ( const IWindowHandle& handleMultiLineEdit);
  66.  
  67. IHandler
  68.  *mleHandler           ( ) const;
  69.  
  70. protected:
  71. /*-------------------------- Event Dispatching -------------------------------*/
  72. virtual Boolean
  73.   dispatchHandlerEvent ( IEvent& event);
  74.  
  75.  
  76. private:
  77. IHandler
  78.  *_phdrMLE;
  79. int _stringType;
  80.  
  81. /*--------------------------- Hidden Members ---------------------------------*/
  82. virtual IHandler
  83.  &handleEventsFor       ( IWindow* window  ),
  84.  &stopHandlingEventsFor ( IWindow* window  );
  85. };
  86.  
  87. #pragma pack()
  88.  
  89.   #include <icnrehdr.inl>
  90.  
  91. #endif
  92.