1 /* AbiWord 2 * Copyright (C) 2002, 2003 Tomas Frydrych <tomas@frydrych.uklinux.net> 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_LISTREVISIONS_H 21 #define AP_DIALOG_LISTREVISIONS_H 22 23 #include "xap_Dialog.h" 24 #include "pd_Document.h" 25 #include "xap_Strings.h" 26 27 class XAP_Frame; 28 29 class ABI_EXPORT AP_Dialog_ListRevisions : public XAP_Dialog_NonPersistent 30 { 31 public: 32 AP_Dialog_ListRevisions(XAP_DialogFactory * pDlgFactory, 33 XAP_Dialog_Id id); 34 virtual ~AP_Dialog_ListRevisions(void); 35 36 virtual void runModal(XAP_Frame * pFrame) = 0; 37 38 typedef enum { a_OK=0, a_CANCEL=1 } tAnswer; 39 40 tAnswer getAnswer(void) const; 41 void setAnswer(tAnswer a); 42 setDocument(PD_Document * pDoc)43 void setDocument(PD_Document * pDoc) {m_pDoc = pDoc;} 44 45 const char * getTitle() const; 46 const char * getLabel1()const; 47 const char * getColumn1Label() const; 48 const char * getColumn2Label() const; 49 const char * getColumn3Label() const; 50 51 UT_uint32 getItemCount() const; 52 UT_uint32 getNthItemId(UT_uint32 n) const; 53 54 /* the caller is responsible for freeing the pointer returned by 55 the following function (use FREEP) */ 56 char * getNthItemText(UT_uint32 n, bool utf8 = false) const; 57 58 const char * getNthItemTime(UT_uint32 n) const; 59 time_t getNthItemTimeT(UT_uint32 n) const; 60 getSelectedId()61 UT_uint32 getSelectedId() const {return m_iId;} 62 63 protected: 64 AP_Dialog_ListRevisions::tAnswer m_answer; 65 UT_uint32 m_iId; 66 67 private: 68 PD_Document * m_pDoc; 69 const XAP_StringSet * m_pSS; 70 }; 71 72 #endif /* AP_DIALOG_TOGGLECASE_H */ 73