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

  1. #ifndef _ITITLE_
  2.   #define _ITITLE_
  3. /**************************************************************/
  4. /* FILE NAME: ititle.hpp                                      */
  5. /*                                                            */
  6. /* DESCRIPTION:                                               */
  7. /*    Declaration of the class:                               */
  8. /*      ITitle - manages the window title text                */
  9. /*                                                            */
  10. /* COPYRIGHT:                                                 */
  11. /*   Licensed Materials - Property of IBM                     */
  12. /*   (c) Copyright IBM Corporation 1992, 1993                 */
  13. /*   US Government Users Restricted Rights - Use duplication  */
  14. /*   or disclosure restricted by GSA ADP Schedule Contract    */
  15. /*   with IBM Corp.                                           */
  16. /*                                                            */
  17. /* $Log:   G:/IBMCLASS/IBASEAPP/VCS/ITITLE.HPV  $                                                      */
  18. // 
  19. //    Rev 1.4   26 Oct 1992 10:00:12   HARPERSP
  20. // Updates for standardized header documentation.
  21. /*                                                            */
  22. /**************************************************************/
  23. #ifndef _ITEXTCTL_
  24. #include <itextctl.hpp>
  25. #endif
  26. #ifndef _IRESLIB_
  27. #include <ireslib.hpp>
  28. #endif
  29.  
  30. // Forward declarations for other classes
  31. class  ITitle;  /* tle */
  32. class  IWindow;
  33. class  IWindowHandle;
  34. class  IResourceId;
  35. class  IString;
  36.  
  37. class ITitle : public ITextControl
  38. {
  39. /**********************************************************************
  40. * The title consists of 3 components                                  *
  41. *    Object Text                                                      *
  42. *    View Text                                                        *
  43. *    View Number                                                      *
  44. *                                                                     *
  45. * The Object Text is required while the other two are optional.       *
  46. *                                                                     *
  47. * The Object Text and View Text are separated by " - ".               *
  48. * The View Text and View Number are separated by a colon.             *
  49. *                                                                     *
  50. * Example:                                                            *
  51. *                                                                     *
  52. *   OS/2 System - Icon View:2                                         *
  53. *                                                                     *
  54. **********************************************************************/
  55.  
  56.   public:
  57.  
  58. /*------------------ CONSTRUCTORS/DESTRUCTORS -------------------------
  59. |  There are 2 ways to construct instances of this class:             |
  60. |                                                                     |
  61. |  1. From char*                                                      |
  62. |  2. From IResourceId's of STRINGTABLE items                         |
  63. |                                                                     |
  64. ---------------------------------------------------------------------*/
  65.  
  66.      ITitle(const IWindow* pwinOwner,
  67.             const char* pszObjName = 0,
  68.             const char* pszViewName = 0,
  69.             unsigned long ulViewNum = 0);
  70.  
  71.      ITitle(const IWindow* pwinOwner,
  72.             const IResourceId& objNameResId,
  73.             const IResourceId& viewNameResId = 0,
  74.             unsigned long ulViewNum = 0);
  75.  
  76.      virtual ~ITitle() {;};
  77.  
  78. /*---------------------- ACCESSORS ------------------------------------
  79. | objectText - return the objectText                                  |
  80. | setObjectText - set the objectText                                  |
  81. | viewText - return the viewText                                      |
  82. | setViewText - set the viewText                                      |
  83. | viewNum - return the viewNum                                        |
  84. | setViewNum - set the viewNum                                        |
  85. | setTitleText - set all 3 components at once                         |
  86. |                                                                     |
  87. ---------------------------------------------------------------------*/
  88.  
  89.      IString       objectText() const;
  90.      void          setObjectText(const char* pszObjName );
  91.      void          setObjectText(const IResourceId& objNameResId );
  92.  
  93.      IString       viewText() const;
  94.      void          setViewText(const char* pszViewName);
  95.      void          setViewText(const IResourceId& viewNameResId);
  96.  
  97.      unsigned long viewNum() const;
  98.      void          setViewNum(unsigned long ulViewNum);
  99.  
  100. // titleText() no longer needed.
  101. // Use ITextControl::text()
  102. //     IString       titleText() const;
  103.  
  104.      void          setTitleText(const char* pszObjName,
  105.                                 const char* pszViewName = 0,
  106.                                 unsigned long ulViewNum = 0);
  107.  
  108.  
  109.      void          setTitleText(const IResourceId& objNameResId,
  110.                                 const IResourceId& viewNameResId = 0,
  111.                                 unsigned long ulViewNum = 0);
  112.  
  113. /*----------------------- PRIVATE -----------------------------------*/
  114.   private:
  115.  
  116.      ITitle(const ITitle& tleCopy) {;}
  117.      const IWindow*  pwinClOwner;
  118. };
  119. #endif  /* ifndef _ITITLE_ */
  120.