home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ibmodf.zip / ODFRK.ZIP / OWINLSTS.HPP < prev   
Text File  |  1995-06-15  |  3KB  |  82 lines

  1. /* NOSHIP */
  2. #ifndef _OWINLSTS_
  3. #define _OWINLSTS_
  4. /*******************************************************************************
  5. * FILE NAME: owinlsts.hpp                                                      *
  6. *                                                                              *
  7. * DESCRIPTION:                                                                 *
  8. *   This file contains the definition of classes that are used to manage the   *
  9. *   collection of views in a model, and the collection of modeled controls in  *
  10. *   a view.                                                                    *
  11. *                                                                              *
  12. * COPYRIGHT:                                                                   *
  13. *   Licensed Materials - Property of IBM                                       *
  14. *   (C) Copyright IBM Corporation 1992, 1994                                   *
  15. *   All Rights Reserved                                                        *
  16. *   US Government Users Restricted Rights - Use, duplication, or               *
  17. *   disclosure                                                                 *
  18. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  19. *                                                                              *
  20. *******************************************************************************/
  21.  
  22. #ifndef _IKEYSET_H
  23.   #include <ikeyset.h>
  24. #endif
  25. #include <iwindow.hpp>
  26. #include <ireslock.hpp>
  27. #include <icontrol.hpp>
  28. //#include <icconst.h>             // needed for WS_VISIBLE, etc.
  29. //#include <odconst.h>             // OpenDoc Frk-specific exceptions, etc. Merge into icconst later.
  30. #include <iexcept.hpp>
  31.  
  32. //Forward declares
  33.  
  34. #pragma info(none)
  35.  
  36.  
  37. /*------------------------------------------------------------------------------
  38. | ODFWindowListElement class                                                   |
  39. ------------------------------------------------------------------------------*/
  40. class ODFWindowListElement : public IBase
  41. {
  42. public:
  43.   ODFWindowListElement (IWindow* aPwin, unsigned long aULong):
  44.         p_key(aULong), p_pwin(aPwin)  { }
  45.   ~ODFWindowListElement ( ) { }
  46. IWindow
  47.   *window ( )  {return p_pwin;}
  48. unsigned long
  49.   elementKey ( )  {return p_key;}
  50.  
  51. private:
  52.   unsigned long p_key;
  53.   IWindow* p_pwin;
  54.  
  55. // friend classes & functions
  56.   friend class ODFWindowList;
  57.   friend unsigned long const& key ( ODFWindowListElement* const& pElement );
  58. };
  59.  
  60. /*------------------------------------------------------------------------------
  61. | ODFWindowList class - used for both view list and modeled controls list      |
  62. ------------------------------------------------------------------------------*/
  63. class ODFWindowList : public IKeySet<ODFWindowListElement*, unsigned long>
  64. {
  65. public:
  66.   ODFWindowList ();
  67.   // Development Trace Support
  68.   ~ODFWindowList();
  69.  
  70. static IPrivateResource
  71.  &libraryKey();
  72.  
  73. static IPrivateResource
  74.   libKey;
  75.  
  76. };
  77.  
  78.  
  79. #pragma info(restore)
  80.  
  81. #endif // _OWINLSTS_
  82.