Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtprintinfo / UI / DtProps.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: DtProps.h /main/3 1995/11/06 09:36:21 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 DTPROPS_H
32 #define DTPROPS_H
33
34 #include "Dialog.h"
35 #include "BaseObj.h"
36
37 class Button;
38 class Container;
39 class Prompt;
40 class DtMainW;
41
42 class DtProps : public Dialog {
43
44    friend void OkCB(void *data);
45    friend void ApplyCB(void *data);
46    friend void CancelCB(void *data);
47    friend void ResetCB(void *data);
48    friend void HelpCB(void *data);
49
50    static void OkCB(void *data);
51    static void ApplyCB(void *data);
52    static void CancelCB(void *data);
53    static void ResetCB(void *data);
54    static void HelpCB(void *data);
55
56  private:
57
58    DtMainW *mainw;
59
60    // dialog buttons
61    Button *ok;
62    Button *apply;
63    Button *cancel;
64    Button *reset;
65    Button *help;
66    Container *rc;
67    char *_location_id;
68    boolean _has_been_posted;
69
70    void CloseCB();
71    boolean SetVisiblity(boolean);
72    boolean HandleHelpRequest();
73
74  public:
75
76    DtProps(AnyUI *parent,
77            char *name,
78            char *location_id,
79            boolean editable,
80            int n_attrs,
81            Attribute **attrs);
82    virtual ~DtProps();
83    void Apply();
84    void Reset();
85
86 };
87
88 #endif // DTPROPS_H