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

  1. #ifndef _IINFOA_
  2.   #define _IINFOA_
  3. /*******************************************************************************
  4. * FILE NAME: iinfoa.hpp                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IInfoArea                                                                *
  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. #include <istattxt.hpp>
  19. #include <imenuhdr.hpp>
  20. #include <istring.hpp>
  21.  
  22. class IFrameWindow;
  23. class IMenuEvent;
  24. class IModuleHandle;
  25. class IResourceLibrary;
  26. class IInfoAreaData;
  27.  
  28. #pragma pack(4)
  29. #pragma info(nocls)
  30.  
  31. class IInfoArea : public IStaticText, public IMenuHandler {
  32. typedef IStaticText
  33.   Inherited;
  34. public:
  35. /*------------------------------ Constructors --------------------------------*/
  36.   IInfoArea ( IFrameWindow*        frame,
  37.               unsigned long        id = 0 );
  38.   IInfoArea ( IFrameWindow*        frame,
  39.               unsigned long        id,
  40.               const char*          resDLLName );
  41.  
  42.   IInfoArea ( IFrameWindow*        frame,
  43.               const IModuleHandle& resMod,
  44.               unsigned long        id = 0 );
  45.   IInfoArea ( IFrameWindow*        frame,
  46.               const char*          resDLLName,
  47.               unsigned long        id = 0 );
  48.  
  49. virtual
  50.  ~IInfoArea ( );
  51.  
  52. /*----------------------------- Resource Library -----------------------------*/
  53. virtual IResourceLibrary
  54.  &resourceLibrary       ( ) const;
  55.  
  56. virtual IInfoArea
  57.  &setResourceLibrary    ( const IModuleHandle& resMod ),
  58.  &setResourceLibrary    ( const char*          resDLLName );
  59.  
  60. /*--------------------------- String Table Offset ----------------------------*/
  61. virtual long
  62.   stringTableOffset     ( ) const;
  63.  
  64. virtual IInfoArea
  65.  &setStringTableOffset  ( long newOffset = 0 );
  66.  
  67. /*----------------------- Special Information Strings ------------------------*/
  68. virtual IString
  69.   inactiveText          ( ) const,
  70.   disabledText          ( ) const,
  71.   missingText           ( ) const;
  72.  
  73. virtual IInfoArea
  74.  &setInactiveText       ( unsigned long  inactiveText ),
  75.  &setInactiveText       ( const IString& inactiveText ),
  76.  &setDisabledText       ( unsigned long  disabledText ),
  77.  &setDisabledText       ( const IString& disabledText ),
  78.  &setMissingText        ( unsigned long  missingText ),
  79.  &setMissingText        ( const IString& missingText );
  80.  
  81. /*------------------------------- Display Size -------------------------------*/
  82. virtual unsigned long
  83.   lineCount             ( ) const;
  84. virtual IInfoArea
  85.  &setLineCount          ( unsigned long lines = 1 );
  86.  
  87. /*-------------------------- Event Dispatching -------------------------------*/
  88. virtual IInfoArea
  89.  &handleEventsFor       ( IFrameWindow* frame ),
  90.  &stopHandlingEventsFor ( IFrameWindow* frame );
  91.  
  92. /*--------------------------- Notification Members ---------------------------*/
  93. // Attribute Change Notifications
  94. static INotificationId const
  95.   IC_IMPORTU inactiveTextId,
  96.   IC_IMPORTU disabledTextId,
  97.   IC_IMPORTU missingTextId,
  98.   IC_IMPORTU resourceLibraryId;
  99.  
  100. protected:
  101. /*---------------------------- Event Dispatching -----------------------------*/
  102. virtual Boolean
  103.   dispatchHandlerEvent(IEvent& event);
  104.  
  105. /*---------------------- Information String Processing -----------------------*/
  106. virtual IString
  107.   informationFor        ( unsigned long menuId ) const;
  108.  
  109. /*-------------------------- Menu Event Processing----------------------------*/
  110. virtual Boolean
  111.   menuSelected          ( IMenuEvent& menuEvent ),
  112.   menuEnded             ( IMenuEvent& menuEvent );
  113.  
  114. /*----------------------------- Layout Support -------------------------------*/
  115. virtual ISize
  116.   calcMinimumSize       ( ) const;
  117.  
  118. private:
  119. /*----------------------------- Hidden Members -------------------------------*/
  120.   IInfoArea  ( const IInfoArea& infoArea );
  121. IInfoArea
  122.  &operator=  ( const IInfoArea& infoArea );
  123.  
  124. /*--------------------------------- Private ----------------------------------*/
  125. virtual IHandler
  126.  &handleEventsFor       ( IWindow* window ),
  127.  &stopHandlingEventsFor ( IWindow* window );
  128.  
  129. enum IAStatus
  130.   {
  131.   noneShowing,
  132.   missingShowing,
  133.   inactiveShowing,
  134.   disabledShowing
  135.   };
  136. void
  137.   setString             ( IString&, unsigned long ),
  138.   addTo                 ( IFrameWindow* ),
  139.   showText              ( IAStatus newStatus, const IString& text );
  140. IAStatus
  141.   status;
  142. IResourceLibrary
  143.  *pResLib;
  144. long
  145.   strTblOffset;
  146. unsigned long
  147.   numberOfLines;
  148. IString
  149.   inactive,
  150.   disabled,
  151.   missing;
  152. Boolean
  153.   preventFlyUpdate;
  154.  
  155. IInfoAreaData
  156.  *fInfoAreaData;
  157. }; // class IInfoArea
  158.  
  159. #pragma info(restore)
  160. #pragma pack()
  161.  
  162. #endif /* _IINFOA_ */
  163.