filters

textFrame.h

00001 /* A TEXT IS A SET OF TITLES, A (SET OF) PARAGRAPHS OR LISTS */
00002 /*
00003 ** Header file for inclusion with kword_xml2latex.c
00004 **
00005 ** Copyright (C) 2000 Robert JACOLIN
00006 **
00007 ** This library is free software; you can redistribute it and/or
00008 ** modify it under the terms of the GNU Library General Public
00009 ** License as published by the Free Software Foundation; either
00010 ** version 2 of the License, or (at your option) any later version.
00011 **
00012 ** This library is distributed in the hope that it will be useful,
00013 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 ** Library General Public License for more details.
00016 **
00017 ** To receive a copy of the GNU Library General Public License, write to the
00018 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 **
00021 */
00022 
00023 #ifndef __KWORD_LATEX_FRAMETEXT_H__
00024 #define __KWORD_LATEX_FRAMETEXT_H__
00025 
00026 #include <qptrlist.h>
00027 #include "element.h"
00028 //#include "border.h"
00029 #include "para.h"
00030 
00031 /***********************************************************************/
00032 /* Class: TextFrame                                                    */
00033 /***********************************************************************/
00034 
00039 class TextFrame: public Element
00040 {
00041     /* DATA MARKUP */
00042     double  _left,
00043             _top,
00044             _right,
00045             _bottom;
00046     TAround _runaround;
00047     double  _runaroundGap;
00048     TCreate _autoCreate;
00049     TNFrame _newFrameBehaviour;
00050     TSide   _sheetSide;
00051 
00052     /* CHILD MARKUP */
00053     QPtrList<Para> _parags;
00054     //QPtrList<Para> _footnotes;
00055 
00056     /* USEFULL DATA */
00057     EEnv      _lastEnv;
00058     EType     _lastTypeEnum;
00059 
00060     public:
00067         TextFrame();
00068 
00069         /* 
00070          * Destructor
00071          *
00072          * The destructor must remove the list of parag and footnotes.
00073          */
00074         virtual ~TextFrame() 
00075         {
00076             //delete _footnotes;
00077             kdDebug(30522) << "Destruction of a txt frame" << endl;
00078         }
00079 
00083         /*bool    hasColor      () const;
00084         bool    hasUline      () const;*/
00085         double  getLeft       () const { return _left;              }
00086         double  getRight      () const { return _right;             }
00087         double  getTop        () const { return _top;               }
00088         double  getBottom     () const { return _bottom;            }
00089         TAround getRunAround  () const { return _runaround;         }
00090         double  getAroundGap  () const { return _runaroundGap;      }
00091         TCreate getAutoCreate () const { return _autoCreate;        }
00092         TNFrame getNewFrame   () const { return _newFrameBehaviour; }
00093         TSide   getSheetSide  () const { return _sheetSide;         }
00094         Para*   getFirstPara  () const { return _parags.getFirst(); }
00095         EEnv    getNextEnv    (QPtrList<Para>, const int);
00096         bool    isBeginEnum   (Para*, Para*);
00097         bool    isCloseEnum   (Para*, Para*);
00098 
00102         void setLeft      (const double l)    { _left   = l;               }
00103         void setRight     (const double r)    { _right  = r;               }
00104         void setTop       (const double t)    { _top    = t;               }
00105         void setBottom    (const double b)    { _bottom = b;               }
00106 
00107         void setRunAround (const int a)    { _runaround = (TAround) a;  }
00108         void setAroundGap (const double r) { _runaroundGap = r;         }
00109         void setAutoCreate(const int a)    { _autoCreate = (TCreate) a; }
00110         void setNewFrame  (const int n)    { _newFrameBehaviour = (TNFrame) n; }
00111         void setSheetSide (const int s)    { _sheetSide = (TSide) s;    }
00112 
00113         //Para* searchFootnote(const QString);
00114 
00118         void analyse(const QDomNode);
00119 
00123         void generate(QTextStream&);
00124 
00125     private:
00130         void analyseParamFrame(const QDomNode);
00131 
00132 };
00133 
00134 #endif /* __KWORD_LATEX_FRAMETEXT_H__ */
00135 
KDE Home | KDE Accessibility Home | Description of Access Keys