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

xap_Dlg_DocComparison.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2004 Tomas Frydrych <tomasfrydrych@yahoo.co.uk>
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 XAP_DIALOG_DOCCOMPARISON_H
00021 #define XAP_DIALOG_DOCCOMPARISON_H
00022 
00023 #include "xap_Dialog.h"
00024 #include "ut_vector.h"
00025 #include <time.h>
00026 
00027 /*
00028     This dialogue displays information about results of document
00029     comparison; it takes no user input what so ever (except for
00030     closing it, of course).
00031 
00032     The dialogue consists of three segements (see PNG attached to
00033     commit message of Feb 7, 2004)
00034 
00035     Buttons: there is one button which should be localised by
00036              getButtonLabel().
00037 
00038     Header section: the upper part of the dialogue inside of a frame
00039              with a title getFrame1Label(); the frame contains two
00040              static controls that are to be filled with getPath1() and
00041              getPath1().
00042 
00043     Result section: a frame with a title getFrame2Label(), which
00044              contains getResultCount() pairs of static controls, each
00045              pair on one line, filled by getResultLabel(n) and
00046              getResultValue(n).
00047 
00048     Title for the dialogue window is obtained by getWindowLabel().
00049  */
00050 
00051 class XAP_Frame;
00052 class AD_Document;
00053 class XAP_StringSet;
00054 
00055 const UT_uint32 iResultCount = 4;
00056 
00057 class ABI_EXPORT XAP_Dialog_DocComparison : public XAP_Dialog_NonPersistent
00058 {
00059   public:
00060     XAP_Dialog_DocComparison(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00061 
00062     virtual ~XAP_Dialog_DocComparison(void) {};
00063 
00064     virtual void runModal(XAP_Frame * pFrame) = 0;
00065     bool         calculate(AD_Document * pDoc1, AD_Document * pDoc2);
00066 
00067     const char * getWindowLabel() const;
00068     const char * getButtonLabel() const;
00069     const char * getFrame1Label() const;
00070     const char * getFrame2Label() const;
00071 
00072     char *       getPath1() const;
00073     char *       getPath2() const;
00074 
00075     UT_uint32    getResultCount() const {return iResultCount;}
00076     const char * getResultLabel(UT_uint32 n) const;
00077     char *       getResultValue(UT_uint32 n) const;
00078 
00079   private:
00080     const AD_Document *   m_pDoc1;
00081     const AD_Document *   m_pDoc2;
00082     const XAP_StringSet * m_pSS;
00083 
00084     UT_uint32             m_iVersionOfDiff;
00085     time_t                m_tTimeOfDiff;
00086     UT_uint32             m_iPosOfDiff;
00087     UT_uint32             m_iPosOfFmtDiff;
00088     bool                  m_bStylesEqual;
00089 };
00090 
00091 #endif /* XAP_DIALOG_DOCCOMPARISON_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1