home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / annotation.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-01-29  |  6.5 KB  |  165 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. /***************************************************************************
  8.     begin                : 2005
  9.     copyright            : (C) 2005 by Craig Bradney
  10.     email                : cbradney@zip.com.au
  11. ***************************************************************************/
  12.  
  13. /***************************************************************************
  14. *                                                                         *
  15. *   This program is free software; you can redistribute it and/or modify  *
  16. *   it under the terms of the GNU General Public License as published by  *
  17. *   the Free Software Foundation; either version 2 of the License, or     *
  18. *   (at your option) any later version.                                   *
  19. *                                                                         *
  20. ***************************************************************************/
  21.  
  22. #ifndef ANNOTATION_H
  23. #define ANNOTATION_H
  24.  
  25. #ifdef HAVE_CONFIG_H
  26. #include "scconfig.h"
  27. #endif
  28.  
  29. #include <QString>
  30. #include "scribusapi.h"
  31. #include "desaxe/saxio.h"
  32.  
  33. //FIXME: Someone please fix these variable names.. 
  34. //They are simply moved here, not all fixed.
  35. //TODO make the usage in various places a little simpler
  36. class SCRIBUS_API Annotation : public SaxIO
  37. {
  38.     public:
  39.         //Do we need a null or an empty QString for these? Remove the qstring initialisations if null is ok.
  40.         Annotation() : AnType(0), AnActType(0), AnAction(""), An_E_act(""), An_X_act(""), An_D_act(""),
  41.                         An_Fo_act(""), An_Bl_act(""), An_K_act(""), An_F_act(""), An_V_act(""), An_C_act(""),
  42.                         AnToolTip(""), AnRollOver(""), AnDown(""), AnBColor(""), An_Extern(""), AnBsty(0),
  43.                         AnBwid(1), AnFeed(1), AnZiel(0), AnFlag(0), AnMaxChar(-1), AnVis(0), AnChkStil(0),
  44. //                        AnFont(4), AnIsChk(false), AnAAact(false), AnHTML(false), AnUseIcons(false),
  45.                         AnFont(4), AnIsChk(false), AnAAact(false), AnHTML(0), AnUseIcons(false),
  46.                         AnIPlace(1), AnScaleW(0), AnFormat(0)
  47.         {
  48.         }
  49.         
  50.     static const Xml_string saxxDefaultElem;
  51.     static void  desaxeRules(const Xml_string& prefixPattern, desaxe::Digester& ruleset, Xml_string elemtag = saxxDefaultElem);
  52.     
  53.     virtual void saxx(SaxHandler& handler, const Xml_string& elemtag) const;
  54.     virtual void saxx(SaxHandler& handler)                     const { saxx(handler, saxxDefaultElem); }
  55.  
  56.     void setType(int newType) { AnType=newType; }
  57.     void setAction(const QString& newAction) { AnAction=newAction; }
  58.     void setE_act(const QString& newE_act) { An_E_act=newE_act; }
  59.     void setX_act(const QString& newX_act) { An_X_act=newX_act; }
  60.     void setD_act(const QString& newD_act) { An_D_act=newD_act; }
  61.     void setFo_act(const QString& newFo_act) { An_Fo_act=newFo_act; }
  62.     void setBl_act(const QString& newBl_act) { An_Bl_act=newBl_act; }
  63.     void setK_act(const QString& newK_act) { An_K_act=newK_act; }
  64.     void setF_act(const QString& newF_act) { An_F_act=newF_act; }
  65.     void setV_act(const QString& newV_act) { An_V_act=newV_act; }
  66.     void setC_act(const QString& newC_act) { An_C_act=newC_act; }
  67.     void setExtern(const QString& newExtern) { An_Extern=newExtern; }
  68.     void setZiel(int newZiel) { AnZiel=newZiel; }
  69.     void setActionType(int newActType) { AnActType=newActType; }
  70.     void setToolTip(const QString& newToolTip) { AnToolTip=newToolTip; }
  71.     void setRollOver(const QString& newRollOver) { AnRollOver=newRollOver; }
  72.     void setDown(const QString& newDown) { AnDown=newDown; }
  73.     void setBorderColor(const QString& newBorderColor) { AnBColor=newBorderColor; }
  74.     void setBwid(int newBwid) { AnBwid=newBwid; }
  75.     void setBsty(int newBsty) { AnBsty=newBsty; }
  76.     void setFeed(int newFeed) { AnFeed=newFeed; }
  77.     void setFlag(int newFlag) { AnFlag=newFlag; }
  78.     void addToFlag(int dFlag) { AnFlag+=dFlag; }
  79.     void setMaxChar(int newMaxChar) { AnMaxChar=newMaxChar; }
  80.     void setVis(int newVis) { AnVis=newVis; }
  81.     void setFont(int newFont) { AnFont=newFont; }
  82.     void setChkStil(int newChkStil) { AnChkStil=newChkStil; }
  83.     void setFormat(int newFormat) { AnFormat=newFormat; }
  84.     void setIsChk(bool newIsChk) { AnIsChk=newIsChk; }
  85.     void setAAact(bool newAAct) { AnAAact=newAAct; }
  86. //    void setHTML(bool newHTML) { AnHTML=newHTML; }
  87.     void setHTML(int newHTML) { AnHTML=newHTML; }
  88.     void setUseIcons(bool newUseIcons) { AnUseIcons=newUseIcons; }
  89.     void setIPlace(int newIPlace) { AnIPlace=newIPlace; }
  90.     void setScaleW(int newScaleW) { AnScaleW=newScaleW; }
  91.  
  92.     int Type() const { return AnType; }
  93.     QString Action() const { return AnAction; }
  94.     QString E_act() const { return An_E_act; }
  95.     QString X_act() const { return An_X_act; }
  96.     QString D_act() const { return An_D_act; }
  97.     QString Fo_act() const { return An_Fo_act; }
  98.     QString Bl_act() const { return An_Bl_act; }
  99.     QString K_act() const { return An_K_act; }
  100.     QString F_act() const { return An_F_act; }
  101.     QString V_act() const { return An_V_act; }
  102.     QString C_act() const { return An_C_act; }
  103.     QString Extern() const { return An_Extern; }
  104.     int Ziel() const { return AnZiel; }
  105.     int ActionType() const { return AnActType; }
  106.     QString ToolTip() const { return AnToolTip; }
  107.     QString RollOver() const { return AnRollOver; }
  108.     QString Down() const { return AnDown; }
  109.     QString borderColor() const { return AnBColor; }
  110.     int Bwid() const { return AnBwid; }
  111.     int Bsty() const { return AnBsty; }
  112.     int Feed() const { return AnFeed; }
  113.     int Flag() const { return AnFlag; }
  114.     int MaxChar() const { return AnMaxChar; }
  115.     int Vis() const { return AnVis; }
  116.     int Font() const { return AnFont; }
  117.     int ChkStil() const { return AnChkStil; }
  118.     int Format() const { return AnFormat; }
  119.     bool IsChk() const { return AnIsChk; }
  120.     bool AAact() const { return AnAAact; }
  121. //    bool HTML() const { return AnHTML; }
  122.     int HTML() const { return AnHTML; }
  123.     bool UseIcons() const { return AnUseIcons; }
  124.     int IPlace() const { return AnIPlace; }
  125.     int ScaleW() const { return AnScaleW; }
  126.     
  127.     protected:
  128.         int AnType;
  129.         int AnActType;
  130.         QString AnAction;
  131.         QString An_E_act;
  132.         QString An_X_act;
  133.         QString An_D_act;
  134.         QString An_Fo_act;
  135.         QString An_Bl_act;
  136.         QString An_K_act;
  137.         QString An_F_act;
  138.         QString An_V_act;
  139.         QString An_C_act;
  140.         QString AnToolTip;
  141.         QString AnRollOver;
  142.         QString AnDown;
  143.         QString AnBColor;
  144.         QString An_Extern;
  145.         int AnBsty;
  146.         int AnBwid;
  147.         int AnFeed;
  148.         int AnZiel;
  149.         int AnFlag;
  150.         int AnMaxChar;
  151.         int AnVis;
  152.         int AnChkStil;
  153.         int AnFont;
  154.         bool AnIsChk;
  155.         bool AnAAact;
  156. //        bool AnHTML;
  157.         int AnHTML;
  158.         bool AnUseIcons;
  159.         int AnIPlace;
  160.         int AnScaleW;
  161.         int AnFormat;
  162. };
  163.  
  164. #endif
  165.