Debian Codegraph @

src/af/xap/xp/xap_Dlg_Password.h

raw
1 /* AbiWord
2 * Copyright (C) 2001 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_PASSWORD_H
21 #define XAP_DIALOG_PASSWORD_H
22
23 #include "ut_string_class.h"
24
25 /* #include "xap_Frame.h" */
26 #include "xap_Dialog.h"
27 /* #include "xav_View.h" */
28
29 class XAP_Frame;
30
31 class ABI_EXPORT XAP_Dialog_Password : public XAP_Dialog_NonPersistent
32 {
33 public:
34
35 typedef enum { a_OK, a_Cancel } tAnswer;
36
37 XAP_Dialog_Password(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
38 virtual ~XAP_Dialog_Password(void);
39
40 virtual void runModal(XAP_Frame * pFrame) = 0;
41
42 UT_UTF8String getPassword () const { return m_passwd; }
43
44 tAnswer getAnswer () const { return m_answer; }
45
46 protected:
47 void setPassword (const char *);
48 void setPassword (const UT_UTF8String & pass);
49 void setAnswer ( tAnswer ans ) { m_answer = ans; }
50
51 private:
52 UT_UTF8String m_passwd;
53 tAnswer m_answer;
54 };
55
56 #endif /* XAP_DIALOG_PASSWORD_H */