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

  1. #ifndef _IFLYHHDR_
  2. #define _IFLYHHDR_
  3. /*******************************************************************************
  4. * FILE NAME: iflyhhdr.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IFlyOverHelpHandler                                                      *
  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 <ihandler.hpp>
  20. #include <istring.hpp>
  21.  
  22.  
  23. class IModuleHandle;
  24. class IWindowHandle;
  25. class ITextControl;
  26. class IFlyOverData;
  27. class IFlyText;
  28. class IResourceLibrary;
  29. class IResourceId;
  30.  
  31. #pragma pack(4)
  32.  
  33. class IFlyOverHelpHandler : public IHandler {
  34. typedef IHandler
  35.   Inherited;
  36.  
  37. public:
  38. /*------------------------------- Constructors -------------------------------*/
  39.   IFlyOverHelpHandler ( IFlyText*     flyText,
  40.                         unsigned long initialDelay = 100,
  41.                         unsigned long delay        = 100 );
  42.  
  43.  
  44.   IFlyOverHelpHandler ( ITextControl* longText,
  45.                         unsigned long initialDelay = 100,
  46.                         unsigned long delay        = 100 );
  47.  
  48.   IFlyOverHelpHandler ( IFlyText*     flyText,
  49.                         ITextControl* longText,
  50.                         unsigned long initialDelay = 100,
  51.                         unsigned long delay        = 100 );
  52.  
  53. virtual
  54.   ~IFlyOverHelpHandler ( );
  55.  
  56. /*--------------------- Querying and Setting Text Controls -------------------*/
  57. virtual IFlyOverHelpHandler
  58.  &setFlyTextControl   ( IFlyText*     flyText   ),
  59.  &setLongTextControl  ( ITextControl* longText  );
  60.  
  61. virtual IFlyText
  62.  *flyTextControl      ( ) const;
  63. virtual ITextControl
  64.  *longTextControl     ( ) const;
  65.  
  66.  
  67. /*----------------------------- Resource Library -----------------------------*/
  68. virtual IResourceLibrary
  69.  &resourceLibrary       ( ) const;
  70.  
  71. virtual IFlyOverHelpHandler
  72.  &setResourceLibrary    ( const IModuleHandle& resMod     ),
  73.  &setResourceLibrary    ( const char*          resDLLName );
  74.  
  75. /*--------------------------- String Table Offset ----------------------------*/
  76. virtual IFlyOverHelpHandler
  77.  &setFlyTextStringTableOffset ( long newOffset = 0 ),
  78.  &setLongStringTableOffset    ( long newOffset = 0 );
  79.  
  80. virtual long
  81.   flyTextStringTableOffset    ( ) const,
  82.   longStringTableOffset       ( ) const;
  83.  
  84. /*----------------------- Special Information Strings ------------------------*/
  85. virtual IFlyOverHelpHandler
  86.  &setDefaultText        ( unsigned long  identifier                ),
  87.  &setDefaultText        ( const IString& defaultText               );
  88.  
  89. virtual IString
  90.   defaultText           ( ) const;
  91.  
  92. /*----------------------- Dynamically Updating Help Text ---------------------*/
  93. virtual IFlyOverHelpHandler
  94.  &setHelpText           ( const IWindowHandle& handle,
  95.                           const IString&       flyText,
  96.                           const IString&       longText = IString()),
  97.  
  98.  &setHelpText           ( const IWindowHandle& handle,
  99.                           const IResourceId&   flyText,
  100.                           const IResourceId&   longText            ),
  101.  
  102.  &removeHelpText        ( const IWindowHandle& handle              );
  103.  
  104. virtual IString
  105.   flyHelpText           ( const IWindowHandle& handle              ) const,
  106.   longHelpText          ( const IWindowHandle& handle              ) const;
  107.  
  108. /*------------------------------ Timer Delay ---------------------------------*/
  109. virtual IFlyOverHelpHandler
  110.  &setDelayTime        ( unsigned long milliseconds = 100 );
  111.  
  112. virtual unsigned long
  113.   delayTime           ( ) const;
  114.  
  115. virtual IFlyOverHelpHandler
  116.  &setInitialDelayTime ( unsigned long milliseconds = 100 );
  117.  
  118. virtual unsigned long
  119.   initialDelayTime    ( ) const;
  120.  
  121. /*---------------------------- Event Dispatching -----------------------------*/
  122. virtual IFlyOverHelpHandler
  123.   &handleEventsFor        ( IWindow* window ),
  124.   &stopHandlingEventsFor  ( IWindow* window );
  125.  
  126. protected:
  127. /*---------------------------- Event Dispatching -----------------------------*/
  128. virtual Boolean
  129.   dispatchHandlerEvent( IEvent& event );
  130.  
  131. private:
  132. /*--------------------------------- Private ----------------------------------*/
  133. IFlyOverData
  134.   *fFlyOverData;
  135.  
  136. }; // IFlyOverHelpHandler
  137.  
  138. #pragma pack()
  139.  
  140. #endif // _IFLYHHDR_
  141.