kword

KWordDocIface.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KWORD_DOC_IFACE_H
00021 #define KWORD_DOC_IFACE_H
00022 
00023 #include <KoDocumentIface.h>
00024 #include <dcopref.h>
00025 
00026 #include <qstring.h>
00027 #include <qstringlist.h>
00028 class KWDocument;
00029 
00030 class KWordDocIface : public KoDocumentIface
00031 {
00032     K_DCOP
00033 public:
00034     KWordDocIface(  KWDocument *doc_ );
00035 
00036 k_dcop:
00037     virtual DCOPRef textFrameSet( int num );
00038     virtual DCOPRef frameSet( int num );
00039 
00041     virtual int numFrameSets()const;
00042     virtual int frameSetCount()const;
00043     virtual unsigned int nbColumns()const;
00044 
00045     //paper
00046     virtual double ptPageTop( int pgNum )const;
00047 
00048     //configure
00049     virtual QString unitName()const;
00050 
00051     virtual bool showRuler() const;
00052     virtual bool showdocStruct() const;
00053     virtual bool viewFrameBorders() const;
00054 
00055     virtual bool showGrid() const;
00056     virtual bool snapToGrid() const;
00057 
00058     virtual void setGridX( double _gridX );
00059     virtual void setGridY( double _gridY );
00060     virtual void setShowGrid( bool _b );
00061     virtual void setSnapToGrid( bool _b );
00062     virtual double gridY() const;
00063     virtual double gridX() const;
00064 
00065     virtual bool viewFormattingChars() const;
00066     virtual void setViewFormattingChars(bool _b);
00067 
00068     virtual void setHeaderVisible( bool );
00069     virtual void setFooterVisible( bool );
00070 
00071     virtual bool isHeaderVisible() const;
00072     virtual bool isFooterVisible() const;
00073 
00074     virtual void setViewFrameBorders( bool b );
00075     virtual void setShowRuler(bool b);
00076     virtual void setShowDocStruct(bool _b);
00077 
00078     virtual void recalcAllVariables();
00079     virtual void recalcVariables(int _var);
00080     virtual void recalcVariables(const QString &varName);
00081     bool setCustomVariableValue(const QString & varname, const QString & value);
00082     virtual QString customVariableValue(const QString & varname)const;
00083 
00084     virtual void setStartingPage(int nb);
00085     virtual int startingPage()const;
00086 
00087     virtual void setDisplayLink(bool b);
00088     virtual bool displayLink()const;
00089 
00090     virtual bool backgroundSpellCheckEnabled() const;
00091     virtual void enableBackgroundSpellCheck( bool b );
00092 
00093     virtual void startBackgroundSpellCheck();
00094     virtual void reactivateBgSpellChecking();
00095 
00096     virtual void setConfigUpperCase( bool _uc );
00097     virtual void setConfigUpperUpper( bool _uu );
00098     virtual void setConfigAdvancedAutocorrect( bool _aa );
00099     virtual void setConfigAutoDetectUrl(bool _au);
00100     virtual void setConfigIgnoreDoubleSpace( bool _ids);
00101 
00102     virtual bool configUpperCase() const;
00103     virtual bool configUpperUpper() const;
00104     virtual bool configAdvancedAutoCorrect() const;
00105     virtual bool configAutoDetectUrl() const;
00106     virtual bool configIgnoreDoubleSpace() const;
00107 
00108     virtual void setConfigRemoveSpaceBeginEndLine( bool _space);
00109     virtual void setConfigUseBulletStyle( bool _ubs);
00110 
00111     virtual bool configRemoveSpaceBeginEndLine() const;
00112     virtual bool configUseBulletSyle() const;
00113 
00114     virtual bool configAutoChangeFormat() const;
00115     virtual void setConfigAutoChangeFormat( bool _auto);
00116 
00117     virtual bool configAutoReplaceNumber() const;
00118     virtual void setConfigAutoReplaceNumber( bool b );
00119 
00120     virtual bool showStatusBar() const;
00121     virtual void setShowStatusBar( bool _status );
00122 
00123     void setConfigAutoNumberStyle( bool b );
00124     bool configAutoNumberStyle() const;
00125 
00126     void setConfigToolTipCompletion( bool b );
00127     bool configToolTipCompletion() const;
00128 
00129     void setConfigCompletion( bool b );
00130     bool configCompletion() const;
00131 
00132 
00133     void setConfigAppendSpace( bool b);
00134     bool configAppendSpace() const;
00135 
00136     void setConfigMinWordLength( uint val );
00137     uint configMinWordLength() const;
00138 
00139     void setConfigNbMaxCompletionWord( uint val );
00140     uint configNbMaxCompletionWord() const;
00141 
00142     void setConfigAddCompletionWord( bool b );
00143     bool configAddCompletionWord() const;
00144 
00145     bool configIncludeTwoUpperUpperLetterException() const;
00146     void setConfigIncludeTwoUpperUpperLetterException( bool b);
00147 
00148     bool configIncludeAbbreviation() const;
00149     void setConfigIncludeAbbreviation( bool b);
00150 
00151     bool displayComment()const;
00152     void setDisplayComment( bool b);
00153 
00154     bool configAutoSuperScript() const;
00155     void setConfigAutoSuperScript( bool b);
00156 
00157     void addIgnoreWordAll( const QString &);
00158     void clearIgnoreWordAll( );
00159     QStringList spellListIgnoreAll() const;
00160 
00161     //init/save config
00162     virtual void initConfig();
00163     virtual void saveConfig();
00164 
00165     bool showScrollBar()const;
00166     void setShowScrollBar( bool _status );
00167 
00168     double ptTabStopValue() const;
00169     void setPtTabStopValue ( double _tabStop );
00170 
00171     int footNoteSeparatorLineLength() const;
00172     void setFootNoteSeparatorLineLength( int _length);
00173     void setFootNoteSeparatorLinePosition( const QString &pos);
00174     QString footNoteSeparatorLinePosition()const;
00175 
00176     double footNoteSeparatorLineWidth() const;
00177     void setFootNoteSeparatorLineWidth( double _width);
00178 
00179     void deleteBookMark(const QString &_name);
00180     void renameBookMark(const QString &_oldname, const QString &_newName);
00181     QStringList listOfBookmarkName()const;
00182 
00183     bool displayFieldCode()const;
00184     void setDisplayFieldCode( bool b);
00185     QString configAutoFormatLanguage( )const;
00186 
00187     bool configCapitalizeNameOfDays() const;
00188     void setConfigCapitalizeNameOfDays( bool b);
00189 
00190 private:
00191     KWDocument *doc;
00192 
00193 };
00194 
00195 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys