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

  1. #ifndef _IFILEHDR_
  2.   #define _IFILEHDR_
  3. /*******************************************************************************
  4. * FILE NAME: ifilehdr.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration of the classes:                         *
  8. *     IFileDialogHandler                                                       *
  9. *     IFileDialogEvent                                                         *
  10. *                                                                              *
  11. * COPYRIGHT:                                                                   *
  12. *   IBM Open Class Library                                                     *
  13. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  14. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  15. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #include <ievent.hpp>
  20. #include <ihandler.hpp>
  21.  
  22. class IFileDialog;
  23. class IString;
  24. class IFileDialogHandler;
  25.  
  26. #pragma pack(4)
  27.  
  28. class IFileDialogEvent : public IEvent {
  29. typedef IEvent
  30.   Inherited;
  31.  
  32. public:
  33. /*------------------------------- Constructors -------------------------------*/
  34.   IFileDialogEvent ( IEvent& event );
  35. virtual
  36.   ~IFileDialogEvent ( );
  37.  
  38. /*--------------------------- File Name Accessors ----------------------------*/
  39. IString
  40.   fileName         ( ) const;
  41. unsigned long
  42.   fileLength       ( ) const;
  43.  
  44. private:
  45. friend IFileDialogHandler;
  46. IString
  47.   fFileNameSelected;
  48. };
  49.  
  50.  
  51. class IFileDialogHandler : public IHandler {
  52. typedef IHandler
  53.   Inherited;
  54.  
  55. public:
  56. /*------------------------------- Constructors -------------------------------*/
  57.   IFileDialogHandler( );
  58. virtual
  59.   ~IFileDialogHandler ( );
  60.  
  61. /*---------------------------- Window Attachment -----------------------------*/
  62. virtual IFileDialogHandler
  63.   &handleEventsFor       ( IFileDialog* fileDialog ),
  64.   &stopHandlingEventsFor ( IFileDialog* fileDialog );
  65.  
  66. protected:
  67. /*----------------------------- Dispatch Events ------------------------------*/
  68. virtual Boolean
  69.   dispatchHandlerEvent ( IEvent& event );
  70.  
  71. /*---------------------------- File Dialog Events ----------------------------*/
  72. virtual Boolean
  73. #ifndef IC_WIN_FLAGNOP
  74.   filter          ( IFileDialogEvent& event   ),
  75.   filterName      ( const IString&    fileName,
  76.                     IFileDialog*      dialog       ),
  77. #endif
  78.   validate        ( IFileDialogEvent& event   ),
  79.   validateName    ( const IString&    fileName,
  80.                     IFileDialog*      dialog       ),
  81.   modelessResults ( IFileDialog*      endingDialog );
  82. virtual Boolean
  83.   modelessApply   ( IFileDialog*      modelessDialog,
  84.                     const IString&    appliedFileName );
  85.  
  86. private:
  87.  
  88. /*------------------------------ Hidden functions ---------------------------*/
  89. virtual IHandler
  90.  &handleEventsFor       ( IWindow* window  ),
  91.  &stopHandlingEventsFor ( IWindow* window  );
  92.  
  93. unsigned int
  94.   fRegisteredOkMsg;
  95. };
  96.  
  97. #pragma pack()
  98.  
  99. #endif /* _IFILEHDR_ */
  100.