• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_Dialog_ListRevisions.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2002, 2003 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_LISTREVISIONS_H
00021 #define AP_DIALOG_LISTREVISIONS_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_ListRevisions : public XAP_Dialog_NonPersistent
00030 {
00031 public:
00032     AP_Dialog_ListRevisions(XAP_DialogFactory * pDlgFactory,
00033                  XAP_Dialog_Id id);
00034     virtual ~AP_Dialog_ListRevisions(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 
00045     const char *        getTitle() const;
00046     const char *        getLabel1()const;
00047     const char *        getColumn1Label() const;
00048     const char *        getColumn2Label() const;
00049     const char *        getColumn3Label() const;
00050 
00051     UT_uint32           getItemCount() const;
00052     UT_uint32           getNthItemId(UT_uint32 n) const;
00053 
00054     /* the caller is responsible for freeing the pointer returned by
00055        the following function (use FREEP) */
00056     char *              getNthItemText(UT_uint32 n, bool utf8 = false) const;
00057 
00058     const char *        getNthItemTime(UT_uint32 n) const;
00059     time_t              getNthItemTimeT(UT_uint32 n) const;
00060 
00061     UT_uint32           getSelectedId() const {return m_iId;}
00062 
00063 protected:
00064     AP_Dialog_ListRevisions::tAnswer    m_answer;
00065     UT_uint32                           m_iId;
00066 
00067 private:
00068     PD_Document *                       m_pDoc;
00069     const XAP_StringSet *               m_pSS;
00070 };
00071 
00072 #endif /* AP_DIALOG_TOGGLECASE_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1