Debian Codegraph @

src/af/xap/xp/xap_Dlg_Stub.h

raw
1 /* AbiWord
2 * Copyright (C) 2000 AbiSource, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20 #ifndef XAP_DIALOG_STUB_H
21 #define XAP_DIALOG_STUB_H
22
23 /* #include "xap_Frame.h" */
24 #include "xap_Dialog.h"
25 /* #include "xav_View.h" */
26
27 class XAP_Frame;
28
29 /*
30 This is not a real dialog. It is not linked into the application.
31 Neither are its platform-specific subclasses. The only reason
32 any of these files exist is to make sure that each of the
33 platform-specific stubs will always compile.
34
35 That way, when those stub files are cloned and renamed to make
36 stubs for other (real) dialogs, we know that they'll compile and
37 not break the build.
38
39 If you're creating a new XP dialog, ignore this file. You'll be
40 *much* better off stealing code from another existing dialog which
41 does something real.
42 */
43 class ABI_EXPORT XAP_Dialog_Stub : public XAP_Dialog_NonPersistent
44 {
45 public:
46 XAP_Dialog_Stub(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id)
47 : XAP_Dialog_NonPersistent(pDlgFactory, id) {}
48 virtual ~XAP_Dialog_Stub(void) {}
49
50 virtual void runModal(XAP_Frame * pFrame) = 0;
51
52 typedef enum { a_OK, a_CANCEL } tAnswer;
53
54 XAP_Dialog_Stub::tAnswer getAnswer(void) const;
55
56 protected:
57
58 XAP_Dialog_Stub::tAnswer m_answer;
59 };
60
61 #endif /* XAP_DIALOG_STUB_H */