Debian Codegraph @

src/af/xap/xp/xap_Dlg_WindowMore.cpp

raw
1 /* AbiSource Application Framework
2 * Copyright (C) 1998 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 #include <stdlib.h>
21 #include <stdio.h>
22 #include <string.h>
23 #include "ut_assert.h"
24 #include "ut_string.h"
25 #include "ut_debugmsg.h"
26
27 #include "xap_Dlg_WindowMore.h"
28 #include "xap_App.h"
29
30 #include "xap_Dialog_Id.h"
31 #include "xap_DialogFactory.h"
32 #include "xap_Dlg_MessageBox.h"
33
34
35 XAP_Dialog_WindowMore::XAP_Dialog_WindowMore(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id)
36 : XAP_Dialog_NonPersistent(pDlgFactory,id, "interface/dialogviewdocument")
37 {
38 m_answer = a_OK;
39 m_ndxSelFrame = -1; // nothing selected
40 }
41
42 XAP_Dialog_WindowMore::~XAP_Dialog_WindowMore(void)
43 {
44 }
45
46 XAP_Dialog_WindowMore::tAnswer XAP_Dialog_WindowMore::getAnswer(void) const
47 {
48 // let our caller know if user hit ok, cancel, etc.
49 return m_answer;
50 }
51
52 XAP_Frame * XAP_Dialog_WindowMore::getSelFrame(void) const
53 {
54 XAP_Frame * pSelFrame = NULL;
55
56 UT_ASSERT(m_answer == a_OK);
57 UT_ASSERT_HARMLESS(m_pApp);
58
59 if (m_pApp && (m_ndxSelFrame >= 0))
60 {
61 pSelFrame = m_pApp->getFrame(m_ndxSelFrame);
62 }
63
64 return pSelFrame;
65 }