2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $TOG: LibraryAgentMotif.hh /main/17 1998/07/27 14:20:31 mgreess $ */
25 * (c) Copyright 1996 Digital Equipment Corporation.
26 * (c) Copyright 1996 Hewlett-Packard Company.
27 * (c) Copyright 1996 International Business Machines Corp.
28 * (c) Copyright 1996 Sun Microsystems, Inc.
29 * (c) Copyright 1996 Novell, Inc.
30 * (c) Copyright 1996 FUJITSU LIMITED.
31 * (c) Copyright 1996 Hitachi.
34 * Copyright (c) 1991 HaL Computer Systems, Inc. All rights reserved.
35 * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
36 * States. Use of a copyright notice is precautionary only and does not
37 * imply publication or disclosure.
39 * This software contains confidential information and trade secrets of HaL
40 * Computer Systems, Inc. Use, disclosure, or reproduction is prohibited
41 * without the prior express written permission of HaL Computer Systems, Inc.
43 * RESTRICTED RIGHTS LEGEND
44 * Use, duplication, or disclosure by the Government is subject to
45 * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
46 * Technical Data and Computer Software clause at DFARS 252.227-7013.
47 * HaL Computer Systems, Inc.
48 * 1315 Dell Avenue, Campbell, CA 95008
53 #include <X11/Intrinsic.h>
55 class OutlineListView;
60 struct OutlineListSelectionData;
64 class LibraryAgent : public Agent,
65 public UAS_Receiver<UAS_DocumentRetrievedMsg>
72 // load infolib specified in any format
73 static int add_library(char*, Widget parent=NULL);
75 void display (OutlineList *library);
76 void track_to (UAS_Pointer<UAS_Common> &node_ptr);
77 void track (bool scroll = FALSE);
79 bool popped_down() { return f_popped_down; }
81 { f_keep_forever = TRUE; }
83 OutlineList *outline_list();
85 void library_removed (UAS_Pointer<UAS_Common> lib);
87 void close_set_sensitive(Boolean set) {
88 f_close_sensitive = set; if (f_close) XtSetSensitive(f_close, set); }
89 void copy_to_clipbd();
91 protected: // functions
93 static void close_windowCB(Widget, XtPointer, XtPointer);
95 void ui_destroyed(); // leave in for backward compatibility
96 static void ui_destroyedCB(Widget, XtPointer, XtPointer);
97 static void detach_subtreeCB(Widget, XtPointer, XtPointer);
98 void detach_subtree();
99 static void add_libraryCB(Widget, XtPointer, XtPointer);
100 static void remove_libraryCB(Widget, XtPointer, XtPointer);
101 void entry_selected (void *, u_int notify_type);
102 static void display_nodeCB(Widget, XtPointer, XtPointer);
103 void display_node ();
104 static void printCB(Widget, XtPointer, XtPointer);
105 static void print_asCB(Widget, XtPointer, XtPointer);
106 void print(WCallback *);
107 void free_tracking_hierarchy();
108 static void auto_track_toggleCB(Widget, XtPointer, XtPointer);
109 // callbacks for use by drag and drop
110 static void destCB(Widget, XtPointer, XtPointer);
111 static void transferCB(Widget, XtPointer, XtPointer);
113 void receive (UAS_DocumentRetrievedMsg &message, void *client_data);
115 void text_callback(WCallback *wcb);
116 static void search_help (Widget w, XtPointer client_data,
117 XEvent *event, Boolean *);
118 void add_quick_help (Widget, const char* help_text);
119 static void quick_helpEH (Widget, XtPointer, XEvent *, Boolean *);
122 private: // variables
123 //WTopLevelShell *f_shell;
125 OutlineListView *f_doc_tree_view;
126 OutlineElement *f_oe;
128 WCallback *f_wm_delete_callback;
129 TrackingEntry *f_tracking_hierarchy;
143 bool f_close_sensitive;
144 Widget f_status_text;
145 ScopeMenu *f_scope_menu;
147 UAS_List<UAS_String> f_help_text;
153 LibraryAgent::LibraryAgent()
156 f_keep_forever (FALSE),
157 f_wm_delete_callback (NULL),
158 f_tracking_hierarchy (NULL),
159 f_popped_down (TRUE),
161 f_close_sensitive (FALSE),