Add -fpermissive to linux standard c++ option define in linux.cf
[oweals/cde.git] / cde / programs / dtprintinfo / UI / DtFindSet.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: DtFindSet.h /main/3 1995/11/06 09:35:17 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 DTFINDSET_H
32 #define DTFINDSET_H
33
34 #include "Dialog.h"
35 #include "Prompt.h"
36
37 class Button;
38 class DtMainW;
39 class LabelObj;
40 class Container;
41 class ComboBoxObj;
42 class FindSetIcon;
43 class HelpSystem;
44
45 typedef void (*CallerCallback)(BaseUI *caller, char *iconFile);
46
47 typedef struct
48 {
49    boolean read_it;
50    FindSetIcon **icons;
51    int n_icons;
52 } FileNamesStruct, *FileNames, **FileNamesList;
53
54 class DtFindSet : public Dialog {
55
56    friend void OkCB(void *data);
57    friend void ApplyCB(void *data);
58    friend void CancelCB(void *data);
59    friend void ResetCB(void *data);
60    friend void HelpCB(void *data);
61    friend void ComboBoxCB(ComboBoxObj *, char *, int);
62    friend void InitComboBox(BaseUI *, void *data);
63
64    static void OkCB(void *data);
65    static void ApplyCB(void *data);
66    static void CancelCB(void *data);
67    static void ResetCB(void *data);
68    static void HelpCB(void *data);
69    static void ComboBoxCB(ComboBoxObj *, char *, int);
70    static void InitComboBox(BaseUI *, void *data);
71
72  private:
73
74    DtMainW *mainw;
75    HelpSystem *helpSystem;
76
77    // dialog buttons
78    Button *ok;
79    Button *apply;
80    Button *cancel;
81    Button *reset;
82    Button *help;
83
84    char **dirs;
85    int n_dirs;
86    int last_position;
87    BaseUI *caller;
88    CallerCallback callback;
89    FileNamesList filenames;
90    ComboBoxObj *comboBox;
91    Container *icons;
92    LabelObj *empty;
93    LabelObj *icon_label;
94    boolean _has_been_posted;
95
96    void CloseCB();
97    boolean SetVisiblity(boolean);
98    boolean HandleHelpRequest();
99
100  public:
101
102    DtFindSet(DtMainW *, char *name, CallerCallback callback);
103    ~DtFindSet();
104    void Caller(BaseUI *obj) { caller = obj; }
105    void Apply();
106    void Reset();
107
108 };
109
110 #endif // DTFINDSET_H