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 AP_DIALOG_NEW_H 21 #define AP_DIALOG_NEW_H 22 23 #include "xap_Frame.h" 24 #include "xap_Dialog.h" 25 #include "xav_View.h" 26 #include "xap_Strings.h" 27 28 class XAP_Frame; 29 30 class ABI_EXPORT AP_Dialog_New : public XAP_Dialog_NonPersistent 31 { 32 public: 33 AP_Dialog_New(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 34 virtual ~AP_Dialog_New(void); 35 36 virtual void runModal(XAP_Frame * pFrame) = 0; 37 38 typedef enum { a_OK, a_CANCEL } tAnswer; 39 typedef enum { open_New, open_Template, open_Existing} tOpenType; 40 getAnswer(void)41 inline AP_Dialog_New::tAnswer getAnswer(void) const {return m_answer;} getOpenType(void)42 inline AP_Dialog_New::tOpenType getOpenType(void) const {return m_openType;} 43 getFileName(void)44 inline const char * getFileName (void) const {return m_fileName;} 45 46 protected: setAnswer(AP_Dialog_New::tAnswer a)47 inline void setAnswer (AP_Dialog_New::tAnswer a) {m_answer = a;} setOpenType(AP_Dialog_New::tOpenType t)48 inline void setOpenType (AP_Dialog_New::tOpenType t) {m_openType = t;} 49 50 51 void setFileName (const char * name); 52 53 private: 54 AP_Dialog_New::tAnswer m_answer; 55 AP_Dialog_New::tOpenType m_openType; 56 57 char * m_fileName; 58 }; 59 60 #endif /* AP_DIALOG_NEW_H */ 61