dtinfo subtree dtinfo
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Managers / LibraryMgr.hh
1 /*
2  * $XConsortium: LibraryMgr.hh /main/5 1996/09/17 09:18:18 cde-hal $
3  *
4  * Copyright (c) 1991 HaL Computer Systems, Inc.  All rights reserved.
5  * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
6  * States.  Use of a copyright notice is precautionary only and does not
7  * imply publication or disclosure.
8  * 
9  * This software contains confidential information and trade secrets of HaL
10  * Computer Systems, Inc.  Use, disclosure, or reproduction is prohibited
11  * without the prior express written permission of HaL Computer Systems, Inc.
12  * 
13  *                         RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the Government is subject to
15  * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
16  * Technical Data and Computer Software clause at DFARS 252.227-7013.
17  *                        HaL Computer Systems, Inc.
18  *                  1315 Dell Avenue, Campbell, CA  95008
19  * 
20  */
21
22 # include "UAS.hh"
23
24 class OutlineList;
25 class LibraryAgent;
26 class OutlineElement;
27
28 class LibraryMgr : public Long_Lived
29 {
30 public: // functions
31   LibraryMgr();
32   ~LibraryMgr();
33
34   // Display a new top-level entry (not copied from existing window) 
35   void display (UAS_Pointer<UAS_Common> &);
36   // Display a "detached" part of an existing window
37   void display (OutlineElement *subtree);
38   void undisplay (OutlineElement *root);
39   void remove (UAS_Pointer<UAS_Common> lib);
40
41   OutlineList *library();
42
43   // How the Node mgr notifies us of other toplevel windows being visible
44   void windows_notify (bool visible);
45
46   // How the Node mgr knows whether we have visible windows or not
47   bool visible_windows() { return f_visible_num != 0; }
48
49   // How the agent notifies the manager of its unmapping: 
50   void agent_unmapped (LibraryAgent *);
51
52   void init(UAS_List<UAS_String>&);
53
54   bool lib_exist(UAS_String&);
55
56 protected: // functions
57   void create_library();
58   void agent_destroyed (LibraryAgent *, u_int, void *, LibraryAgent *);
59
60 private: // variables
61   LibraryAgent          *f_first_agent;
62   UAS_List<UAS_Common>   fObjList;
63   xList<LibraryAgent *>  f_agent_list;
64   unsigned int           f_visible_num;
65
66 private:
67   LONG_LIVED_HH(LibraryMgr,library_mgr);
68 };
69
70 LONG_LIVED_HH2(LibraryMgr,library_mgr);