Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtprintinfo / UI / DtFindD.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: DtFindD.h /main/3 1995/11/06 09:35:06 rswiston $ */
24 /*                                                                      *
25  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
26  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
27  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
28  * (c) Copyright 1993, 1994 Novell, Inc.                                *
29  */
30
31 #ifndef DTFINDD_H
32 #define DTFINDD_H
33
34 #include "Dialog.h"
35 #include "Container.h"
36
37 class Button;
38 class LabelObj;
39 class Prompt;
40 class Container;
41 class DtMainW;
42 class DtFindD;
43
44 class DtJobList : public Container
45 {
46
47  private:
48
49    DtFindD *findD;
50    void NotifySelected(BaseUI *obj);
51
52  public:
53
54    DtJobList(AnyUI *parent);
55
56 };
57
58 class DtFindD : public Dialog {
59
60    friend class DtJobList;
61
62    friend void StartCB(void *);
63    friend void StopCB(void *);
64    friend void CancelCB(void *);
65    friend void GotoCB(void *);
66    friend void CancelJobsCB(void *);
67    friend void HelpCB(void *);
68    friend void CheckQueue(BaseUI *, void *);
69
70  private:
71
72    boolean _has_been_posted;
73    int _cur_obj;
74
75    DtMainW *mainw;
76
77    // dialog buttons
78    Button *start;
79    Button *stop;
80    Button *close_it;
81    Button *help;
82    Button *cancel_jobs;
83    Button *goto_job;
84    Button *ignore_case;
85    Button *exact_match;
86    Button *match_any_user;
87    DtJobList *found_container;
88    LabelObj *field1;
89    LabelObj *field2;
90    LabelObj *field3;
91    LabelObj *field4;
92    Prompt *prompt;
93    SelectProc _select_proc;
94    boolean _working;
95    boolean _prev_opened;
96    boolean _prev_visible;
97
98    static void StartCB(void *);
99    static void StopCB(void *);
100    static void CancelCB(void *);
101    static void GotoCB(void *);
102    static void CancelJobsCB(void *);
103    static void HelpCB(void *);
104    static void CheckQueue(BaseUI *, void *);
105
106    boolean SetVisiblity(boolean flag);
107
108    void CloseCB();
109    void Cancel();
110    void Stop();
111    void Start();
112    void UpdateQueue();
113    BaseUI *FindJob(BaseUI *obj);
114    boolean HandleHelpRequest();
115
116  public:
117
118    DtFindD(AnyUI *parent, char *name, SelectProc select_proc);
119    boolean Working() { return _working; }
120    boolean MatchAnyUser();
121    void UpdateMatchAnyUser();
122    void DeleteJobFromList(BaseUI *);
123    void UpdatePrinter(BaseUI *printer);
124    void UpdatePositions(BaseUI *printer);
125    virtual ~DtFindD();
126
127 };
128
129 #endif /* DTFINDD_H */