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

  1. #ifndef _ICNREEVT_
  2.  #define _ICNREEVT_
  3. /*******************************************************************************
  4. * FILE NAME: icnreevt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     ICnrEditEvent                                                            *
  9. *     ICnrBeginEditEvent                                                       *
  10. *     ICnrEndEditEvent                                                         *
  11. *     ICnrReallocStringEvent                                                   *
  12. *                                                                              *
  13. * COPYRIGHT:                                                                   *
  14. *   IBM Open Class Library                                                     *
  15. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  16. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  17. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  18. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  19. *                                                                              *
  20. *******************************************************************************/
  21.  
  22. #include <icnrevt.hpp>
  23. #include <istring.hpp>
  24.  
  25. class IContainerObject;
  26. class IContainerControl;
  27. class IContainerColumn;
  28.  
  29. #pragma pack(4)
  30.  
  31. class ICnrEditEvent : public ICnrEvent {
  32. typedef ICnrEvent
  33.    Inherited;
  34.  
  35. public:
  36. /*------------------------ Constructors --------------------------------------*/
  37.   ICnrEditEvent  ( const IControlEvent& event);
  38.  
  39. virtual
  40.  ~ICnrEditEvent  ( );
  41.  
  42. /*----------------------------- Event Information ----------------------------*/
  43. Boolean
  44.   isTitleWindow() const;
  45. Boolean
  46.   isLeftDetailsHeading() const;
  47. Boolean
  48.   isRightDetailsHeading() const;
  49. Boolean
  50.   isDetailsData() const,
  51.   isLeftDetails() const;
  52. Boolean
  53.   isRightDetails() const;
  54.  
  55. virtual IContainerObject
  56.  *object()  const;
  57.  
  58. virtual IContainerColumn
  59.  *column()  const;
  60.  
  61. virtual IContainerControl
  62.  *container()  const;
  63.  
  64. protected:
  65. /*--------------------------------- Text -------------------------------------*/
  66. char
  67.  **textRef()  const;
  68.  
  69. unsigned long
  70.  textSize()   const;
  71.  
  72. };
  73.  
  74. class ICnrReallocStringEvent : public ICnrEditEvent {
  75. typedef ICnrEditEvent
  76.    Inherited;
  77.  
  78. public:
  79. /*------------------------ Constructors --------------------------------------*/
  80.   ICnrReallocStringEvent ( const IControlEvent& event);
  81.  
  82. virtual
  83.  ~ICnrReallocStringEvent ( );
  84.  
  85. /*----------------------------- Event Information ----------------------------*/
  86. virtual IString
  87.   currentText()  const,
  88.   newText()      const;
  89.  
  90. long
  91.   newTextSize()  const;
  92.  
  93. /*------------------------------ Text Allocation -----------------------------*/
  94. void
  95.   reallocateString();
  96. void
  97.   reallocateText();
  98. };
  99.  
  100.  
  101. class ICnrBeginEditEvent : public ICnrEditEvent {
  102. typedef ICnrEditEvent
  103.    Inherited;
  104.  
  105. public:
  106.  
  107. /*------------------------ Constructors --------------------------------------*/
  108.   ICnrBeginEditEvent ( const IControlEvent& event);
  109.  
  110. virtual
  111.  ~ICnrBeginEditEvent ( );
  112.  
  113. /*----------------------------- Event Information ----------------------------*/
  114. IString
  115.   currentText();
  116. };
  117.  
  118.  
  119. class ICnrEndEditEvent : public ICnrEditEvent {
  120. typedef ICnrEditEvent
  121.    Inherited;
  122.  
  123. public:
  124. /*------------------------ Constructors --------------------------------------*/
  125.   ICnrEndEditEvent ( const IControlEvent& evt);
  126.  
  127. virtual
  128.  ~ICnrEndEditEvent ( );
  129.  
  130. /*----------------------------- Event Information ----------------------------*/
  131. IString
  132.   newText(),
  133.   currentText();
  134.  
  135. private:
  136. /*-------------------------------- Private -----------------------------------*/
  137. friend class ICnrEditHandler;
  138. IString
  139.   strNewText;
  140. };
  141.  
  142. #pragma pack()
  143.  
  144. #endif
  145.