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

  1. #ifndef _ITITLE_
  2.   #define _ITITLE_
  3. /*******************************************************************************
  4. * FILE NAME: ititle.hpp                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *    Declaration of the class:                                                 *
  8. *      ITitle                                                                  *
  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 <itextctl.hpp>
  20. #include <ireslib.hpp>
  21.  
  22. class IString;
  23. class IColor;
  24. class ITitleData;
  25.  
  26. #pragma pack(4)
  27.  
  28. class ITitle : public ITextControl {
  29. typedef  ITextControl
  30.   Inherited;
  31. public:
  32. /*----------------------------- Constructors ---------------------------------*/
  33.   ITitle ( IWindow*           owner,
  34.            const char*        objectName = 0,
  35.            const char*        viewName   = 0,
  36.            unsigned long      viewNumber = 0);
  37.  
  38.   ITitle ( IWindow*           owner,
  39.            const IResourceId& objectName,
  40.            const IResourceId& viewName   = 0,
  41.            unsigned long      viewNumber = 0);
  42.  
  43. virtual
  44.   ~ITitle ( );
  45.  
  46. /*--------------------------- Text Processing --------------------------------*/
  47.  
  48. virtual ITitle
  49.  &setText    ( const char* text ),
  50.  &setText    ( const IResourceId& textResId );
  51.  
  52. virtual IString
  53.   text       ( ) const;
  54.  
  55. virtual unsigned long
  56.   textLength ( ) const;
  57.  
  58. /*--------------------------- Title Components -------------------------------*/
  59. virtual IString
  60.   objectText ( ) const,
  61.   viewText   ( ) const;
  62.  
  63. virtual ITitle
  64.  &setObjectText ( const char*       objectName ),
  65.  &setObjectText ( const IResourceId& objectNameResId ),
  66.  &setViewText   ( const char*       viewName ),
  67.  &setViewText   ( const IResourceId& viewNameResId ),
  68.  &setViewNumber ( unsigned long     viewNumber ),
  69.  &setTitleText  ( const char*       objectName,
  70.                   const char*       viewName          = 0,
  71.                   unsigned long     viewNum           = 0 ),
  72.  &setTitleText  ( const IResourceId& objectNameResId,
  73.                   const IResourceId& viewNameResId    = 0,
  74.                   unsigned long     viewNum           = 0 );
  75.  
  76. unsigned long
  77.   viewNumber() const;
  78.  
  79. /*--------------------------------- Colors -----------------------------------*/
  80. #ifndef IC_MOTIFWIN_FLAGNOP
  81. virtual IColor
  82.   borderColor                 () const,
  83.   activeColor                 () const,
  84.   inactiveColor               () const,
  85.   activeTextForegroundColor   () const,
  86.   activeTextBackgroundColor   () const,
  87.   inactiveTextForegroundColor () const,
  88.   inactiveTextBackgroundColor () const;
  89.  
  90. virtual ITitle
  91.   &setActiveTextForegroundColor     (const IColor& color),
  92.   &setActiveTextBackgroundColor     (const IColor& color),
  93.   &setInactiveTextForegroundColor   (const IColor& color),
  94.   &setInactiveTextBackgroundColor   (const IColor& color),
  95.   &resetActiveTextForegroundColor   (),
  96.   &resetActiveTextBackgroundColor   (),
  97.   &resetInactiveTextForegroundColor (),
  98.   &resetInactiveTextBackgroundColor ();
  99. #endif // IC_MOTIFWIN_FLAGNOP
  100.  
  101. /*----------------------- Notification Event Descriptions --------------------*/
  102. // Attribute Change Notifications
  103. static INotificationId const
  104. #ifndef IC_WIN_FLAGNOP
  105.   IC_IMPORTU activeTextForegroundColorId,
  106.   IC_IMPORTU activeTextBackgroundColorId,
  107.   IC_IMPORTU inactiveTextForegroundColorId,
  108.   IC_IMPORTU inactiveTextBackgroundColorId,
  109. #endif
  110.   IC_IMPORTU objectTextId,
  111.   IC_IMPORTU viewTextId,
  112.   IC_IMPORTU viewNumberId;
  113.  
  114. /*-------------------------- Observer Notification ---------------------------*/
  115. virtual ITitle
  116.   &enableNotification (Boolean enable = true);
  117.  
  118.  
  119. /*-------------------------------- Attributes --------------------------------*/
  120. virtual IWindow
  121.  *owner                     ( ) const;
  122.  
  123. virtual Boolean
  124.   isValid                   ( ) const;
  125.  
  126. virtual IWindowHandle
  127.   handle                    ( ) const;
  128.  
  129. virtual IRectangle
  130.   nativeRect                ( ) const;
  131.  
  132. virtual ISize
  133.   parentSize                ( ) const;
  134.  
  135. protected:
  136.  
  137. private:
  138. /*------------------------------ Hidden Members ------------------------------*/
  139.   ITitle       (const ITitle& title );
  140. ITitle
  141.  &operator=    (const ITitle& title );
  142.  
  143. /*--------------------------------- Private ----------------------------------*/
  144. IWindow
  145.  *pwinClOwner;
  146.  
  147. ITitleData
  148.  *fTitleData;
  149.  
  150. };
  151.  
  152. #pragma pack()
  153.  
  154. #endif  /* ifndef _ITITLE_ */
  155.