home *** CD-ROM | disk | FTP | other *** search
- #ifndef _ITITLE_
- #define _ITITLE_
- /**************************************************************/
- /* FILE NAME: ititle.hpp */
- /* */
- /* DESCRIPTION: */
- /* Declaration of the class: */
- /* ITitle - manages the window title text */
- /* */
- /* COPYRIGHT: */
- /* Licensed Materials - Property of IBM */
- /* (c) Copyright IBM Corporation 1992, 1993 */
- /* US Government Users Restricted Rights - Use duplication */
- /* or disclosure restricted by GSA ADP Schedule Contract */
- /* with IBM Corp. */
- /* */
- /* $Log: G:/IBMCLASS/IBASEAPP/VCS/ITITLE.HPV $ */
- //
- // Rev 1.4 26 Oct 1992 10:00:12 HARPERSP
- // Updates for standardized header documentation.
- /* */
- /**************************************************************/
- #ifndef _ITEXTCTL_
- #include <itextctl.hpp>
- #endif
- #ifndef _IRESLIB_
- #include <ireslib.hpp>
- #endif
-
- // Forward declarations for other classes
- class ITitle; /* tle */
- class IWindow;
- class IWindowHandle;
- class IResourceId;
- class IString;
-
- class ITitle : public ITextControl
- {
- /**********************************************************************
- * The title consists of 3 components *
- * Object Text *
- * View Text *
- * View Number *
- * *
- * The Object Text is required while the other two are optional. *
- * *
- * The Object Text and View Text are separated by " - ". *
- * The View Text and View Number are separated by a colon. *
- * *
- * Example: *
- * *
- * OS/2 System - Icon View:2 *
- * *
- **********************************************************************/
-
- public:
-
- /*------------------ CONSTRUCTORS/DESTRUCTORS -------------------------
- | There are 2 ways to construct instances of this class: |
- | |
- | 1. From char* |
- | 2. From IResourceId's of STRINGTABLE items |
- | |
- ---------------------------------------------------------------------*/
-
- ITitle(const IWindow* pwinOwner,
- const char* pszObjName = 0,
- const char* pszViewName = 0,
- unsigned long ulViewNum = 0);
-
- ITitle(const IWindow* pwinOwner,
- const IResourceId& objNameResId,
- const IResourceId& viewNameResId = 0,
- unsigned long ulViewNum = 0);
-
- virtual ~ITitle() {;};
-
- /*---------------------- ACCESSORS ------------------------------------
- | objectText - return the objectText |
- | setObjectText - set the objectText |
- | viewText - return the viewText |
- | setViewText - set the viewText |
- | viewNum - return the viewNum |
- | setViewNum - set the viewNum |
- | setTitleText - set all 3 components at once |
- | |
- ---------------------------------------------------------------------*/
-
- IString objectText() const;
- void setObjectText(const char* pszObjName );
- void setObjectText(const IResourceId& objNameResId );
-
- IString viewText() const;
- void setViewText(const char* pszViewName);
- void setViewText(const IResourceId& viewNameResId);
-
- unsigned long viewNum() const;
- void setViewNum(unsigned long ulViewNum);
-
- // titleText() no longer needed.
- // Use ITextControl::text()
- // IString titleText() const;
-
- void setTitleText(const char* pszObjName,
- const char* pszViewName = 0,
- unsigned long ulViewNum = 0);
-
-
- void setTitleText(const IResourceId& objNameResId,
- const IResourceId& viewNameResId = 0,
- unsigned long ulViewNum = 0);
-
- /*----------------------- PRIVATE -----------------------------------*/
- private:
-
- ITitle(const ITitle& tleCopy) {;}
- const IWindow* pwinClOwner;
- };
- #endif /* ifndef _ITITLE_ */