00001 /* AbiWord 00002 * Copyright (c) 2003 Martin Sevior 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_FORMATFOOTNOTES_H 00021 #define AP_DIALOG_FORMATFOOTNOTES_H 00022 00023 #include "xap_Dialog.h" 00024 #include "ut_xml.h" 00025 #include "fv_View.h" 00026 #include "pd_Document.h" 00027 #include "ut_string.h" 00028 #include "ut_string_class.h" 00029 #include "xap_Frame.h" 00030 #include "fv_View.h" 00031 #include "fl_DocLayout.h" 00032 #include "pd_Document.h" 00033 00034 class XAP_Frame; 00035 00036 class ABI_EXPORT AP_Dialog_FormatFootnotes : public XAP_Dialog_NonPersistent 00037 { 00038 public: 00039 AP_Dialog_FormatFootnotes(XAP_DialogFactory * pDlgFactory, 00040 XAP_Dialog_Id id); 00041 virtual ~AP_Dialog_FormatFootnotes(void); 00042 00043 virtual void runModal(XAP_Frame * pFrame) = 0; 00044 00045 typedef enum { a_OK=0, a_CANCEL=1, a_DELETE=2 } tAnswer; 00046 00047 tAnswer getAnswer(void) const; 00048 void setAnswer(tAnswer a); 00049 void setFrame(XAP_Frame * pFrame); 00050 void setFootnoteVal(UT_sint32 iVal); 00051 UT_sint32 getFootnoteVal(void); 00052 void getFootnoteValString(UT_String & sVal); 00053 void setFootnoteType(FootnoteType iFootType); 00054 FootnoteType getFootnoteType(void); 00055 void setRestartFootnoteOnSection(bool bVal); 00056 bool getRestartFootnoteOnSection(void); 00057 void setRestartFootnoteOnPage(bool bVal); 00058 bool getRestartFootnoteOnPage(void); 00059 00060 void setEndnoteVal(UT_sint32 iVal); 00061 UT_sint32 getEndnoteVal(void); 00062 void getEndnoteValString(UT_String & sVal); 00063 void setEndnoteType(FootnoteType iFootType); 00064 FootnoteType getEndnoteType(void); 00065 void setRestartEndnoteOnSection(bool bVal); 00066 bool getRestartEndnoteOnSection(void); 00067 void setRestartEndnoteOnPage(bool bVal); 00068 bool getRestartEndnoteOnPage(void); 00069 void setPlaceAtDocEnd(bool bVal); 00070 bool getPlaceAtDocEnd(void); 00071 void setPlaceAtSecEnd(bool bVal); 00072 bool getPlaceAtSecEnd(void); 00073 00074 void recalcTextValues(void); 00075 void updateDocWithValues(void); 00076 void setInitialValues(void); 00077 00078 static const FootnoteTypeDesc * getFootnoteTypeLabelList(void); 00079 00080 private: 00081 tAnswer m_answer; 00082 FL_DocLayout * m_pDocLayout; 00083 XAP_Frame * m_pFrame; 00084 FV_View * m_pView; 00085 PD_Document * m_pDoc; 00086 UT_sint32 m_iFootnoteVal; 00087 UT_String m_sFootnoteVal; 00088 FootnoteType m_iFootnoteType; 00089 bool m_bRestartFootSection; 00090 bool m_bRestartFootPage; 00091 UT_sint32 m_iEndnoteVal; 00092 UT_String m_sEndnoteVal; 00093 FootnoteType m_iEndnoteType; 00094 bool m_bRestartEndSection; 00095 bool m_bPlaceAtDocEnd; 00096 bool m_bPlaceAtSecEnd; 00097 }; 00098 00099 #endif /* AP_DIALOG_FORMATFOOTNOTES_H */