4 * $XConsortium: FindDialog.h /main/4 1996/04/21 19:42:01 drk $
6 * RESTRICTED CONFIDENTIAL INFORMATION:
8 * The information in this document is subject to special
9 * restrictions in a confidential disclosure agreement between
10 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
11 * document outside HP, IBM, Sun, USL, SCO, or Univel without
12 * Sun's specific written approval. This document and all copies
13 * and derivative works thereof must be returned or destroyed at
16 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
24 #include <DtMail/DtMail.hh>
28 // This class is used for the 'Mailer - Find' dialog box.
30 class FindDialog : public Dialog {
33 FindDialog(RoamMenuWindow * parent);
34 ~FindDialog() { clear(); };
37 // These come from 'Dialog'.
40 void popped_down() { };
41 void popup() { XtPopup(_w, XtGrabNone); };
42 void popdown() { XtPopdown(_w); };
43 void widgetDestroyed() {};
45 // The set/clear status methods will set and clear the status line.
47 void setStatus(const char * str);
48 void clearStatus(void);
50 Widget createWorkArea(Widget);
53 // Like initialize() except returns success status.
58 // Set the search direction for find.
60 void setSearchForward(Boolean forward) { // True == Forward, False = Backward.
61 _searchForward = forward;
66 struct ActionAreaItem {
67 char * label; // Button label.
68 XtCallbackProc callback;
73 // Clear out the data. After this function is complete the
74 // data should look as if the constructor was just called and
75 // before initialize().
79 Boolean findMatching(Boolean findAll = False);
81 Boolean compareMessage(DtMailMessageHandle handle);
83 Boolean compareHeader(DtMailEnv & error,
85 const char * cmpToString);
87 static void directionCallback(Widget button,
91 static void findCallback(Widget button,
95 static void findSelectAllCallback(Widget button,
99 static void clearCallback(Widget button,
101 XtPointer call_data);
103 static void closeCallback(Widget button,
105 XtPointer call_data);
107 static void helpCallback(Widget button,
109 XtPointer call_data);
111 static void textFieldCallback(Widget, XtPointer, XtPointer);
114 // Pull all fields out of the dialog and store in _text_values;
118 unsigned int _num_text_fields; // Array size.
121 Widget * _text_fields;
123 char ** _text_abstract_name;
124 char ** _text_labels;
125 char ** _text_values;
127 unsigned int _num_buttons; // Array size.
128 ActionAreaItem * _buttonData;
130 Boolean _searchForward;
131 RoamMenuWindow * _roamWindow;