home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / ibmcli / itextctl.hp_ / ITEXTCTL.HPP
Encoding:
C/C++ Source or Header  |  1992-10-26  |  4.4 KB  |  96 lines

  1. #ifndef _ITEXTCTL_
  2.   #define _ITEXTCTL_
  3. /*******************************************************************************
  4. * FILE NAME: itextctl.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     Itextctl - This is an abstract base class for all text control window    *
  9. *                classes.                                                      *
  10. *                                                                              *
  11. * COPYRIGHT:                                                                   *
  12. *   Licensed Materials - Property of IBM                                       *
  13. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  14. *   All Rights Reserved                                                        *
  15. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. * $Log:   R:/IBMCLASS/IBASECTL/VCS/ITEXTCTL.HPV  $
  19. //
  20. //   Rev 1.10   25 Oct 1992 17:06:22   nunn
  21. //changed library name to ICLUI
  22. //
  23. //   Rev 1.9   25 Oct 1992 10:58:14   boezeman
  24. //Add documentation and converted file to skeleton.hpp format.
  25. //
  26. //   Rev 1.8   21 Oct 1992 14:32:22   greg
  27. //Removed virtual inheritance
  28.  
  29.       Rev 1.7   13 Oct 1992 21:22:42   tsuji
  30.    Correct comments around log directive.
  31.  
  32.       Rev 1.6   13 Oct 1992 20:58:04   tsuji
  33.    Correct log directive, remove IBM Confidential classification.
  34.  
  35.       Rev 1.5   13 Oct 1992 19:03:50   tsuji
  36.    Remove no-op virtual destructor, add Inherited typdef, change setTextColor
  37.    back to virtual function.
  38. *******************************************************************************/
  39. #ifndef _ICONTROL_
  40.   #include <icontrol.hpp>
  41. #endif
  42.  
  43. // Forward declarations for other classes:
  44. class ITextControl;  /* txtctl */
  45. class IString;
  46. class IResourceId;
  47. #ifndef _IBITFLAG_
  48.   #include <ibitflag.hpp>
  49. #endif
  50.  
  51.  
  52. //class ITextControl : public virtual IControl
  53. class ITextControl : public IControl  {
  54. /*******************************************************************************
  55. * This is an abstract base class for all text control window classes.  It      *
  56. * provides operations to manipulate the text string.  Controls which display   *
  57. * a single text string are subclassed from this abstract base class.           *
  58. *                                                                              *
  59. * This class cannot be constructed directly.                                   *
  60. *                                                                              *
  61. * EXAMPLE:                                                                     *
  62. *   <sample code>                                                              *
  63. *******************************************************************************/
  64. typedef IControl
  65.   Inherited;
  66. public:
  67.  
  68. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  69. | There is 1 way to construct instances of this class:                         |
  70. |   1. default                                                                 |
  71. ------------------------------------------------------------------------------*/
  72.   ITextControl() {;}
  73.                                   // need pure virtual function later
  74.  
  75. /*------------------------ QUERY/SET TEXT STRING -------------------------------
  76. |  setText  -  Sets the control window text.                                   |
  77. |  text     -  Returns the control window text.                                |
  78. ------------------------------------------------------------------------------*/
  79. void
  80.   setText(const char* text),
  81.   setText(const IResourceId& text);
  82. IString
  83.   text() const;
  84.  
  85. /*------------------------ QUERY/SET TEXT STRING -------------------------------
  86. |  setTextColor -  This operation changes the foreground color of the text.    |
  87. ------------------------------------------------------------------------------*/
  88. virtual void
  89.   setTextColor(const IColor& color);
  90.  
  91. private:
  92.   ITextControl(const ITextControl&);
  93. //    ITextControl& operator=(const ITextControl&);
  94. };  // class ITextControl
  95. #endif  // _ITEXTCTL_
  96.