00001 /* AbiWord 00002 * Copyright (C) 2002 Tomas Frydrych <tomas@frydrych.uklinux.net> 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 * 02110-1301 USA. 00018 */ 00019 00020 #ifndef AP_DIALOG_MARKREVISIONS_H 00021 #define AP_DIALOG_MARKREVISIONS_H 00022 00023 #include "xap_Dialog.h" 00024 #include "pd_Document.h" 00025 #include "xap_Strings.h" 00026 00027 class XAP_Frame; 00028 00029 class ABI_EXPORT AP_Dialog_MarkRevisions : public XAP_Dialog_NonPersistent 00030 { 00031 public: 00032 AP_Dialog_MarkRevisions(XAP_DialogFactory * pDlgFactory, 00033 XAP_Dialog_Id id); 00034 virtual ~AP_Dialog_MarkRevisions(void); 00035 00036 virtual void runModal(XAP_Frame * pFrame) = 0; 00037 00038 typedef enum { a_OK=0, a_CANCEL=1 } tAnswer; 00039 00040 tAnswer getAnswer(void) const; 00041 void setAnswer(tAnswer a); 00042 00043 void setDocument(PD_Document * pDoc) {m_pDoc = pDoc;} 00044 void forceNew() {m_bForceNew = true;} 00045 00046 const char * getTitle(); 00047 const char * getRadio2Label(); 00048 const char * getComment2Label(); 00049 00050 00051 /* the caller is responsible for freeing the pointers returned by 00052 the following two functions (use FREEP) 00053 */ 00054 char * getRadio1Label(); 00055 char * getComment1(bool utf8 = false); 00056 00057 void setComment2(const char * pszComment); 00058 void addRevision(); 00059 bool isRev(); 00060 00061 protected: 00062 AP_Dialog_MarkRevisions::tAnswer m_answer; 00063 00064 private: 00065 void _initRevision(); 00066 00067 PD_Document * m_pDoc; 00068 UT_UTF8String * m_pComment2; 00069 const XAP_StringSet * m_pSS; 00070 const AD_Revision * m_pRev; 00071 bool m_bForceNew; 00072 }; 00073 00074 #endif /* AP_DIALOG_MARKREVISIONS_H */