1 /* AbiWord 2 * Copyright (C) 2002 Patrick Lam <plam@mit.edu> 3 * Copyright (C) 1998 AbiSource, Inc. 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 * 02110-1301 USA. 19 * 20 */ 21 22 #ifndef FOOTNOTECONTAINER_H 23 #define FOOTNOTECONTAINER_H 24 25 #ifdef FMT_TEST 26 #include <stdio.h> 27 #endif 28 29 #include "ut_misc.h" 30 #include "ut_types.h" 31 #include "ut_vector.h" 32 #include "pt_Types.h" 33 #include "fp_Page.h" 34 #include "fp_ContainerObject.h" 35 #include "fp_Column.h" 36 #include "gr_Graphics.h" 37 38 class fl_TableLayout; 39 class fl_DocSectionLayout; 40 41 class ABI_EXPORT fp_FootnoteContainer : public fp_VerticalContainer 42 { 43 public: 44 fp_FootnoteContainer(fl_SectionLayout* pSectionLayout); 45 virtual ~fp_FootnoteContainer(); 46 UT_sint32 getValue(void); 47 void layout(void); isVBreakable(void)48 virtual bool isVBreakable(void) {return false;} 49 virtual void clearScreen(void); 50 virtual void draw(dg_DrawArgs*); draw(GR_Graphics *)51 virtual void draw(GR_Graphics*) {} 52 virtual void setContainer(fp_Container * pContainer); 53 virtual fp_Container * getNextContainerInSection(void) const; 54 virtual fp_Container * getPrevContainerInSection(void) const; getPage(void)55 virtual fp_Page * getPage(void) { return m_pPage;} 56 void setPage(fp_Page * pPage); 57 fl_DocSectionLayout * getDocSectionLayout(void); 58 private: 59 fp_Page * m_pPage; 60 }; 61 62 63 class ABI_EXPORT fp_AnnotationContainer : public fp_VerticalContainer 64 { 65 public: 66 fp_AnnotationContainer(fl_SectionLayout* pSectionLayout); 67 virtual ~fp_AnnotationContainer(); 68 UT_sint32 getValue(void); 69 void layout(void); isVBreakable(void)70 virtual bool isVBreakable(void) {return false;} 71 virtual void clearScreen(void); 72 virtual void draw(dg_DrawArgs*); draw(GR_Graphics *)73 virtual void draw(GR_Graphics*) {} 74 virtual void setY(UT_sint32 iY); 75 virtual void setContainer(fp_Container * pContainer); 76 virtual fp_Container * getNextContainerInSection(void) const; 77 virtual fp_Container * getPrevContainerInSection(void) const; getPage(void)78 virtual fp_Page * getPage(void) { return m_pPage;} 79 void setPage(fp_Page * pPage); 80 fl_DocSectionLayout * getDocSectionLayout(void); 81 UT_uint32 getPID(void); 82 private: 83 fp_Page * m_pPage; 84 UT_sint32 m_iLabelWidth; 85 UT_sint32 m_iXLabel; 86 UT_sint32 m_iYLabel; 87 }; 88 89 90 class ABI_EXPORT fp_EndnoteContainer : public fp_VerticalContainer 91 { 92 public: 93 fp_EndnoteContainer(fl_SectionLayout* pSectionLayout); 94 virtual ~fp_EndnoteContainer(); 95 UT_sint32 getValue(void); 96 void layout(void); isVBreakable(void)97 virtual bool isVBreakable(void) {return false;} 98 virtual void clearScreen(void); 99 virtual void draw(dg_DrawArgs*); draw(GR_Graphics *)100 virtual void draw(GR_Graphics*) {} 101 virtual void setContainer(fp_Container * pContainer); 102 virtual fp_Container * getNextContainerInSection(void) const; 103 virtual fp_Container * getPrevContainerInSection(void) const; getPage(void)104 virtual fp_Page * getPage(void) { return fp_Container::getPage();} 105 fp_EndnoteContainer * getLocalNext(void); 106 fp_EndnoteContainer * getLocalPrev(void); 107 fl_DocSectionLayout * getDocSectionLayout(void); 108 virtual void setY(UT_sint32 iY); 109 virtual UT_sint32 getY(void) const; 110 111 private: 112 fp_EndnoteContainer * m_pLocalNext; 113 fp_EndnoteContainer * m_pLocalPrev; 114 UT_sint32 m_iY; 115 bool m_bOnPage; 116 bool m_bCleared; 117 }; 118 119 #endif /* FOOTNOTECONTAINER_H */ 120