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