filters

border.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_LATEXBORDER_H__
00024 #define __KWORD_LATEXBORDER_H__
00025 
00026 /***********************************************************************/
00027 /* Class: Border                                                       */
00028 /***********************************************************************/
00029 
00034 class Border
00035 {
00036     /* DATA MARKUP */
00037     int  _lWidth,  _rWidth,   _tWidth, _bWidth;
00038     int  _lRed,    _lGreen,   _lBlue;
00039     int  _rRed,    _rGreen,   _rBlue;
00040     int  _tRed,    _tGreen,   _tBlue;
00041     int  _bRed,    _bGreen,   _bBlue;
00042     int  _lStyle , _rStyle,   _tStyle, _bStyle;
00043     int  _bkRed,   _bkGreen,  _bkBlue;
00044     int  _bleftpt, _brightpt, _btoppt, _bbottompt;
00045 
00046     /* USEFULL DATA */
00047     bool   _hasLeftBorder;
00048     bool   _hasRightBorder;
00049     bool   _hasTopBorder;
00050     bool   _hasBottomBorder;
00051 
00052     public:
00059         Border()
00060         {
00061             _hasLeftBorder   = false;
00062             _hasRightBorder  = false;
00063             _hasTopBorder    = false;
00064             _hasBottomBorder = false;
00065             _lWidth    = 0,
00066             _rWidth    = 0;
00067             _tWidth    = 0;
00068             _bWidth    = 0;
00069             _lRed      = 0;
00070             _lGreen    = 0;
00071             _lBlue     = 0;
00072             _rRed      = 0;
00073             _rGreen    = 0;
00074             _rBlue     = 0;
00075             _tRed      = 0;
00076             _tGreen    = 0;
00077             _tBlue     = 0;
00078             _bRed      = 0;
00079             _bGreen    = 0;
00080             _bBlue     = 0;
00081             _lStyle    = 0;
00082             _rStyle    = 0;
00083             _tStyle    = 0;
00084             _bStyle    = 0;
00085             _bkRed     = 0;
00086             _bkGreen   = 0;
00087             _bkBlue    = 0;
00088             _bleftpt   = 0;
00089             _brightpt  = 0;
00090             _btoppt    = 0;
00091             _bbottompt = 0;
00092         }
00093 
00094         /* 
00095          * Destructor
00096          *
00097          * The destructor must remove the list of parag and footnotes.
00098          */
00099         virtual ~Border() {}
00100 
00105         bool    hasLeftBorder  () const { return _hasLeftBorder;   }
00106         bool    hasRightBorder () const { return _hasRightBorder;  }
00107         bool    hasTopBorder   () const { return _hasTopBorder;    }
00108         bool    hasBottomBorder() const { return _hasBottomBorder; }
00109         int     getLeftWidth   () const { return _lWidth;          }
00110         int     getRightWidth  () const { return _rWidth;          }
00111         int     getTopWidth    () const { return _tWidth;          }
00112         int     getBottomWidth () const { return _bWidth;          }
00113         int     getLeftRed     () const { return _lRed;            }
00114         int     getLeftGreen   () const { return _lGreen;          }
00115         int     getLeftBlue    () const { return _lBlue;           }
00116         int     getRightRed    () const { return _rRed;            }
00117         int     getRightGreen  () const { return _rGreen;          }
00118         int     getRightBlue   () const { return _rBlue;           }
00119         int     getTopRed      () const { return _tRed;            }
00120         int     getTopGreen    () const { return _tGreen;          }
00121         int     getTopBlue     () const { return _tBlue;           }
00122         int     getBottomRed   () const { return _bRed;            }
00123         int     getBottomGreen () const { return _bGreen;          }
00124         int     getBottomBlue  () const { return _bBlue;           }
00125         int     getLeftStyle   () const { return _lStyle;          }
00126         int     getRightStyle  () const { return _rStyle;          }
00127         int     getTopStyle    () const { return _tStyle;          }
00128         int     getBottomStyle () const { return _bStyle;          }
00129         int     getBkRed       () const { return _bkRed;           }
00130         int     getBkGreen     () const { return _bkGreen;         }
00131         int     betBkBlue      () const { return _bkBlue;          }
00132 /*      int     bleftpt        () const { return _bleftpt;         }
00133         int     brightpt       () const { return _brightpt;        }
00134         int     btoppt         () const { return _btoppt;          }
00135         int     bbottompt      () const { return _bbottompt;       }
00136 */
00137 
00141         void useLeftBorder  ()              { _hasLeftBorder   = true; }
00142         void useRightBorder ()              { _hasRightBorder  = true; }
00143         void useTopBorder   ()              { _hasTopBorder    = true; }
00144         void useBottomBorder()              { _hasBottomBorder = true; }
00145 
00146         void setLeftWidth  (const int w)    { _lWidth          = w; }
00147         void setRightWidth (const int w)    { _rWidth          = w; }
00148         void setTopWidth   (const int w)    { _tWidth          = w; }
00149         void setBottomWidth(const int w)    { _bWidth          = w; }
00150 
00151         void setLeftRed    (const int r)    { _lRed            = r; }
00152         void setLeftGreen  (const int g)    { _lGreen          = g; }
00153         void setLeftBlue   (const int b)    { _lBlue           = b; }
00154         void setRightRed   (const int r)    { _rRed            = r; }
00155         void setRightGreen (const int g)    { _rGreen          = g; }
00156         void setRightBlue  (const int b)    { _rBlue           = b; }
00157         void setTopRed     (const int r)    { _tRed            = r; }
00158         void setTopGreen   (const int g)    { _tGreen          = g; }
00159         void setTopBlue    (const int b)    { _tBlue           = b; }
00160         void setBottomRed  (const int r)    { _bRed            = r; }
00161         void setBottomGreen(const int g)    { _bGreen          = g; }
00162         void setBottomBlue (const int b)    { _bBlue           = b; }
00163 
00164         void setLeftStyle  (const int l)    { _lStyle          = l; }
00165         void setRightStyle (const int r)    { _rStyle          = r; }
00166         void setTopStyle   (const int t)    { _tStyle          = t; }
00167         void setBottomStyle(const int b)    { _bStyle          = b; }
00168 
00169         void setBkRed      (const int r)    { _bkRed           = r; }
00170         void setBkGreen    (const int g)    { _bkGreen         = g; }
00171         void setBkBlue     (const int b)    { _bkBlue          = b; }
00172 /*      void setBLeftPt    (const int l)    { _bkLeftPt        = l; }
00173         void setBRightPt   (const int r)    { _bkRightPt       = r; }
00174         void setBTopPt     (const int t)    { _bkTopPt         = t; }
00175         void setBBottomPt  (const int b)    { _bkBottomPt      = b; }
00176 */
00177 
00181         void generate(QTextStream&);
00182 
00183     private:
00184 };
00185 
00186 #endif /* __KWORD_LATEXBORDER_H__ */
00187 
KDE Home | KDE Accessibility Home | Description of Access Keys