1b2fe58da1cf82f95ee33d198e3565f1b88c3664
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Agents / SearchResultsAgentMotif.hh
1 /*      Copyright (c) 1994,1995,1996 FUJITSU LIMITED    */
2 /*      All Rights Reserved                             */
3
4 /*
5  * $XConsortium: SearchResultsAgentMotif.hh /main/4 1996/11/18 16:31:10 cde-hal $
6  *
7  * Copyright (c) 1993 HAL Computer Systems International, Ltd.
8  * All rights reserved.  Unpublished -- rights reserved under
9  * the Copyright Laws of the United States.  USE OF A COPYRIGHT
10  * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
11  * OR DISCLOSURE.
12  * 
13  * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
14  * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.  USE,
15  * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
16  * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
17  * INTERNATIONAL, LTD.
18  * 
19  *                         RESTRICTED RIGHTS LEGEND
20  * Use, duplication, or disclosure by the Government is subject
21  * to the restrictions as set forth in subparagraph (c)(l)(ii)
22  * of the Rights in Technical Data and Computer Software clause
23  * at DFARS 252.227-7013.
24  *
25  *          HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
26  *                  1315 Dell Avenue
27  *                  Campbell, CA  95008
28  * 
29  */
30
31 #include "UAS.hh"
32
33 class NodeListAgent;
34 class Manager;
35 class ResultID;
36 class WXmText;
37 class AgentListEntry;
38 class WXmToggleButton;
39
40 class SearchResultsAgent : public NodeListAgent
41 {
42 public: // functions
43   SearchResultsAgent();
44
45   void init();
46   XmString form_result_string (UAS_Pointer<UAS_SearchResultsEntry>);
47   void display (ResultID *results);
48   void select_item (WCallback *wcb);
49   void view_activate (WCallback *);
50   void retain_changed (WCallback *wcb);
51   void set_agent_list_entry (AgentListEntry *my_ale)
52     { f_my_ale = my_ale; }
53   bool retain ()
54     { return f_retain; }
55
56   ResultID *resultID()
57     { return f_results; }
58
59   static Boolean fill_list_wp (XtPointer client_data);
60   Boolean fill_list(UAS_List<UAS_SearchResultsEntry> &);
61
62 protected: // functions
63   virtual void create_window();
64   virtual void close_window (WCallback *wcb);
65   void  set_retain_default ();
66   void modify_verify (WCallback *wcb);
67
68   void resize();
69
70 private:
71   static void resizeCB(Widget, XtPointer, XEvent*, Boolean*);
72   void compose_header();
73
74 protected: // variables
75   AgentListEntry *f_my_ale;
76   bool   f_retain;
77   ResultID *f_results;
78   int       f_selected_item;
79   WXmToggleButton *f_retain_toggle;
80   WXmText  *f_query_text;
81   WXmLabel *f_hits_label;
82   WXmLabel *f_scope_label;
83
84   unsigned int f_docs_to_display ;
85   unsigned int f_count ;
86   long f_scale;
87   XtWorkProcId f_work_proc_id;
88   bool f_popped_up;
89   Dimension f_header_indent;
90 };
91
92 // inlines:
93
94 inline
95 SearchResultsAgent::SearchResultsAgent()
96 : f_work_proc_id (0), f_popped_up(FALSE)
97 {
98 }