1 /* $TOG: LibraryAgentMotif.hh /main/17 1998/07/27 14:20:31 mgreess $ */
3 * (c) Copyright 1996 Digital Equipment Corporation.
4 * (c) Copyright 1996 Hewlett-Packard Company.
5 * (c) Copyright 1996 International Business Machines Corp.
6 * (c) Copyright 1996 Sun Microsystems, Inc.
7 * (c) Copyright 1996 Novell, Inc.
8 * (c) Copyright 1996 FUJITSU LIMITED.
9 * (c) Copyright 1996 Hitachi.
12 * Copyright (c) 1991 HaL Computer Systems, Inc. All rights reserved.
13 * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
14 * States. Use of a copyright notice is precautionary only and does not
15 * imply publication or disclosure.
17 * This software contains confidential information and trade secrets of HaL
18 * Computer Systems, Inc. Use, disclosure, or reproduction is prohibited
19 * without the prior express written permission of HaL Computer Systems, Inc.
21 * RESTRICTED RIGHTS LEGEND
22 * Use, duplication, or disclosure by the Government is subject to
23 * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
24 * Technical Data and Computer Software clause at DFARS 252.227-7013.
25 * HaL Computer Systems, Inc.
26 * 1315 Dell Avenue, Campbell, CA 95008
31 #include <X11/Intrinsic.h>
33 class OutlineListView;
34 class OutlineListView;
39 struct OutlineListSelectionData;
43 class LibraryAgent : public Agent,
44 public UAS_Receiver<UAS_DocumentRetrievedMsg>
51 // load infolib specified in any format
52 static int add_library(char*, Widget parent=NULL);
54 void display (OutlineList *library);
55 void track_to (UAS_Pointer<UAS_Common> &node_ptr);
56 void track (bool scroll = FALSE);
58 bool popped_down() { return f_popped_down; }
60 { f_keep_forever = TRUE; }
62 OutlineList *outline_list();
64 void library_removed (UAS_Pointer<UAS_Common> lib);
66 void close_set_sensitive(Boolean set) {
67 f_close_sensitive = set; if (f_close) XtSetSensitive(f_close, set); }
68 void copy_to_clipbd();
70 protected: // functions
72 static void close_windowCB(Widget, XtPointer, XtPointer);
74 void ui_destroyed(); // leave in for backward compatibility
75 static void ui_destroyedCB(Widget, XtPointer, XtPointer);
76 static void detach_subtreeCB(Widget, XtPointer, XtPointer);
77 void detach_subtree();
78 static void add_libraryCB(Widget, XtPointer, XtPointer);
79 static void remove_libraryCB(Widget, XtPointer, XtPointer);
80 void entry_selected (void *, u_int notify_type);
81 static void display_nodeCB(Widget, XtPointer, XtPointer);
83 static void printCB(Widget, XtPointer, XtPointer);
84 static void print_asCB(Widget, XtPointer, XtPointer);
85 void print(WCallback *);
86 void free_tracking_hierarchy();
87 static void auto_track_toggleCB(Widget, XtPointer, XtPointer);
88 // callbacks for use by drag and drop
89 static void destCB(Widget, XtPointer, XtPointer);
90 static void transferCB(Widget, XtPointer, XtPointer);
92 void receive (UAS_DocumentRetrievedMsg &message, void *client_data);
94 void text_callback(WCallback *wcb);
95 static void search_help (Widget w, XtPointer client_data,
96 XEvent *event, Boolean *);
97 void add_quick_help (Widget, const char* help_text);
98 static void quick_helpEH (Widget, XtPointer, XEvent *, Boolean *);
101 private: // variables
102 //WTopLevelShell *f_shell;
104 OutlineListView *f_doc_tree_view;
105 OutlineElement *f_oe;
107 WCallback *f_wm_delete_callback;
108 TrackingEntry *f_tracking_hierarchy;
122 bool f_close_sensitive;
123 Widget f_status_text;
124 ScopeMenu *f_scope_menu;
126 UAS_List<UAS_String> f_help_text;
132 LibraryAgent::LibraryAgent()
135 f_keep_forever (FALSE),
136 f_wm_delete_callback (NULL),
137 f_tracking_hierarchy (NULL),
138 f_popped_down (TRUE),
140 f_close_sensitive (FALSE)