00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FV_VIEW_H
00022 #define FV_VIEW_H
00023
00024 #ifdef HAVE_CONFIG_H
00025 #include "config.h"
00026 #endif
00027
00028 #include <string>
00029
00030 #include "xap_Features.h"
00031 #include "ut_types.h"
00032 #include "xav_View.h"
00033 #include "pt_Types.h"
00034 #include "fp_types.h"
00035 #ifdef ENABLE_SPELL
00036 #include "fl_Squiggles.h"
00037 #endif
00038 #include "ev_EditBits.h"
00039
00040
00041
00042 #include "fv_FrameEdit.h"
00043 #include "fv_Selection.h"
00044 #include "fv_InlineImage.h"
00045
00046 #ifdef TOOLKIT_GTK
00047 #include "fv_UnixVisualDrag.h"
00048 #include "fv_UnixFrameEdit.h"
00049 #include "fv_UnixInlineImage.h"
00050 #else
00051 #include "fv_VisualDragText.h"
00052 #endif
00053
00054 #define AUTO_SCROLL_MSECS 100
00055
00056 class FL_DocLayout;
00057 class FV_Caret_Listener;
00058
00059 class fl_DocSectionLayout;
00060 class fl_HdrFtrSectionLayout;
00061 class fl_DocListener;
00062 class fl_BlockLayout;
00063 class fl_PartOfBlock;
00064 class fl_AutoNum;
00065 class fl_EndnoteLayout;
00066
00067 class fp_PageSize;
00068 class fp_Page;
00069 class fp_Run;
00070 class fp_HyperlinkRun;
00071 class fp_CellContainer;
00072
00073 class FG_Graphic;
00074
00075 class PD_Document;
00076 class PP_AttrProp;
00077 class PP_RevisionAttr;
00078
00079 class GR_Graphics;
00080 struct dg_DrawArgs;
00081
00082 class UT_Worker;
00083 class UT_Timer;
00084 class UT_UTF8String;
00085
00086 class AP_TopRulerInfo;
00087 class AP_LeftRulerInfo;
00088 class AP_TopRuler;
00089 class AP_LeftRuler;
00090
00091 class AP_Dialog_SplitCells;
00092
00093 class XAP_App;
00094 class XAP_Prefs;
00095
00096 class SpellChecker;
00097
00098 class CellLine;
00099
00100 typedef enum
00101 {
00102 hori_left,
00103 hori_mid,
00104 hori_right,
00105 vert_above,
00106 vert_mid,
00107 vert_below
00108 } AP_CellSplitType;
00109
00110
00111 typedef enum _AP_JumpTarget
00112 {
00113 AP_JUMPTARGET_PAGE,
00114 AP_JUMPTARGET_LINE,
00115 AP_JUMPTARGET_BOOKMARK,
00116 AP_JUMPTARGET_PICTURE
00117 } AP_JumpTarget;
00118
00119 struct fv_ChangeState
00120 {
00121 bool bUndo;
00122 bool bRedo;
00123 bool bDirty;
00124 bool bSelection;
00125 UT_uint32 iColumn;
00126 const gchar ** propsChar;
00127 const gchar ** propsBlock;
00128 const gchar ** propsSection;
00129 };
00130
00131 struct FV_DocCount
00132 {
00133 UT_uint32 word;
00134 UT_uint32 para;
00135 UT_uint32 ch_no;
00136 UT_uint32 ch_sp;
00137 UT_uint32 line;
00138 UT_uint32 page;
00139
00140 UT_uint32 words_no_hdrftr;
00141 };
00142
00143 class ABI_EXPORT fv_PropCache
00144 {
00145 public:
00146 fv_PropCache(void);
00147 ~fv_PropCache(void);
00148 UT_uint32 getTick(void) const;
00149 void setTick(UT_uint32 iTick);
00150 bool isValid(void) const;
00151 const gchar ** getCopyOfProps(void) const;
00152 void fillProps(UT_uint32 numProps, const gchar ** props);
00153 void clearProps(void);
00154 private:
00155 UT_uint32 m_iTick;
00156 UT_uint32 m_iNumProps;
00157 gchar ** m_pszProps;
00158 };
00159
00160 enum FV_BIDI_Order
00161 {
00162 FV_Order_Visual = 0,
00163 FV_Order_Logical_LTR = UT_BIDI_LTR,
00164 FV_Order_Logical_RTL = UT_BIDI_RTL
00165 };
00166
00167 class ABI_EXPORT fv_CaretProps
00168 {
00169 public:
00170 fv_CaretProps(FV_View * pView, PT_DocPosition InsPoint);
00171 virtual ~fv_CaretProps(void);
00172 PT_DocPosition m_iInsPoint;
00173 UT_sint32 m_xPoint;
00174 UT_sint32 m_yPoint;
00175 UT_sint32 m_xPoint2;
00176 UT_sint32 m_yPoint2;
00177 bool m_bPointDirection;
00178 bool m_bDefaultDirectionRtl;
00179 bool m_bUseHebrewContextGlyphs;
00180 bool m_bPointEOL;
00181 UT_uint32 m_iPointHeight;
00182 UT_RGBColor m_caretColor;
00183 FV_Caret_Listener* m_PropCaretListner;
00184 GR_Caret* m_pCaret;
00185 UT_uint32 m_ListenerID;
00186 FV_View* m_pView;
00187 UT_sint32 m_iAuthorId;
00188 std::string m_sCaretID;
00189 };
00190
00191 class ABI_EXPORT FV_View : public AV_View
00192 {
00193 friend class fl_DocListener;
00194 friend class fl_BlockLayout;
00195 friend class FL_DocLayout;
00196 friend class fl_Squiggles;
00197 friend class fl_DocSectionLayout;
00198 friend class GR_Caret;
00199 friend class FV_FrameEdit;
00200 friend class FV_VisualDragText;
00201 friend class FV_VisualInlineImage;
00202 friend class FV_Selection;
00203 friend class CellLine;
00204
00205 public:
00206 FV_View(XAP_App*, void*, FL_DocLayout*);
00207 virtual ~FV_View();
00208
00209 virtual inline GR_Graphics* getGraphics(void) const { return m_pG; }
00210 void setGraphics(GR_Graphics *pG);
00211 void replaceGraphics(GR_Graphics *pG);
00212
00213 virtual inline PT_DocPosition getPoint(void) const { return m_iInsPoint; }
00214 PT_DocPosition getSelectionAnchor(void) const;
00215 PT_DocPosition getSelectionLeftAnchor(void) const;
00216 PT_DocPosition getSelectionRightAnchor(void) const;
00217 UT_uint32 getSelectionLength(void) const;
00218
00219 UT_sint32 getFrameMargin(void) const;
00220
00221 virtual void focusChange(AV_Focus focus);
00222 virtual bool isActive(void);
00223
00224 virtual void setXScrollOffset(UT_sint32);
00225 virtual void setYScrollOffset(UT_sint32);
00226 virtual void cmdScroll(AV_ScrollCmd cmd, UT_uint32 iPos = 0);
00227
00228 virtual void cmdHyperlinkJump(UT_sint32 xPos, UT_sint32 yPos);
00229 void cmdHyperlinkJump(PT_DocPosition pos);
00230 void cmdHyperlinkCopyLocation(PT_DocPosition pos);
00231
00232 virtual void draw(const UT_Rect* pRect=static_cast<UT_Rect*>(NULL));
00233 virtual void drawSelectionBox(UT_Rect & box, bool drawHandles);
00234 private:
00235 inline void _drawResizeHandle(UT_Rect & box);
00236
00237 public:
00238 const PP_AttrProp * getAttrPropForPoint() const;
00239
00240 virtual bool notifyListeners(const AV_ChangeMask hint);
00241
00242 virtual bool canDo(bool bUndo) const;
00243 virtual UT_uint32 undoCount (bool bUndo) const;
00244 virtual void cmdUndo(UT_uint32 count);
00245 virtual void cmdRedo(UT_uint32 count);
00246 virtual UT_Error cmdSave(void);
00247 virtual UT_Error cmdSaveAs(const char * szFilename, int ieft);
00248 virtual UT_Error cmdSaveAs(const char * szFilename, int ieft, bool cpy);
00249
00250 UT_Error cmdInsertField(const char* szName, const gchar ** extra_attrs = NULL, const gchar ** extra_props = NULL);
00251 UT_Error cmdInsertBookmark(const char* szName);
00252 UT_Error cmdDeleteBookmark(const char* szName);
00253 UT_Error cmdInsertHyperlink(const char* szName);
00254 fp_Run * getHyperLinkRun(PT_DocPosition pos);
00255 UT_Error cmdDeleteHyperlink();
00256 bool cmdInsertMathML(const char * szFileName,
00257 PT_DocPosition pos);
00258 bool cmdInsertEmbed(UT_ByteBuf * pBuf,PT_DocPosition pos,const char * szMime,const char * szProps);
00259 bool cmdUpdateEmbed(UT_ByteBuf * pBuf, const char * szMime, const char * szProps);
00260 bool cmdUpdateEmbed(fp_Run * pRun, UT_ByteBuf * pBuf, const char * szMime, const char * szProps);
00261 bool cmdDeleteEmbed(fp_Run * pRun);
00262
00263 bool cmdInsertLatexMath(UT_UTF8String & sLatex,
00264 UT_UTF8String & sMath);
00265
00266 UT_Error cmdInsertTOC(void);
00267 UT_Error cmdHyperlinkStatusBar(UT_sint32 xPos, UT_sint32 yPos);
00268
00269 UT_Error cmdInsertGraphic(FG_Graphic*);
00270 UT_Error cmdInsertGraphicAtStrux(FG_Graphic* pFG, PT_DocPosition iPos, PTStruxType iStruxType);
00271 virtual void toggleCase(ToggleCase c);
00272 virtual void setPaperColor(const gchar * clr);
00273
00274 virtual bool isDocumentPresent(void);
00275 virtual void cmdCopy(bool bToClipboard = true);
00276 virtual void cmdCut(void);
00277 virtual void cmdPaste(bool bHonorFormatting = true);
00278 virtual void cmdPasteSelectionAt(UT_sint32 xPos, UT_sint32 yPos);
00279
00280 void pasteFromLocalTo(PT_DocPosition pos);
00281 void _pasteFromLocalTo(PT_DocPosition pos);
00282 void copyToLocal(PT_DocPosition pos1, PT_DocPosition pos2);
00283 void copyTextToClipboard(const UT_UCS4String sIncoming, bool useClipboard=true);
00284
00285 virtual void getTopRulerInfo(AP_TopRulerInfo * pInfo);
00286 virtual void getTopRulerInfo(PT_DocPosition pos, AP_TopRulerInfo * pInfo);
00287 virtual void getLeftRulerInfo(AP_LeftRulerInfo * pInfo);
00288 virtual void getLeftRulerInfo(PT_DocPosition pos, AP_LeftRulerInfo * pInfo);
00289 virtual void setCursorWait(void);
00290 virtual void clearCursorWait(void);
00291 virtual void setCursorToContext(void);
00292 EV_EditMouseContext getLastMouseContext(void);
00293 void getMousePos(UT_sint32 * x, UT_sint32 * y);
00294
00295 virtual EV_EditMouseContext getMouseContext(UT_sint32 xPos, UT_sint32 yPos);
00296 EV_EditMouseContext _getMouseContext(UT_sint32 xPos, UT_sint32 yPos);
00297 virtual EV_EditMouseContext getInsertionPointContext(UT_sint32 * pxPos, UT_sint32 * pyPos);
00298 void setPrevMouseContext(EV_EditMouseContext emc)
00299 {m_prevMouseContext = emc;}
00300
00301 virtual void updateLayout(void);
00302 virtual void rebuildLayout(void);
00303 virtual void remeasureCharsWithoutRebuild();
00304 virtual void fontMetricsChange();
00305 virtual bool isSelectionEmpty(void) const;
00306 bool isSelectAll(void) const
00307 { return m_Selection.isSelectAll();}
00308 virtual void cmdUnselectSelection(void);
00309 void getDocumentRangeOfCurrentSelection(PD_DocumentRange * pdr) const;
00310 PT_DocPosition mapDocPos( FV_DocPos dp );
00311 PT_DocPosition mapDocPosSimple( FV_DocPos dp );
00312 PT_DocPosition saveSelectedImage (const char * toFile );
00313 PT_DocPosition saveSelectedImage (const UT_ByteBuf ** outByteBuf);
00314 PT_DocPosition getSelectedImage(const char **dataId) const;
00315 fp_Run *getSelectedObject(void) const;
00316
00317 void getTextInCurrentBlock(UT_GrowBuf & buf) const;
00318 void getTextInCurrentSection(UT_GrowBuf & buf) const;
00319 void getTextInDocument(UT_GrowBuf & buf) const;
00320 bool getLineBounds(PT_DocPosition pos, PT_DocPosition *start, PT_DocPosition *end);
00321 UT_UCSChar getChar(PT_DocPosition pos, UT_sint32 *x = NULL, UT_sint32 *y = NULL, UT_uint32 *width = NULL, UT_uint32 *height = NULL);
00322
00323
00324 FL_DocLayout* getLayout() const;
00325 UT_uint32 getCurrentPageNumForStatusBar(void) const;
00326 fp_Page* getCurrentPage(void) const;
00327 fl_BlockLayout* getCurrentBlock(void) const;
00328
00329 void draw(int page, dg_DrawArgs* da);
00330
00331
00332
00333 void getPageScreenOffsets(const fp_Page* pPage, UT_sint32& xoff, UT_sint32& yoff);
00334 void getPageYOffset(fp_Page* pPage, UT_sint32& yoff)const;
00335 virtual UT_sint32 getPageViewLeftMargin(void) const;
00336 virtual UT_sint32 getPageViewTopMargin(void) const;
00337 virtual UT_sint32 getPageViewSep(void) const;
00338
00339 bool setSectionFormat(const gchar * properties[]);
00340 bool getSectionFormat(const gchar *** properties) const;
00341
00342 bool setBlockIndents(bool doLists, double indentChange, double page_size);
00343 bool setCollapsedRange(PT_DocPosition posLow,PT_DocPosition posHigh, const gchar * properties[]);
00344 bool setBlockFormat(const gchar * properties[]);
00345 bool getBlockFormat(const gchar *** properties,bool bExpandStyles=true) const;
00346 bool removeStruxAttrProps(PT_DocPosition ipos1, PT_DocPosition ipos2, PTStruxType iStrux,const gchar * attributes[] ,const gchar * properties[]);
00347 bool isImageAtStrux(PT_DocPosition ipos1, PTStruxType iStrux);
00348
00349 bool processPageNumber(HdrFtrType hfType, const gchar ** atts);
00350
00351 #ifdef ENABLE_SPELL
00352 bool isTextMisspelled()const ;
00353 #endif
00354 bool isTabListBehindPoint(UT_sint32 & iNumToDelete) const;
00355 bool isTabListAheadPoint(void) const;
00356 void processSelectedBlocks(FL_ListType listType);
00357 void getBlocksInSelection(UT_GenericVector<fl_BlockLayout*> * vBlock) const;
00358 UT_sint32 getNumColumnsInSelection(void) const;
00359 UT_sint32 getNumRowsInSelection(void) const;
00360 void getAllBlocksInList(UT_GenericVector<fl_BlockLayout *> * vBlock) const;
00361 bool isPointBeforeListLabel(void) const;
00362 bool isCurrentListBlockEmpty(void) const;
00363 bool cmdStartList(const gchar * style);
00364 bool cmdStopList(void);
00365 void changeListStyle(fl_AutoNum* pAuto,
00366 FL_ListType lType,
00367 UT_uint32 startv,
00368 const gchar* pszDelim,
00369 const gchar* pszDecimal,
00370 const gchar* pszFormat,
00371 float Aligm,
00372 float Indent);
00373
00374 void setDontChangeInsPoint(void);
00375 void allowChangeInsPoint(void);
00376
00377 bool getAttributes(const PP_AttrProp ** ppSpanAP, const PP_AttrProp ** ppBlockAP = NULL, PT_DocPosition posStart = 0) const;
00378
00379
00380
00381
00382 bool getAllAttrProp(const PP_AttrProp *& pSpanAP, const PP_AttrProp *& pBlockAP, const PP_AttrProp *& pSectionAP, const PP_AttrProp *& pDocAP) const;
00383 bool queryCharFormat(const gchar * szProperty, UT_UTF8String & szValue, bool & bExplicitlyDefined, bool & bMixedSelection) const;
00384 bool queryCharFormat(const gchar * szProperty, UT_UTF8String & szValue, bool & bExplicitlyDefined, PT_DocPosition position) const;
00385
00386
00387 bool setCharFormat(const gchar * properties[], const gchar * attribs[] = NULL);
00388 bool resetCharFormat(bool bAll);
00389 bool getCharFormat(const gchar *** properties,bool bExpandStyles=true) const;
00390 bool getCharFormat(const gchar *** properties,bool bExpandStyles, PT_DocPosition posStart) const;
00391 fl_BlockLayout * getBlockFromSDH(PL_StruxDocHandle sdh);
00392 bool setStyle(const gchar * style, bool bDontGeneralUpdate=false);
00393 bool setStyleAtPos(const gchar * style, PT_DocPosition posStart, PT_DocPosition posEnd, bool bDontGeneralUpdate=false);
00394 bool isNumberedHeadingHere(fl_BlockLayout * pBlock) const;
00395 bool getStyle(const gchar ** style) const;
00396 bool appendStyle(const gchar ** style);
00397
00398 UT_uint32 getCurrentPageNumber(void) const;
00399
00400 bool getEditableBounds(bool bEnd, PT_DocPosition & docPos, bool bOverride=false)const;
00401
00402 bool isParaBreakNeededAtPos(PT_DocPosition pos) const;
00403 bool insertParaBreakIfNeededAtPos(PT_DocPosition pos);
00404 void insertParagraphBreak(void);
00405 void insertParagraphBreaknoListUpdate(void);
00406 void insertSectionBreak( BreakSectionType type);
00407 void insertSectionBreak(void);
00408 void insertSymbol(UT_UCSChar c, const gchar * symfont);
00409
00410
00411 bool isLeftMargin(UT_sint32 xPos, UT_sint32 yPos) const;
00412 void cmdSelect(UT_sint32 xPos, UT_sint32 yPos, FV_DocPos dpBeg, FV_DocPos dpEnd);
00413 void cmdSelectTOC(UT_sint32 xPos, UT_sint32 yPos);
00414 bool isTOCSelected(void) const;
00415 bool setTOCProps(PT_DocPosition pos, const char * szProps);
00416
00417 void cmdSelect(PT_DocPosition dpBeg, PT_DocPosition dpEnd);
00418 void cmdCharMotion(bool bForward, UT_uint32 count);
00419 bool cmdCharInsert(const UT_UCSChar * text, UT_uint32 count, bool bForce = false);
00420 void cmdCharDelete(bool bForward, UT_uint32 count);
00421 void delTo(FV_DocPos dp);
00422 void getSelectionText(UT_UCS4Char *& text) const;
00423
00424 UT_UCSChar * getTextBetweenPos(PT_DocPosition pos1, PT_DocPosition pos2) const;
00425 inline PT_DocPosition getInsPoint () const { return m_iInsPoint; }
00426 void warpInsPtToXY(UT_sint32 xPos, UT_sint32 yPos, bool bClick);
00427 void moveInsPtTo(FV_DocPos dp, bool bClearSelection = true);
00428 void moveInsPtTo(PT_DocPosition dp);
00429 void warpInsPtNextPrevPage(bool bNext);
00430 void warpInsPtNextPrevLine(bool bNext);
00431 void warpInsPtNextPrevScreen(bool bNext);
00432 void extSelHorizontal(bool bForward, UT_uint32 count);
00433 void extSelToXY(UT_sint32 xPos, UT_sint32 yPos, bool bDrag);
00434 void extSelToXYword(UT_sint32 xPos, UT_sint32 yPos, bool bDrag);
00435 void extSelTo(FV_DocPos dp);
00436
00437 #ifdef ENABLE_SPELL
00438 SpellChecker * getDictForSelection () const;
00439 #endif
00440 void extSelNextPrevLine(bool bNext);
00441 void extSelNextPrevPage(bool bNext);
00442 void extSelNextPrevScreen(bool bNext);
00443 void endDrag(UT_sint32 xPos, UT_sint32 yPos);
00444
00445 void endDragSelection(UT_sint32 xPos, UT_sint32 yPos);
00446
00447 PT_DocPosition getDocPositionFromXY(UT_sint32 xpos, UT_sint32 ypos, bool bNotFrames = false);
00448 PT_DocPosition getDocPositionFromLastXY(void);
00449
00450 fl_BlockLayout* getBlockAtPosition(PT_DocPosition pos) const {return _findBlockAtPosition(pos);};
00451 virtual void updateScreen(bool bDirtyRunsOnly=true);
00452 bool isInDocSection(PT_DocPosition pos = 0) const;
00453
00454
00455
00456
00457 void cutVisualText(UT_sint32 x, UT_sint32 y);
00458 void copyVisualText(UT_sint32 x, UT_sint32 y);
00459 void dragVisualText(UT_sint32 x, UT_sint32 y);
00460 void pasteVisualText(UT_sint32 x, UT_sint32 y);
00461 void btn0VisualDrag(UT_sint32 x, UT_sint32 y);
00462 const FV_VisualDragText * getVisualText(void) const
00463 { return &m_VisualDragText;}
00464 FV_VisualDragText * getVisualText(void)
00465 { return &m_VisualDragText;}
00466 const UT_ByteBuf * getLocalBuf(void) const;
00467
00468
00469
00470
00471 void btn0InlineImage(UT_sint32 x, UT_sint32 y);
00472 void btn1InlineImage(UT_sint32 x, UT_sint32 y);
00473 void btn1CopyImage(UT_sint32 x, UT_sint32 y);
00474 void dragInlineImage(UT_sint32 x, UT_sint32 y);
00475 void releaseInlineImage(UT_sint32 x, UT_sint32 y);
00476
00477
00478
00479
00480 FV_FrameEdit * getFrameEdit(void);
00481 void btn0Frame(UT_sint32 x, UT_sint32 y);
00482 void btn1Frame(UT_sint32 x, UT_sint32 y);
00483 void dragFrame(UT_sint32 x, UT_sint32 y);
00484 void releaseFrame(UT_sint32 x, UT_sint32 y);
00485 bool isInFrame(PT_DocPosition pos);
00486 void deleteFrame(void);
00487 void cutFrame(void);
00488 void selectFrame(void);
00489 fl_FrameLayout * getFrameLayout(PT_DocPosition pos);
00490 fl_FrameLayout * getFrameLayout(void);
00491 void setFrameFormat(const gchar ** props);
00492 void setFrameFormat(const gchar ** attribs, const gchar ** props);
00493 void setFrameFormat(const gchar ** props,FG_Graphic * pFG, const std::string & dataID);
00494 void convertInLineToPositioned(PT_DocPosition pos,
00495 const gchar ** attribs);
00496
00497 bool convertPositionedToInLine(fl_FrameLayout * pFrame);
00498 UT_Error cmdInsertPositionedGraphic(FG_Graphic* pFG,UT_sint32 mouseX, UT_sint32 mouseY);
00499 UT_Error cmdInsertPositionedGraphic(FG_Graphic* pFG);
00500
00501
00502
00503 bool isPosSelected(PT_DocPosition pos) const;
00504 bool isXYSelected(UT_sint32 xPos, UT_sint32 yPos) const;
00505 FV_SelectionMode getSelectionMode(void) const;
00506 FV_SelectionMode getPrevSelectionMode(void) const;
00507 PD_DocumentRange * getNthSelection(UT_sint32 i) const;
00508 UT_sint32 getNumSelections(void) const;
00509 void setSelectionMode(FV_SelectionMode selMode);
00510 #ifdef ENABLE_SPELL
00511
00512
00513
00514 UT_UCSChar * getContextSuggest(UT_uint32 ndx);
00515 void cmdContextSuggest(UT_uint32 ndx, fl_BlockLayout * ppBL = NULL, fl_PartOfBlock * ppPOB = NULL);
00516 void cmdContextIgnoreAll(void);
00517 void cmdContextAdd(void);
00518 #endif
00519
00520
00521
00522 bool isInHdrFtr(PT_DocPosition pos);
00523 void setHdrFtrEdit(fl_HdrFtrShadow * pShadow);
00524 void clearHdrFtrEdit(void);
00525 bool isHdrFtrEdit(void);
00526 fl_HdrFtrShadow * getEditShadow(void);
00527 void rememberCurrentPosition(void);
00528 PT_DocPosition getSavedPosition(void);
00529 void clearSavedPosition(void);
00530 void markSavedPositionAsNeeded(void);
00531 bool needSavedPosition(void);
00532 void insertHeaderFooter(HdrFtrType hfType);
00533 bool insertHeaderFooter(const gchar ** props, HdrFtrType hfType, fl_DocSectionLayout * pDSL=NULL);
00534
00535 void cmdEditHeader(void);
00536 void cmdEditFooter(void);
00537
00538 void cmdRemoveHdrFtr(bool isHeader);
00539 bool isFooterOnPage(void);
00540 bool isHeaderOnPage(void);
00541
00542 void SetupSavePieceTableState(void);
00543 void RestoreSavedPieceTableState(void);
00544 void removeThisHdrFtr(HdrFtrType hfType, bool bSkipPTSaves = false);
00545 void createThisHdrFtr(HdrFtrType hfType, bool bSkipPTSaves = false);
00546 void populateThisHdrFtr(HdrFtrType hfType, bool bSkipPTSaves = false);
00547 void _populateThisHdrFtr(fl_HdrFtrSectionLayout * pHdrFtrSrc, fl_HdrFtrSectionLayout * pHdrFtrDest);
00548
00549
00550
00551
00552
00553 bool insertFootnote(bool bFootnote);
00554 bool insertFootnoteSection(bool bFootnote,const gchar * enpid);
00555 bool isInFootnote(PT_DocPosition pos);
00556 bool isInFootnote(void);
00557 bool isInEndnote(PT_DocPosition pos);
00558 bool isInEndnote(void);
00559 bool isInAnnotation(PT_DocPosition pos);
00560 bool isInAnnotation(void);
00561 fl_FootnoteLayout * getClosestFootnote(PT_DocPosition pos);
00562 fl_EndnoteLayout * getClosestEndnote(PT_DocPosition pos);
00563 fl_AnnotationLayout * getClosestAnnotation(PT_DocPosition pos);
00564 UT_sint32 getEmbedDepth(PT_DocPosition pos);
00565
00566
00567
00568
00569 bool insertAnnotation(UT_sint32 iAnnotation,
00570 const std::string & sDescr,
00571 const std::string & sAuthor,
00572 const std::string & sTitle,
00573 bool bReplace);
00574 bool getAnnotationText(UT_uint32 iAnnotation, std::string & sText) const;
00575 bool setAnnotationText(UT_uint32 iAnnotation, const std::string & sText);
00576 bool setAnnotationText(UT_uint32 iAnnotation, const std::string & sText,
00577 const std::string & sAuthor, const std::string & sTitle);
00578 bool getAnnotationRichText(UT_uint32 iAnnotation, std::string & sRTF) const;
00579 bool setAnnotationRichText(UT_uint32 iAnnotation, const std::string & sRTF);
00580
00581 bool getAnnotationTitle(UT_uint32 iAnnotation, std::string & sTitle) const;
00582 bool setAnnotationTitle(UT_uint32 iAnnotation, const std::string & sTitle);
00583 bool getAnnotationAuthor(UT_uint32 iAnnotation, std::string & sAuthor) const;
00584 bool setAnnotationAuthor(UT_uint32 iAnnotation, const std::string & sAuthor);
00585
00586 bool isAnnotationPreviewActive(void) const { return m_bAnnotationPreviewActive;}
00587 void setAnnotationPreviewActive(bool b) { m_bAnnotationPreviewActive = b;}
00588 UT_uint32 getActivePreviewAnnotationID() const { return m_iAnnPviewID;}
00589 void setActivePreviewAnnotationID(UT_uint32 iID) { m_iAnnPviewID = iID;}
00590 void killAnnotationPreview();
00591 bool cmdEditAnnotationWithDialog(UT_uint32 aID);
00592 fl_AnnotationLayout * getAnnotationLayout(UT_uint32 iAnnotation) const;
00593 bool selectAnnotation(fl_AnnotationLayout * pAL);
00594
00595
00596 bool gotoTarget(AP_JumpTarget type, const UT_UCSChar * data);
00597 bool gotoTarget(AP_JumpTarget type, const char *numberString);
00598
00599 void changeNumColumns(UT_uint32 iNumColumns);
00600
00601
00602
00603
00604
00605 void findSetFindString (const UT_UCSChar* string);
00606 void findSetReplaceString(const UT_UCSChar* string);
00607 void findSetReverseFind (bool newValue);
00608 void findSetMatchCase (bool newValue);
00609 void findSetWholeWord (bool newValue);
00610 UT_UCSChar * findGetFindString (void);
00611 UT_UCSChar * findGetReplaceString(void);
00612 bool findGetReverseFind ();
00613 bool findGetMatchCase ();
00614 bool findGetWholeWord ();
00615
00616 bool findAgain(void);
00617
00618 void findSetStartAt(PT_DocPosition pos);
00619 void findSetStartAtInsPoint(void);
00620
00621 bool findNext(bool& bDoneEntireDocument);
00622 bool findNext(const UT_UCSChar* pFind, bool& bDoneEntireDocument);
00623
00624 UT_uint32* _computeFindPrefix(const UT_UCSChar* pFind);
00625
00626 bool _findNext(UT_uint32* pPrefix,
00627 bool& bDoneEntireDocument);
00628
00629 bool findPrev(bool& bDoneEntireDocument);
00630 bool findPrev(const UT_UCSChar* pFind, bool& bDoneEntireDocument);
00631
00632 bool _findPrev(UT_uint32* pPrefix,
00633 bool& bDoneEntireDocument);
00634
00635 bool findReplaceReverse(bool& bDoneEntireDocument);
00636
00637 bool _findReplaceReverse(UT_uint32* pPrefix,
00638 bool& bDoneEntireDocument,
00639 bool bNoUpdate);
00640
00641 bool _findReplace(UT_uint32* pPrefix,
00642 bool& bDoneEntireDocument,
00643 bool bNoUpdate);
00644
00645
00646 bool findReplace(bool& bDoneEntireDocument);
00647
00648 UT_uint32 findReplaceAll();
00649
00650
00651
00652 #if defined(PT_TEST) || defined(FMT_TEST) || defined(UT_TEST)
00653 void Test_Dump(void);
00654 #endif
00655
00656
00657
00658 FV_DocCount countWords(void);
00659
00660
00661
00662 bool insertPageNum(const gchar ** props, HdrFtrType hfType);
00663 virtual void setPoint(UT_uint32 pt);
00664 void ensureInsertionPointOnScreen(void);
00665 void removeCaret(const std::string& sCaretID);
00666 void addCaret(PT_DocPosition docPos,UT_sint32 iAuthorId);
00667 void setPointRemote(PT_DocPosition docPos);
00668 void updateCarets(PT_DocPosition docPos, UT_sint32 iLen);
00669 void fixInsertionPointCoords(void);
00670
00671
00672 void killBlink(void);
00673 void setShowPara(bool);
00674 inline bool getShowPara(void) const { return m_bShowPara; };
00675
00676 const fp_PageSize& getPageSize(void) const;
00677 virtual UT_uint32 calculateZoomPercentForPageWidth() const;
00678 virtual UT_uint32 calculateZoomPercentForPageHeight() const;
00679 virtual UT_uint32 calculateZoomPercentForWholePage() const;
00680 void setViewMode (ViewMode vm);
00681 ViewMode getViewMode (void) const {return m_viewMode;}
00682 bool isPreview(void) const {return VIEW_PREVIEW == m_viewMode;}
00683 void setPreviewMode(PreViewMode pre) {m_previewMode = pre;}
00684 PreViewMode getPreviewMode(void) { return m_previewMode;}
00685
00686 UT_uint32 getTabToggleAreaWidth() const;
00687 UT_sint32 getNormalModeXOffset() const;
00688
00689 void setScreenUpdateOnGeneralUpdate( bool bDoit)
00690 {m_bDontUpdateScreenOnGeneralUpdate = !bDoit;}
00691 bool shouldScreenUpdateOnGeneralUpdate(void) const
00692 { return !m_bDontUpdateScreenOnGeneralUpdate;}
00693
00694 inline PD_Document * getDocument (void) const {return m_pDoc;}
00695
00696
00697 void toggleMarkRevisions();
00698 void cmdAcceptRejectRevision(bool bReject, UT_sint32 x, UT_sint32 y);
00699
00700 bool isMarkRevisions() const;
00701
00702 bool isShowRevisions() const {return m_bShowRevisions;}
00703 void toggleShowRevisions();
00704 void setShowRevisions(bool bShow);
00705
00706 void cmdSetRevisionLevel(UT_uint32 i);
00707 UT_uint32 getRevisionLevel()const;
00708 void setRevisionLevel(UT_uint32 i);
00709
00710 bool cmdFindRevision(bool bNext, UT_sint32 xPos, UT_sint32 yPos);
00711 bool doesSelectionContainRevision() const;
00712
00713 void updateRevisionMode();
00714 protected:
00715 void _fixInsertionPointAfterRevision();
00716 bool _makePointLegal(void);
00717 public:
00718
00719
00720 bool isPointLegal(PT_DocPosition pos);
00721 bool isPointLegal(void);
00722 bool isInTable() const;
00723 fl_TableLayout * getTableAtPos(PT_DocPosition) const;
00724 bool isInTable(PT_DocPosition pos) const;
00725 bool isInTableForSure(PT_DocPosition pos) const;
00726 bool cmdAutoSizeCols(void);
00727 bool cmdTextToTable(bool bIgnoreSpaces);
00728 bool cmdAutoSizeRows(void);
00729 bool cmdAdvanceNextPrevCell(bool bGoNext);
00730 fp_CellContainer * getCellAtPos(PT_DocPosition pos) const;
00731 PT_DocPosition findCellPosAt(PT_DocPosition posTable, UT_sint32 row, UT_sint32 col);
00732 bool _deleteCellAt(PT_DocPosition posTable,UT_sint32 row, UT_sint32 col);
00733 bool _restoreCellParams(PT_DocPosition posTable, UT_sint32 iLineWidth);
00734 UT_sint32 _changeCellParams(PT_DocPosition posTable,PL_StruxDocHandle tableSDH );
00735 bool deleteCellAt(PT_DocPosition posTable,UT_sint32 row, UT_sint32 col);
00736 bool cmdDeleteCell(PT_DocPosition pos);
00737 bool cmdDeleteCol(PT_DocPosition pos);
00738 bool cmdDeleteRow(PT_DocPosition pos);
00739 bool cmdDeleteTable(PT_DocPosition pos, bool bDontNotify=false);
00740 bool cmdInsertRow(PT_DocPosition posTable, bool bBfore);
00741 bool cmdInsertCol(PT_DocPosition posTable, bool bBefore);
00742 bool cmdSplitCells(AP_CellSplitType iSplitType);
00743 bool cmdSelectColumn(PT_DocPosition posOfColumn);
00744 bool cmdAutoFitTable(void);
00745 bool cmdMergeCells(PT_DocPosition posSource, PT_DocPosition posDestination);
00746 bool cmdTableToText(PT_DocPosition posSource,UT_sint32 iSepType);
00747
00748 bool _MergeCells( PT_DocPosition posDestination,PT_DocPosition posSource, bool bBefore);
00749 bool getCellParams(PT_DocPosition posCol, UT_sint32 *iLeft,
00750 UT_sint32 *iRight,UT_sint32 *iTop, UT_sint32 *iBot) const;
00751 bool getCellLineStyle(PT_DocPosition posCell, UT_sint32 * pLeft, UT_sint32 * pRight,
00752 UT_sint32 * pTop, UT_sint32 * pBot) const;
00753 bool setCellFormat(const gchar * properties[], FormatTable applyTo, FG_Graphic * pFG, UT_String & sDataID);
00754 bool getCellProperty(const gchar * szPropName, gchar * &szPropValue) const;
00755 bool setTableFormat(const gchar * properties[]);
00756 bool setTableFormat(PT_DocPosition pos,const gchar * properties[]);
00757 bool getCellFormat(PT_DocPosition pos, UT_String & sCellProps) const;
00758
00759 UT_Error cmdInsertTable(UT_sint32 numRows, UT_sint32 numCols,
00760 const gchar * pPropsArray[]);
00761 bool _changeCellTo(PT_DocPosition posTable,UT_sint32 rowOld,
00762 UT_sint32 colOld, UT_sint32 left, UT_sint32 right,
00763 UT_sint32 top, UT_sint32 bot);
00764 bool changeCellTo(PT_DocPosition posTable,UT_sint32 rowOld,
00765 UT_sint32 colOld, UT_sint32 left, UT_sint32 right,
00766 UT_sint32 top, UT_sint32 bot);
00767 bool _insertCellAfter(PT_DocPosition posTable, UT_sint32 row,
00768 UT_sint32 col,UT_sint32 left,UT_sint32 right,
00769 UT_sint32 top, UT_sint32 bot);
00770 bool _insertCellBefore(PT_DocPosition posTable, UT_sint32 row,
00771 UT_sint32 col, UT_sint32 left, UT_sint32 right,
00772 UT_sint32 top, UT_sint32 bot);
00773 void _generalUpdate(void);
00774
00775 UT_RGBColor getColorShowPara(void) const { return m_colorShowPara; }
00776 #ifdef ENABLE_SPELL
00777 UT_RGBColor getColorSquiggle(FL_SQUIGGLE_TYPE iSquiggleType) const;
00778 #endif
00779 UT_RGBColor getColorMargin(void) const { return m_colorMargin; }
00780 UT_RGBColor getColorSelBackground(void);
00781 UT_RGBColor getColorSelForeground(void) const;
00782 UT_RGBColor getColorFieldOffset(void) const { return m_colorFieldOffset; }
00783 UT_RGBColor getColorImage(void) const { return m_colorImage; }
00784 UT_RGBColor getColorImageResize(void) const { return m_colorImageResize; }
00785 UT_RGBColor getColorHyperLink(void) const { return m_colorHyperLink; }
00786 UT_RGBColor getColorAnnotation(const fp_Run * pRun) const;
00787 UT_RGBColor getColorAnnotation(fp_Page * pPage,UT_uint32 pid) const;
00788 UT_RGBColor getColorRevisions(int rev) const {
00789 if ((rev < 0) || (rev > 9)) rev = 9;
00790 return m_colorRevisions[rev]; }
00791 UT_RGBColor getColorHdrFtr(void) const { return m_colorHdrFtr; }
00792 UT_RGBColor getColorColumnLine(void) const { return m_colorColumnLine; }
00793
00794 void getVisibleDocumentPagesAndRectangles(UT_GenericVector<UT_Rect*> &vRect,
00795 UT_GenericVector<fp_Page*> &vPages) const;
00796
00797
00798
00799
00800 UT_sint32 getImageSelInfo() const;
00801 GR_Graphics::Cursor getImageSelCursor() const;
00802 bool isImageSelected(void) const;
00803
00804
00805
00806
00807 void setDragTableLine(bool bSet)
00808 { m_bDragTableLine = bSet;}
00809 bool getDragTableLine(void) const
00810 { return m_bDragTableLine;}
00811 void setTopRuler(AP_TopRuler * pRuler)
00812 { m_pTopRuler = pRuler;}
00813 AP_TopRuler * getTopRuler(void) const
00814 { return m_pTopRuler;}
00815 void setLeftRuler(AP_LeftRuler * pRuler)
00816 { m_pLeftRuler = pRuler;}
00817 AP_LeftRuler * getLeftRuler(void) const
00818 { return m_pLeftRuler;}
00819
00820
00821 const gchar ** getViewPersistentProps() const;
00822 FV_BIDI_Order getBidiOrder()const {return m_eBidiOrder;}
00823 void setBidiOrder(FV_BIDI_Order o) {m_eBidiOrder = o;}
00824
00825 bool isMathSelected(UT_sint32 x, UT_sint32 y, PT_DocPosition & pos) const;
00826
00827 bool isMathLoaded(void) const;
00828 bool isGrammarLoaded(void) const;
00829
00830
00831 UT_uint32 getNumHorizPages(void) const;
00832 void calculateNumHorizPages(void);
00833 UT_uint32 getMaxHeight(UT_uint32 iRow) const;
00834 UT_uint32 getWidthPrevPagesInRow(UT_uint32 iPageNumber) const;
00835 UT_uint32 getWidthPagesInRow(fp_Page *page) const;
00836 UT_uint32 getHorizPageSpacing(void) const;
00837 bool rtlPages(void) const;
00838
00839 protected:
00840 void _saveAndNotifyPieceTableChange(void);
00841 void _restorePieceTableState(void);
00842
00843 void _draw(UT_sint32, UT_sint32, UT_sint32, UT_sint32, bool bDirtyRunsOnly, bool bClip=false);
00844
00845 void _drawBetweenPositions(PT_DocPosition left, PT_DocPosition right);
00846 bool _clearBetweenPositions(PT_DocPosition left, PT_DocPosition right, bool bFullLineHeightRect);
00847 bool _drawOrClearBetweenPositions(PT_DocPosition iPos1, PT_DocPosition iPos2, bool bClear, bool bFullLineHeight);
00848 bool _ensureInsertionPointOnScreen();
00849 void _moveInsPtNextPrevPage(bool bNext);
00850 void _moveInsPtNextPrevScreen(bool bNext);
00851 void _moveInsPtNextPrevLine(bool bNext);
00852 fp_Line * _getNextLineInDoc(fp_Container * pCon);
00853 fp_Page * _getCurrentPage(void) const;
00854 void _moveInsPtNthPage(UT_sint32 n);
00855 void _moveInsPtToPage(fp_Page *page);
00856 void _insertSectionBreak(void);
00857
00858 PT_DocPosition _getDocPosFromPoint(PT_DocPosition iPoint, FV_DocPos dp, bool bKeepLooking=true) const;
00859 PT_DocPosition _getDocPos(FV_DocPos dp, bool bKeepLooking=true) const;
00860 void _findPositionCoords(PT_DocPosition pos,
00861 bool b,
00862 UT_sint32& x,
00863 UT_sint32& y,
00864 UT_sint32& x2,
00865 UT_sint32& y2,
00866
00867 UT_uint32& height,
00868 bool& bDirection,
00869 fl_BlockLayout** ppBlock,
00870 fp_Run** ppRun)const;
00871
00872 fl_BlockLayout* _findBlockAtPosition(PT_DocPosition pos) const;
00873
00874 fp_Page* _getPageForXY(UT_sint32 xPos,
00875 UT_sint32 yPos,
00876 UT_sint32& xClick,
00877 UT_sint32& yClick) const;
00878 bool _insertField(const char* szName,
00879 const gchar ** extra_attrs = NULL,
00880 const gchar ** extra_props = NULL);
00881 void _moveToSelectionEnd(bool bForward);
00882 void _eraseSelection(void);
00883 void _clearSelection(void);
00884 void _resetSelection(void);
00885 void _setSelectionAnchor(void);
00886 void _deleteSelection(PP_AttrProp *p_AttrProp_Before = NULL,
00887 bool bNoUpdate = false,
00888 bool bCaretLeft = false);
00889 bool _insertFormatPair(const gchar * szName, const gchar * properties[]);
00890 void _updateInsertionPoint();
00891 void _fixInsertionPointCoords(bool bIgnoreAll = false);
00892 void _fixInsertionPointCoords(fv_CaretProps * pCP) const;
00893 void _fixAllInsertionPointCoords(void) const;
00894
00895 void _drawSelection();
00896 void _swapSelectionOrientation(void);
00897 void _extSel(UT_uint32 iOldPoint);
00898 void _extSelToPos(PT_DocPosition pos);
00899 UT_Error _insertGraphic(FG_Graphic*, const char*);
00900 UT_Error _insertGraphic(FG_Graphic*, const char*,PT_DocPosition pos);
00901
00902 UT_UCSChar * _lookupSuggestion(fl_BlockLayout* pBL, fl_PartOfBlock* pPOB, UT_sint32 ndx);
00903
00904 static void _autoScroll(UT_Worker * pTimer);
00905 static void _actuallyScroll(UT_Worker * pTimer);
00906
00907
00908 void _setPoint(PT_DocPosition pt, bool bEOL = false);
00909 void _setPoint(fv_CaretProps * pCP, PT_DocPosition pt, UT_sint32 iLen) const;
00910 UT_uint32 _getDataCount(UT_uint32 pt1, UT_uint32 pt2) const;
00911 bool _charMotion(bool bForward,UT_uint32 countChars, bool bSkipCannotContainPoint = true);
00912 void _doPaste(bool bUseClipboard, bool bHonorFormatting = true);
00913 void _clearIfAtFmtMark(PT_DocPosition dpos);
00914
00915 #ifdef ENABLE_SPELL
00916 void _checkPendingWordForSpell(void);
00917 #endif
00918
00919 bool _isSpaceBefore(PT_DocPosition pos) const;
00920 void _removeThisHdrFtr(fl_HdrFtrSectionLayout * pHdrFtr);
00921 void _cmdEditHdrFtr(HdrFtrType hfType);
00922
00923 UT_Error _deleteBookmark(const char* szName, bool bSignal, PT_DocPosition * pos1 = NULL, PT_DocPosition * pos2 = NULL);
00924 UT_Error _deleteHyperlink(PT_DocPosition &i, bool bSignal);
00925 fp_HyperlinkRun * _getHyperlinkInRange(PT_DocPosition &posStart,
00926 PT_DocPosition &posEnd);
00927 bool _charInsert(const UT_UCSChar * text, UT_uint32 count, bool bForce = false);
00928
00929 void _adjustDeletePosition(UT_uint32 &iDocPos, UT_uint32 &iCount);
00930
00931 private:
00932
00933 UT_uint32 m_iNumHorizPages;
00934 UT_uint32 m_getNumHorizPagesCachedWindowWidth;
00935 bool m_autoNumHorizPages;
00936 UT_uint32 m_horizPageSpacing;
00937
00938 PT_DocPosition m_iInsPoint;
00939 UT_sint32 m_xPoint;
00940 UT_sint32 m_yPoint;
00941
00942
00943 UT_sint32 m_xPoint2;
00944 UT_sint32 m_yPoint2;
00945 bool m_bPointDirection;
00946 bool m_bDefaultDirectionRtl;
00947 bool m_bUseHebrewContextGlyphs;
00948 UT_uint32 m_iPointHeight;
00949 UT_sint32 m_xPointSticky;
00950
00951 bool m_bPointVisible;
00952 bool m_bPointEOL;
00953 FL_DocLayout* m_pLayout;
00954 PD_Document* m_pDoc;
00955 GR_Graphics* m_pG;
00956 void* m_pParentData;
00957
00958
00959 UT_Timer * m_pAutoScrollTimer;
00960 UT_sint32 m_xLastMouse;
00961 UT_sint32 m_yLastMouse;
00962
00963 bool m_bCursorIsOn;
00964 bool m_bEraseSaysStopBlinking;
00965 bool m_bCursorBlink;
00966
00967 bool m_bdontSpellCheckRightNow;
00968 fv_ChangeState m_chg;
00969
00970
00971 bool m_wrappedEnd;
00972 PT_DocPosition m_startPosition;
00973
00974 bool m_doneFind;
00975
00976 bool m_bEditHdrFtr;
00977 fl_HdrFtrShadow * m_pEditShadow;
00978 PT_DocPosition m_iSavedPosition;
00979 bool m_bNeedSavedPosition;
00980 PT_DocPosition _BlockOffsetToPos(fl_BlockLayout * block, PT_DocPosition offset) const;
00981
00982 fl_BlockLayout * _findGetCurrentBlock(void) const;
00983 PT_DocPosition _findGetCurrentOffset(void) const;
00984 UT_UCSChar * _findGetNextBlockBuffer(fl_BlockLayout ** block, PT_DocPosition *offset);
00985 UT_UCSChar * _findGetPrevBlockBuffer(fl_BlockLayout ** block, PT_DocPosition *offset, UT_sint32& endIndex);
00986
00987 bool m_bReverseFind;
00988 bool m_bWholeWord;
00989 bool m_bMatchCase;
00990 UT_UCSChar * m_sFind;
00991 UT_UCSChar * m_sReplace;
00992
00993 UT_sint32 _findBlockSearchRegexp(const UT_UCSChar * haystack, const UT_UCSChar * needle);
00994
00995
00996 static void _prefsListener( XAP_Prefs *, UT_StringPtrMap *, void *);
00997
00998 bool m_bShowPara;
00999 ViewMode m_viewMode;
01000 PreViewMode m_previewMode;
01001 bool m_bDontUpdateScreenOnGeneralUpdate;
01002
01003
01004
01005 UT_uint32 m_iPieceTableState;
01006
01007 UT_sint32 m_iMouseX;
01008 UT_sint32 m_iMouseY;
01009
01010 UT_uint32 m_iViewRevision;
01011
01012 bool m_bWarnedThatRestartNeeded;
01013
01014
01015 UT_Rect m_selImageRect;
01016 GR_Graphics::Cursor m_imageSelCursor;
01017 UT_sint32 m_ixResizeOrigin;
01018 UT_sint32 m_iyResizeOrigin;
01019 bool m_bIsResizingImage;
01020 UT_Rect m_curImageSel;
01021 #if XAP_DONTUSE_XOR
01022 GR_Image* m_curImageSelCache;
01023 #endif
01024
01025 bool m_bIsDraggingImage;
01026 fp_Run * m_pDraggedImageRun;
01027 UT_Rect m_dragImageRect;
01028 UT_sint32 m_ixDragOrigin;
01029 UT_sint32 m_iyDragOrigin;
01030
01031
01032 UT_RGBColor m_colorShowPara;
01033 UT_RGBColor m_colorSpellSquiggle;
01034 UT_RGBColor m_colorGrammarSquiggle;
01035 UT_RGBColor m_colorMargin;
01036 UT_RGBColor m_colorFieldOffset;
01037 UT_RGBColor m_colorImage;
01038 UT_RGBColor m_colorImageResize;
01039 UT_RGBColor m_colorHyperLink;
01040 UT_RGBColor m_colorRevisions[10];
01041 UT_RGBColor m_colorHdrFtr;
01042 UT_RGBColor m_colorColumnLine;
01043 UT_RGBColor m_colorAnnotations[10];
01044
01045 UT_uint32 m_countDisable;
01046 bool m_bDragTableLine;
01047 EV_EditMouseContext m_prevMouseContext;
01048 AP_TopRuler * m_pTopRuler;
01049 AP_LeftRuler * m_pLeftRuler;
01050 bool m_bInFootnote;
01051
01052 FV_Caret_Listener * m_caretListener;
01053 bool m_bgColorInitted;
01054 PT_DocPosition m_iLowDrawPoint;
01055 PT_DocPosition m_iHighDrawPoint;
01056 mutable fv_PropCache m_CharProps;
01057 mutable fv_PropCache m_BlockProps;
01058 mutable fv_PropCache m_SecProps;
01059 AV_ListenerId m_CaretListID;
01060 #ifdef TOOLKIT_GTK
01061 FV_UnixFrameEdit m_FrameEdit;
01062 #else
01063 FV_FrameEdit m_FrameEdit;
01064 #endif
01065 #ifdef TOOLKIT_GTK
01066 FV_UnixVisualDrag m_VisualDragText;
01067 #else
01068 FV_VisualDragText m_VisualDragText;
01069 #endif
01070 FV_Selection m_Selection;
01071 bool m_bShowRevisions;
01072
01073 FV_BIDI_Order m_eBidiOrder;
01074 UT_uint32 m_iFreePass;
01075 bool m_bDontNotifyListeners;
01076 UT_ByteBuf * m_pLocalBuf;
01077 UT_sint32 m_iGrabCell;
01078 #ifdef TOOLKIT_GTK
01079 FV_UnixVisualInlineImage m_InlineImage;
01080 #else
01081 FV_VisualInlineImage m_InlineImage;
01082 #endif
01083 bool m_bInsertAtTablePending;
01084 PT_DocPosition m_iPosAtTable;
01085 UT_GenericVector<fv_CaretProps *> m_vecCarets;
01086 UT_UTF8String m_sDocUUID;
01087 bool m_bAnnotationPreviewActive;
01088 UT_uint32 m_iAnnPviewID;
01089 bool m_bAllowSmartQuoteReplacement;
01090
01091 };
01092
01093 #endif