Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

annotation.h

Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008     begin                : 2005
00009     copyright            : (C) 2005 by Craig Bradney
00010     email                : cbradney@zip.com.au
00011 ***************************************************************************/
00012 
00013 /***************************************************************************
00014 *                                                                         *
00015 *   This program is free software; you can redistribute it and/or modify  *
00016 *   it under the terms of the GNU General Public License as published by  *
00017 *   the Free Software Foundation; either version 2 of the License, or     *
00018 *   (at your option) any later version.                                   *
00019 *                                                                         *
00020 ***************************************************************************/
00021 
00022 #ifndef ANNOTATION_H
00023 #define ANNOTATION_H
00024 
00025 #ifdef HAVE_CONFIG_H
00026 #include "scconfig.h"
00027 #endif
00028 
00029 #include <QString>
00030 #include "scribusapi.h"
00031 #include "desaxe/saxio.h"
00032 
00033 //FIXME: Someone please fix these variable names.. 
00034 //They are simply moved here, not all fixed.
00035 //TODO make the usage in various places a little simpler
00036 class SCRIBUS_API Annotation : public SaxIO
00037 {
00038     public:
00039         //Do we need a null or an empty QString for these? Remove the qstring initialisations if null is ok.
00040         Annotation() : AnType(0), AnActType(0), AnAction(""), An_E_act(""), An_X_act(""), An_D_act(""),
00041                         An_Fo_act(""), An_Bl_act(""), An_K_act(""), An_F_act(""), An_V_act(""), An_C_act(""),
00042                         AnToolTip(""), AnRollOver(""), AnDown(""), AnBColor(""), An_Extern(""), AnBsty(0),
00043                         AnBwid(1), AnFeed(1), AnZiel(0), AnFlag(0), AnMaxChar(-1), AnVis(0), AnChkStil(0),
00044                         AnFont(4), AnIsChk(false), AnAAact(false), AnHTML(false), AnUseIcons(false),
00045                         AnIPlace(1), AnScaleW(0), AnFormat(0)
00046         {
00047         }
00048         
00049     static const Xml_string saxxDefaultElem;
00050     static void  desaxeRules(const Xml_string& prefixPattern, desaxe::Digester& ruleset, Xml_string elemtag = saxxDefaultElem);
00051     
00052     virtual void saxx(SaxHandler& handler, const Xml_string& elemtag) const;
00053     virtual void saxx(SaxHandler& handler)                     const { saxx(handler, saxxDefaultElem); }
00054 
00055     void setType(int newType) { AnType=newType; }
00056     void setAction(const QString& newAction) { AnAction=newAction; }
00057     void setE_act(const QString& newE_act) { An_E_act=newE_act; }
00058     void setX_act(const QString& newX_act) { An_X_act=newX_act; }
00059     void setD_act(const QString& newD_act) { An_D_act=newD_act; }
00060     void setFo_act(const QString& newFo_act) { An_Fo_act=newFo_act; }
00061     void setBl_act(const QString& newBl_act) { An_Bl_act=newBl_act; }
00062     void setK_act(const QString& newK_act) { An_K_act=newK_act; }
00063     void setF_act(const QString& newF_act) { An_F_act=newF_act; }
00064     void setV_act(const QString& newV_act) { An_V_act=newV_act; }
00065     void setC_act(const QString& newC_act) { An_C_act=newC_act; }
00066     void setExtern(const QString& newExtern) { An_Extern=newExtern; }
00067     void setZiel(int newZiel) { AnZiel=newZiel; }
00068     void setActionType(int newActType) { AnActType=newActType; }
00069     void setToolTip(const QString& newToolTip) { AnToolTip=newToolTip; }
00070     void setRollOver(const QString& newRollOver) { AnRollOver=newRollOver; }
00071     void setDown(const QString& newDown) { AnDown=newDown; }
00072     void setBorderColor(const QString& newBorderColor) { AnBColor=newBorderColor; }
00073     void setBwid(int newBwid) { AnBwid=newBwid; }
00074     void setBsty(int newBsty) { AnBsty=newBsty; }
00075     void setFeed(int newFeed) { AnFeed=newFeed; }
00076     void setFlag(int newFlag) { AnFlag=newFlag; }
00077     void addToFlag(int dFlag) { AnFlag+=dFlag; }
00078     void setMaxChar(int newMaxChar) { AnMaxChar=newMaxChar; }
00079     void setVis(int newVis) { AnVis=newVis; }
00080     void setFont(int newFont) { AnFont=newFont; }
00081     void setChkStil(int newChkStil) { AnChkStil=newChkStil; }
00082     void setFormat(int newFormat) { AnFormat=newFormat; }
00083     void setIsChk(bool newIsChk) { AnIsChk=newIsChk; }
00084     void setAAact(bool newAAct) { AnAAact=newAAct; }
00085     void setHTML(bool newHTML) { AnHTML=newHTML; }
00086     void setUseIcons(bool newUseIcons) { AnUseIcons=newUseIcons; }
00087     void setIPlace(int newIPlace) { AnIPlace=newIPlace; }
00088     void setScaleW(int newScaleW) { AnScaleW=newScaleW; }
00089 
00090     int Type() const { return AnType; }
00091     QString Action() const { return AnAction; }
00092     QString E_act() const { return An_E_act; }
00093     QString X_act() const { return An_X_act; }
00094     QString D_act() const { return An_D_act; }
00095     QString Fo_act() const { return An_Fo_act; }
00096     QString Bl_act() const { return An_Bl_act; }
00097     QString K_act() const { return An_K_act; }
00098     QString F_act() const { return An_F_act; }
00099     QString V_act() const { return An_V_act; }
00100     QString C_act() const { return An_C_act; }
00101     QString Extern() const { return An_Extern; }
00102     int Ziel() const { return AnZiel; }
00103     int ActionType() const { return AnActType; }
00104     QString ToolTip() const { return AnToolTip; }
00105     QString RollOver() const { return AnRollOver; }
00106     QString Down() const { return AnDown; }
00107     QString borderColor() const { return AnBColor; }
00108     int Bwid() const { return AnBwid; }
00109     int Bsty() const { return AnBsty; }
00110     int Feed() const { return AnFeed; }
00111     int Flag() const { return AnFlag; }
00112     int MaxChar() const { return AnMaxChar; }
00113     int Vis() const { return AnVis; }
00114     int Font() const { return AnFont; }
00115     int ChkStil() const { return AnChkStil; }
00116     int Format() const { return AnFormat; }
00117     bool IsChk() const { return AnIsChk; }
00118     bool AAact() const { return AnAAact; }
00119     bool HTML() const { return AnHTML; }
00120     bool UseIcons() const { return AnUseIcons; }
00121     int IPlace() const { return AnIPlace; }
00122     int ScaleW() const { return AnScaleW; }
00123     
00124     protected:
00125         int AnType;
00126         int AnActType;
00127         QString AnAction;
00128         QString An_E_act;
00129         QString An_X_act;
00130         QString An_D_act;
00131         QString An_Fo_act;
00132         QString An_Bl_act;
00133         QString An_K_act;
00134         QString An_F_act;
00135         QString An_V_act;
00136         QString An_C_act;
00137         QString AnToolTip;
00138         QString AnRollOver;
00139         QString AnDown;
00140         QString AnBColor;
00141         QString An_Extern;
00142         int AnBsty;
00143         int AnBwid;
00144         int AnFeed;
00145         int AnZiel;
00146         int AnFlag;
00147         int AnMaxChar;
00148         int AnVis;
00149         int AnChkStil;
00150         int AnFont;
00151         bool AnIsChk;
00152         bool AnAAact;
00153         bool AnHTML;
00154         bool AnUseIcons;
00155         int AnIPlace;
00156         int AnScaleW;
00157         int AnFormat;
00158 };
00159 
00160 #endif
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.