| 1 |
/* AbiWord |
| 2 |
* Copyright (C) 2004 Tomas Frydrych <[email protected]> |
| 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 XAP_DIALOG_DOCCOMPARISON_H |
| 21 |
#define XAP_DIALOG_DOCCOMPARISON_H |
| 22 |
|
| 23 |
#include "xap_Dialog.h" |
| 24 |
#include "ut_vector.h" |
| 25 |
#include <time.h> |
| 26 |
|
| 27 |
/* |
| 28 |
This dialogue displays information about results of document |
| 29 |
comparison; it takes no user input what so ever (except for |
| 30 |
closing it, of course). |
| 31 |
|
| 32 |
The dialogue consists of three segements (see PNG attached to |
| 33 |
commit message of Feb 7, 2004) |
| 34 |
|
| 35 |
Buttons: there is one button which should be localised by |
| 36 |
getButtonLabel(). |
| 37 |
|
| 38 |
Header section: the upper part of the dialogue inside of a frame |
| 39 |
with a title getFrame1Label(); the frame contains two |
| 40 |
static controls that are to be filled with getPath1() and |
| 41 |
getPath1(). |
| 42 |
|
| 43 |
Result section: a frame with a title getFrame2Label(), which |
| 44 |
contains getResultCount() pairs of static controls, each |
| 45 |
pair on one line, filled by getResultLabel(n) and |
| 46 |
getResultValue(n). |
| 47 |
|
| 48 |
Title for the dialogue window is obtained by getWindowLabel(). |
| 49 |
*/ |
| 50 |
|
| 51 |
class XAP_Frame; |
| 52 |
class AD_Document; |
| 53 |
class XAP_StringSet; |
| 54 |
|
| 55 |
const UT_uint32 iResultCount = 4; |
| 56 |
|
| 57 |
class ABI_EXPORT XAP_Dialog_DocComparison : public XAP_Dialog_NonPersistent |
| 58 |
{ |
| 59 |
public: |
| 60 |
XAP_Dialog_DocComparison(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); |
| 61 |
|
| 62 |
virtual ~XAP_Dialog_DocComparison(void) {}; |
| 63 |
|
| 64 |
virtual void runModal(XAP_Frame * pFrame) = 0; |
| 65 |
bool calculate(AD_Document * pDoc1, AD_Document * pDoc2); |
| 66 |
|
| 67 |
const char * getWindowLabel() const; |
| 68 |
const char * getButtonLabel() const; |
| 69 |
const char * getFrame1Label() const; |
| 70 |
const char * getFrame2Label() const; |
| 71 |
|
| 72 |
char * getPath1() const; |
| 73 |
char * getPath2() const; |
| 74 |
|
| 75 |
UT_uint32 getResultCount() const {return iResultCount;} |
| 76 |
const char * getResultLabel(UT_uint32 n) const; |
| 77 |
char * getResultValue(UT_uint32 n) const; |
| 78 |
|
| 79 |
private: |
| 80 |
const AD_Document * m_pDoc1; |
| 81 |
const AD_Document * m_pDoc2; |
| 82 |
const XAP_StringSet * m_pSS; |
| 83 |
|
| 84 |
UT_uint32 m_iVersionOfDiff; |
| 85 |
time_t m_tTimeOfDiff; |
| 86 |
UT_uint32 m_iPosOfDiff; |
| 87 |
UT_uint32 m_iPosOfFmtDiff; |
| 88 |
bool m_bStylesEqual; |
| 89 |
}; |
| 90 |
|
| 91 |
#endif /* XAP_DIALOG_DOCCOMPARISON_H */ |