1 /* Copyright (c) 1994,1995,1996 FUJITSU LIMITED */
2 /* All Rights Reserved */
5 * $XConsortium: SearchMgr.hh /main/5 1996/06/11 16:27:38 cde-hal $
7 * Copyright (c) 1992 HaL Computer Systems, Inc. All rights reserved.
8 * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
9 * States. Use of a copyright notice is precautionary only and does not
10 * imply publication or disclosure.
12 * This software contains confidential information and trade secrets of HaL
13 * Computer Systems, Inc. Use, disclosure, or reproduction is prohibited
14 * without the prior express written permission of HaL Computer Systems, Inc.
16 * RESTRICTED RIGHTS LEGEND
17 * Use, duplication, or disclosure by the Government is subject to
18 * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
19 * Technical Data and Computer Software clause at DFARS 252.227-7013.
20 * HaL Computer Systems, Inc.
21 * 1315 Dell Avenue, Campbell, CA 95008
30 class SearchMgr : public Long_Lived
37 UAS_SearchEngine &search_engine();
38 void parse_and_search (char *query, UAS_SearchScope *);
41 void display_editor();
43 ListView &search_history_list_view();
44 void history_entry_activate (FolioObject *object, u_int notify_type,
45 void *notify_data, void *dependent_data);
46 enum SearchMessageType
47 { NO_HITS, BAD_QUERY };
48 void display_message(SearchMessageType, int error_number = 0);
50 void set_history_length (int size)
51 { f_search_history_list.set_length (size); }
53 void search_section (const UAS_String &ss) { f_search_section = ss; }
54 UAS_String search_section () { return f_search_section; }
55 void current_hits (UAS_Pointer<UAS_List<UAS_TextRun> > l) {
58 UAS_Pointer<UAS_List<UAS_TextRun> > current_hits ();
60 // friend SearchMgr &search_mgr();
63 friend class SeReconfigure;
66 void add_root (UAS_Pointer<UAS_Common>& root);
67 void remove_root(UAS_Pointer<UAS_Common>& root);
71 protected: // variables
72 QueryEditor *f_query_editor;
73 UAS_Pointer<UAS_SearchEngine> f_search_engine ;
74 HistoryList f_search_history_list;
75 ListView *f_search_history_list_view;
76 UAS_String f_search_section;
77 UAS_Pointer<UAS_List<UAS_TextRun> > f_current_hits;
78 UAS_List<UAS_Common> f_roots;
81 LONG_LIVED_HH(SearchMgr,search_mgr);
84 LONG_LIVED_HH2(SearchMgr,search_mgr);