| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ | 7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ |
| 8 #define FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ | 8 #define FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ |
| 9 | 9 |
| 10 #include "../../../core/include/fxcrt/fx_basic.h" | 10 #include "../../../core/include/fxcrt/fx_basic.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86
FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; | 86
FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; |
| 87 //set the vertical scrollbar information. | 87 //set the vertical scrollbar information. |
| 88 virtual void IOnSetSc
rollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, | 88 virtual void IOnSetSc
rollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, |
| 89
FX_FLOAT fContentMin, FX_FLOAT fContentMax, | 89
FX_FLOAT fContentMin, FX_FLOAT fContentMax, |
| 90
FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; | 90
FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; |
| 91 //set the position of horizontal scrollbar. | 91 //set the position of horizontal scrollbar. |
| 92 virtual void IOnSetSc
rollPosX(FX_FLOAT fx) = 0; | 92 virtual void IOnSetSc
rollPosX(FX_FLOAT fx) = 0; |
| 93 //set the position of vertical scrollbar. | 93 //set the position of vertical scrollbar. |
| 94 virtual void IOnSetSc
rollPosY(FX_FLOAT fy) = 0; | 94 virtual void IOnSetSc
rollPosY(FX_FLOAT fy) = 0; |
| 95 //set the caret information. | 95 //set the caret information. |
| 96 » virtual void» » » » » » » IOnSetCa
ret(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const
CPVT_WordPlace& place) = 0; | 96 » virtual void» » » » » » » IOnSetCa
ret(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPV
T_WordPlace& place) = 0; |
| 97 //if the caret position is changed ,send the information of current post
ion to user. | 97 //if the caret position is changed ,send the information of current post
ion to user. |
| 98 virtual void IOnCaret
Change(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps) = 0; | 98 virtual void IOnCaret
Change(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps) = 0; |
| 99 //if the text area is changed, send the information to user. | 99 //if the text area is changed, send the information to user. |
| 100 virtual void IOnConte
ntChange(const CPDF_Rect& rcContent) = 0; | 100 virtual void IOnConte
ntChange(const CPDF_Rect& rcContent) = 0; |
| 101 //Invalidate the rectangle relative to the bounding box of edit. | 101 //Invalidate the rectangle relative to the bounding box of edit. |
| 102 virtual void IOnInval
idateRect(CPDF_Rect * pRect) = 0; | 102 virtual void IOnInval
idateRect(CPDF_Rect * pRect) = 0; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 class IFX_Edit_OprNotify | 105 class IFX_Edit_OprNotify |
| 106 { | 106 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 124 // | 124 // |
| 125 virtual void OnAddUnd
o(IFX_Edit_UndoItem* pUndoItem) = 0; | 125 virtual void OnAddUnd
o(IFX_Edit_UndoItem* pUndoItem) = 0; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 class IFX_Edit_Iterator | 128 class IFX_Edit_Iterator |
| 129 { | 129 { |
| 130 public: | 130 public: |
| 131 virtual ~IFX_Edit_Iterator() {} | 131 virtual ~IFX_Edit_Iterator() {} |
| 132 public: | 132 public: |
| 133 //move the current position to the next word. | 133 //move the current position to the next word. |
| 134 » virtual FX_BOOL»» » » » » » NextWord
() = 0; | 134 » virtual bool» » » » » » » NextWord
() = 0; |
| 135 //move the current position to the next line. | 135 //move the current position to the next line. |
| 136 » virtual FX_BOOL»» » » » » » NextLine
() = 0; | 136 » virtual bool» » » » » » » NextLine
() = 0; |
| 137 //move the current position to the next section. | 137 //move the current position to the next section. |
| 138 » virtual FX_BOOL»» » » » » » NextSect
ion() = 0; | 138 » virtual bool» » » » » » » NextSect
ion() = 0; |
| 139 | 139 |
| 140 //move the current position to the previous word. | 140 //move the current position to the previous word. |
| 141 » virtual FX_BOOL»» » » » » » PrevWord
() = 0; | 141 » virtual bool» » » » » » » PrevWord
() = 0; |
| 142 //move the current position to the previous line. | 142 //move the current position to the previous line. |
| 143 » virtual FX_BOOL»» » » » » » PrevLine
() = 0; | 143 » virtual bool» » » » » » » PrevLine
() = 0; |
| 144 //move the current position to the previous section. | 144 //move the current position to the previous section. |
| 145 » virtual FX_BOOL»» » » » » » PrevSect
ion() = 0; | 145 » virtual bool» » » » » » » PrevSect
ion() = 0; |
| 146 | 146 |
| 147 //get the information of the current word. | 147 //get the information of the current word. |
| 148 » virtual FX_BOOL»» » » » » » GetWord(
CPVT_Word & word) const = 0; | 148 » virtual bool» » » » » » » GetWord(
CPVT_Word & word) const = 0; |
| 149 //get the information of the current line. | 149 //get the information of the current line. |
| 150 » virtual FX_BOOL»» » » » » » GetLine(
CPVT_Line & line) const = 0; | 150 » virtual bool» » » » » » » GetLine(
CPVT_Line & line) const = 0; |
| 151 //get the information of the current section. | 151 //get the information of the current section. |
| 152 » virtual FX_BOOL»» » » » » » GetSecti
on(CPVT_Section & section) const = 0; | 152 » virtual bool» » » » » » » GetSecti
on(CPVT_Section & section) const = 0; |
| 153 //set the current position. | 153 //set the current position. |
| 154 virtual void SetAt(in
t32_t nWordIndex) = 0; | 154 virtual void SetAt(in
t32_t nWordIndex) = 0; |
| 155 //set the current position. | 155 //set the current position. |
| 156 virtual void SetAt(co
nst CPVT_WordPlace & place) = 0; | 156 virtual void SetAt(co
nst CPVT_WordPlace & place) = 0; |
| 157 //get the current position. | 157 //get the current position. |
| 158 virtual const CPVT_WordPlace & GetAt() const = 0; | 158 virtual const CPVT_WordPlace & GetAt() const = 0; |
| 159 | 159 |
| 160 //get the edit which this iterator belongs to | 160 //get the edit which this iterator belongs to |
| 161 virtual IFX_Edit* GetEdit(
) const = 0; | 161 virtual IFX_Edit* GetEdit(
) const = 0; |
| 162 }; | 162 }; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 188 virtual IFX_Edit_Iterator* GetIterator() =
0; | 188 virtual IFX_Edit_Iterator* GetIterator() =
0; |
| 189 //get a VT pointer relative to this edit. | 189 //get a VT pointer relative to this edit. |
| 190 virtual IPDF_VariableText* GetVariableText(
) = 0; | 190 virtual IPDF_VariableText* GetVariableText(
) = 0; |
| 191 //get the IFX_Edit_FontMap pointer set by user. | 191 //get the IFX_Edit_FontMap pointer set by user. |
| 192 virtual IFX_Edit_FontMap* GetFontMap() = 0
; | 192 virtual IFX_Edit_FontMap* GetFontMap() = 0
; |
| 193 | 193 |
| 194 //initialize the edit. | 194 //initialize the edit. |
| 195 virtual void Initiali
ze() = 0; | 195 virtual void Initiali
ze() = 0; |
| 196 | 196 |
| 197 //set the bounding box of the text area. | 197 //set the bounding box of the text area. |
| 198 » virtual void» » » » » » » SetPlate
Rect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE) = 0; | 198 » virtual void» » » » » » » SetPlate
Rect(const CPDF_Rect & rect, bool bPaint = true) = 0; |
| 199 //set the scroll origin | 199 //set the scroll origin |
| 200 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; | 200 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; |
| 201 | 201 |
| 202 //set the horizontal text alignment in text box, nFormat (0:left 1:middl
e 2:right). | 202 //set the horizontal text alignment in text box, nFormat (0:left 1:middl
e 2:right). |
| 203 » virtual void» » » » » » » SetAlign
mentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0; | 203 » virtual void» » » » » » » SetAlign
mentH(int32_t nFormat = 0, bool bPaint = true) = 0; |
| 204 //set the vertical text alignment in text box, nFormat (0:top 1:center 2
:bottom). | 204 //set the vertical text alignment in text box, nFormat (0:top 1:center 2
:bottom). |
| 205 » virtual void» » » » » » » SetAlign
mentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0; | 205 » virtual void» » » » » » » SetAlign
mentV(int32_t nFormat = 0, bool bPaint = true) = 0; |
| 206 //if the text is shown in secret , set a character for substitute. | 206 //if the text is shown in secret , set a character for substitute. |
| 207 » virtual void» » » » » » » SetPassw
ordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) = 0; | 207 » virtual void» » » » » » » SetPassw
ordChar(FX_WORD wSubWord = '*', bool bPaint = true) = 0; |
| 208 //set the maximal count of words of the text. | 208 //set the maximal count of words of the text. |
| 209 » virtual void» » » » » » » SetLimit
Char(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0; | 209 » virtual void» » » » » » » SetLimit
Char(int32_t nLimitChar = 0, bool bPaint = true) = 0; |
| 210 //if set the count of charArray , then all words is shown in equal space
. | 210 //if set the count of charArray , then all words is shown in equal space
. |
| 211 » virtual void» » » » » » » SetCharA
rray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) = 0; | 211 » virtual void» » » » » » » SetCharA
rray(int32_t nCharArray = 0, bool bPaint = true) = 0; |
| 212 //set the space of two characters. | 212 //set the space of two characters. |
| 213 » virtual void» » » » » » » SetCharS
pace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) = 0; | 213 » virtual void» » » » » » » SetCharS
pace(FX_FLOAT fCharSpace = 0.0f, bool bPaint = true) = 0; |
| 214 //set the horizontal scale of all characters. | 214 //set the horizontal scale of all characters. |
| 215 » virtual void» » » » » » » SetHorzS
cale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0; | 215 » virtual void» » » » » » » SetHorzS
cale(int32_t nHorzScale = 100, bool bPaint = true) = 0; |
| 216 //set the leading of all lines | 216 //set the leading of all lines |
| 217 » virtual void» » » » » » » SetLineL
eading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0; | 217 » virtual void» » » » » » » SetLineL
eading(FX_FLOAT fLineLeading, bool bPaint = true) = 0; |
| 218 //if set, CRLF is allowed. | 218 //if set, CRLF is allowed. |
| 219 » virtual void» » » » » » » SetMulti
Line(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) = 0; | 219 » virtual void» » » » » » » SetMulti
Line(bool bMultiLine = true, bool bPaint = true) = 0; |
| 220 //if set, all words auto fit the width of the bounding box. | 220 //if set, all words auto fit the width of the bounding box. |
| 221 » virtual void» » » » » » » SetAutoR
eturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; | 221 » virtual void» » » » » » » SetAutoR
eturn(bool bAuto = true, bool bPaint = true) = 0; |
| 222 //if set, a font size is calculated to full fit the bounding box. | 222 //if set, a font size is calculated to full fit the bounding box. |
| 223 » virtual void» » » » » » » SetAutoF
ontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; | 223 » virtual void» » » » » » » SetAutoF
ontSize(bool bAuto = true, bool bPaint = true) = 0; |
| 224 //is set, the text is allowed to scroll. | 224 //is set, the text is allowed to scroll. |
| 225 » virtual void» » » » » » » SetAutoS
croll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; | 225 » virtual void» » » » » » » SetAutoS
croll(bool bAuto = true, bool bPaint = true) = 0; |
| 226 //set the font size of all words. | 226 //set the font size of all words. |
| 227 » virtual void» » » » » » » SetFontS
ize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE) = 0; | 227 » virtual void» » » » » » » SetFontS
ize(FX_FLOAT fFontSize, bool bPaint = true) = 0; |
| 228 //the text is allowed to auto-scroll, allow the text overflow? | 228 //the text is allowed to auto-scroll, allow the text overflow? |
| 229 » virtual void» » » » » » » SetTextO
verflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE) = 0; | 229 » virtual void» » » » » » » SetTextO
verflow(bool bAllowed = false, bool bPaint = true) = 0; |
| 230 | 230 |
| 231 //query if the edit is richedit. | 231 //query if the edit is richedit. |
| 232 » virtual FX_BOOL»» » » » » » IsRichTe
xt() const = 0; | 232 » virtual bool» » » » » » » IsRichTe
xt() const = 0; |
| 233 //set the edit is richedit. | 233 //set the edit is richedit. |
| 234 » virtual void» » » » » » » SetRichT
ext(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) = 0; | 234 » virtual void» » » » » » » SetRichT
ext(bool bRichText = true, bool bPaint = true) = 0; |
| 235 //set the fontsize of selected text. | 235 //set the fontsize of selected text. |
| 236 » virtual FX_BOOL»» » » » » » SetRichF
ontSize(FX_FLOAT fFontSize) = 0; | 236 » virtual bool» » » » » » » SetRichF
ontSize(FX_FLOAT fFontSize) = 0; |
| 237 //set the fontindex of selected text, user can change the font of select
ed text. | 237 //set the fontindex of selected text, user can change the font of select
ed text. |
| 238 » virtual FX_BOOL»» » » » » » SetRichF
ontIndex(int32_t nFontIndex) = 0; | 238 » virtual bool» » » » » » » SetRichF
ontIndex(int32_t nFontIndex) = 0; |
| 239 //set the textcolor of selected text. | 239 //set the textcolor of selected text. |
| 240 » virtual FX_BOOL»» » » » » » SetRichT
extColor(FX_COLORREF dwColor) = 0; | 240 » virtual bool» » » » » » » SetRichT
extColor(FX_COLORREF dwColor) = 0; |
| 241 //set the text script type of selected text. (0:normal 1:superscript 2:s
ubscript) | 241 //set the text script type of selected text. (0:normal 1:superscript 2:s
ubscript) |
| 242 » virtual FX_BOOL»» » » » » » SetRichT
extScript(int32_t nScriptType) = 0; | 242 » virtual bool» » » » » » » SetRichT
extScript(int32_t nScriptType) = 0; |
| 243 //set the bold font style of selected text. | 243 //set the bold font style of selected text. |
| 244 » virtual FX_BOOL»» » » » » » SetRichT
extBold(FX_BOOL bBold = TRUE) = 0; | 244 » virtual bool» » » » » » » SetRichT
extBold(bool bBold = true) = 0; |
| 245 //set the italic font style of selected text. | 245 //set the italic font style of selected text. |
| 246 » virtual FX_BOOL»» » » » » » SetRichT
extItalic(FX_BOOL bItalic = TRUE) = 0; | 246 » virtual bool» » » » » » » SetRichT
extItalic(bool bItalic = true) = 0; |
| 247 //set the underline style of selected text. | 247 //set the underline style of selected text. |
| 248 » virtual FX_BOOL»» » » » » » SetRichT
extUnderline(FX_BOOL bUnderline = TRUE) = 0; | 248 » virtual bool» » » » » » » SetRichT
extUnderline(bool bUnderline = true) = 0; |
| 249 //set the crossout style of selected text. | 249 //set the crossout style of selected text. |
| 250 » virtual FX_BOOL»» » » » » » SetRichT
extCrossout(FX_BOOL bCrossout = TRUE) = 0; | 250 » virtual bool» » » » » » » SetRichT
extCrossout(bool bCrossout = true) = 0; |
| 251 //set the charspace of selected text, in user coordinate. | 251 //set the charspace of selected text, in user coordinate. |
| 252 » virtual»FX_BOOL»» » » » » » SetRichT
extCharSpace(FX_FLOAT fCharSpace) = 0; | 252 » virtual»bool» » » » » » » SetRichT
extCharSpace(FX_FLOAT fCharSpace) = 0; |
| 253 //set the horizontal scale of selected text, default value is 100. | 253 //set the horizontal scale of selected text, default value is 100. |
| 254 » virtual FX_BOOL»» » » » » » SetRichT
extHorzScale(int32_t nHorzScale = 100) = 0; | 254 » virtual bool» » » » » » » SetRichT
extHorzScale(int32_t nHorzScale = 100) = 0; |
| 255 //set the leading of selected section, in user coordinate. | 255 //set the leading of selected section, in user coordinate. |
| 256 » virtual FX_BOOL»» » » » » » SetRichT
extLineLeading(FX_FLOAT fLineLeading) = 0; | 256 » virtual bool» » » » » » » SetRichT
extLineLeading(FX_FLOAT fLineLeading) = 0; |
| 257 //set the indent of selected section, in user coordinate. | 257 //set the indent of selected section, in user coordinate. |
| 258 » virtual FX_BOOL»» » » » » » SetRichT
extLineIndent(FX_FLOAT fLineIndent) = 0; | 258 » virtual bool» » » » » » » SetRichT
extLineIndent(FX_FLOAT fLineIndent) = 0; |
| 259 //set the alignment of selected section, nAlignment(0:left 1:middle 2:ri
ght) | 259 //set the alignment of selected section, nAlignment(0:left 1:middle 2:ri
ght) |
| 260 » virtual FX_BOOL»» » » » » » SetRichT
extAlignment(int32_t nAlignment) = 0; | 260 » virtual bool» » » » » » » SetRichT
extAlignment(int32_t nAlignment) = 0; |
| 261 | 261 |
| 262 //set the selected range of text. | 262 //set the selected range of text. |
| 263 //if nStartChar == 0 and nEndChar == -1, select all the text. | 263 //if nStartChar == 0 and nEndChar == -1, select all the text. |
| 264 virtual void SetSel(i
nt32_t nStartChar,int32_t nEndChar) = 0; | 264 virtual void SetSel(i
nt32_t nStartChar,int32_t nEndChar) = 0; |
| 265 //get the selected range of text. | 265 //get the selected range of text. |
| 266 virtual void GetSel(i
nt32_t & nStartChar, int32_t & nEndChar) const = 0; | 266 virtual void GetSel(i
nt32_t & nStartChar, int32_t & nEndChar) const = 0; |
| 267 //select all the text. | 267 //select all the text. |
| 268 virtual void SelectAl
l() = 0; | 268 virtual void SelectAl
l() = 0; |
| 269 //set text is not selected. | 269 //set text is not selected. |
| 270 virtual void SelectNo
ne() = 0; | 270 virtual void SelectNo
ne() = 0; |
| 271 //get the caret position. | 271 //get the caret position. |
| 272 virtual int32_t GetCaret() const
= 0; | 272 virtual int32_t GetCaret() const
= 0; |
| 273 virtual CPVT_WordPlace GetCaretWordPlac
e() const = 0; | 273 virtual CPVT_WordPlace GetCaretWordPlac
e() const = 0; |
| 274 //get the string of selected text. | 274 //get the string of selected text. |
| 275 virtual CFX_WideString GetSelText() con
st = 0; | 275 virtual CFX_WideString GetSelText() con
st = 0; |
| 276 //get the text conent | 276 //get the text conent |
| 277 virtual CFX_WideString GetText() const
= 0; | 277 virtual CFX_WideString GetText() const
= 0; |
| 278 //query if any text is selected. | 278 //query if any text is selected. |
| 279 » virtual FX_BOOL»» » » » » » IsSelect
ed() const = 0; | 279 » virtual bool» » » » » » » IsSelect
ed() const = 0; |
| 280 //get the scroll origin | 280 //get the scroll origin |
| 281 virtual CPDF_Point GetScrol
lPos() const = 0; | 281 virtual CPDF_Point GetScrol
lPos() const = 0; |
| 282 //get the bounding box of the text area. | 282 //get the bounding box of the text area. |
| 283 virtual CPDF_Rect GetPlate
Rect() const = 0; | 283 virtual CPDF_Rect GetPlate
Rect() const = 0; |
| 284 //get the fact area of the text. | 284 //get the fact area of the text. |
| 285 virtual CPDF_Rect GetConte
ntRect() const = 0; | 285 virtual CPDF_Rect GetConte
ntRect() const = 0; |
| 286 //get the visible word range | 286 //get the visible word range |
| 287 virtual CPVT_WordRange GetVisibleWordRa
nge() const = 0; | 287 virtual CPVT_WordRange GetVisibleWordRa
nge() const = 0; |
| 288 //get the whole word range | 288 //get the whole word range |
| 289 virtual CPVT_WordRange GetWholeWordRang
e() const = 0; | 289 virtual CPVT_WordRange GetWholeWordRang
e() const = 0; |
| 290 //get the word range of select text | 290 //get the word range of select text |
| 291 virtual CPVT_WordRange GetSelectWordRan
ge() const = 0; | 291 virtual CPVT_WordRange GetSelectWordRan
ge() const = 0; |
| 292 | 292 |
| 293 //send the mousedown message to edit for response. | 293 //send the mousedown message to edit for response. |
| 294 » //if Shift key is hold, bShift is TRUE, is Ctrl key is hold, bCtrl is TR
UE. | 294 » //if Shift key is hold, bShift is true, is Ctrl key is hold, bCtrl is tr
ue. |
| 295 » virtual void» » » » » » » OnMouseD
own(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 295 » virtual void» » » » » » » OnMouseD
own(const CPDF_Point & point,bool bShift,bool bCtrl) = 0; |
| 296 » //send the mousemove message to edit when mouse down is TRUE. | 296 » //send the mousemove message to edit when mouse down is true. |
| 297 » virtual void» » » » » » » OnMouseM
ove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 297 » virtual void» » » » » » » OnMouseM
ove(const CPDF_Point & point,bool bShift,bool bCtrl) = 0; |
| 298 //send the UP key message to edit. | 298 //send the UP key message to edit. |
| 299 » virtual void» » » » » » » OnVK_UP(
FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 299 » virtual void» » » » » » » OnVK_UP(
bool bShift,bool bCtrl) = 0; |
| 300 //send the DOWN key message to edit. | 300 //send the DOWN key message to edit. |
| 301 » virtual void» » » » » » » OnVK_DOW
N(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 301 » virtual void» » » » » » » OnVK_DOW
N(bool bShift,bool bCtrl) = 0; |
| 302 //send the LEFT key message to edit. | 302 //send the LEFT key message to edit. |
| 303 » virtual void» » » » » » » OnVK_LEF
T(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 303 » virtual void» » » » » » » OnVK_LEF
T(bool bShift,bool bCtrl) = 0; |
| 304 //send the RIGHT key message to edit. | 304 //send the RIGHT key message to edit. |
| 305 » virtual void» » » » » » » OnVK_RIG
HT(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 305 » virtual void» » » » » » » OnVK_RIG
HT(bool bShift,bool bCtrl) = 0; |
| 306 //send the HOME key message to edit. | 306 //send the HOME key message to edit. |
| 307 » virtual void» » » » » » » OnVK_HOM
E(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 307 » virtual void» » » » » » » OnVK_HOM
E(bool bShift,bool bCtrl) = 0; |
| 308 //send the END key message to edit. | 308 //send the END key message to edit. |
| 309 » virtual void» » » » » » » OnVK_END
(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 309 » virtual void» » » » » » » OnVK_END
(bool bShift,bool bCtrl) = 0; |
| 310 | 310 |
| 311 //put text into edit. | 311 //put text into edit. |
| 312 virtual void SetText(
const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET, | 312 virtual void SetText(
const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET, |
| 313
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; | 313
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; |
| 314 //insert a word into the edit. | 314 //insert a word into the edit. |
| 315 » virtual FX_BOOL»» » » » » » InsertWo
rd(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWord
Props = NULL) = 0; | 315 » virtual bool» » » » » » » InsertWo
rd(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWord
Props = NULL) = 0; |
| 316 //insert a return into the edit. | 316 //insert a return into the edit. |
| 317 » virtual FX_BOOL»» » » » » » InsertRe
turn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps =
NULL) = 0; | 317 » virtual bool» » » » » » » InsertRe
turn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps =
NULL) = 0; |
| 318 //insert text into the edit. | 318 //insert text into the edit. |
| 319 » virtual FX_BOOL»» » » » » » InsertTe
xt(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET, | 319 » virtual bool» » » » » » » InsertTe
xt(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET, |
| 320
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; | 320
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordPr
ops * pWordProps = NULL) = 0; |
| 321 //do backspace operation. | 321 //do backspace operation. |
| 322 » virtual FX_BOOL»» » » » » » Backspac
e() = 0; | 322 » virtual bool» » » » » » » Backspac
e() = 0; |
| 323 //do delete operation. | 323 //do delete operation. |
| 324 » virtual FX_BOOL»» » » » » » Delete()
= 0; | 324 » virtual bool» » » » » » » Delete()
= 0; |
| 325 //delete the selected text. | 325 //delete the selected text. |
| 326 » virtual FX_BOOL»» » » » » » Clear()
= 0; | 326 » virtual bool» » » » » » » Clear()
= 0; |
| 327 | 327 |
| 328 //do Redo operation. | 328 //do Redo operation. |
| 329 » virtual FX_BOOL»» » » » » » Redo() =
0; | 329 » virtual bool» » » » » » » Redo() =
0; |
| 330 //do Undo operation. | 330 //do Undo operation. |
| 331 » virtual FX_BOOL»» » » » » » Undo() =
0; | 331 » virtual bool» » » » » » » Undo() =
0; |
| 332 //move caret | 332 //move caret |
| 333 virtual void SetCaret
(int32_t nPos) = 0; | 333 virtual void SetCaret
(int32_t nPos) = 0; |
| 334 | 334 |
| 335 //arrange all words over again | 335 //arrange all words over again |
| 336 virtual void Paint()
= 0; | 336 virtual void Paint()
= 0; |
| 337 | 337 |
| 338 //allow to refresh screen? | 338 //allow to refresh screen? |
| 339 » virtual void» » » » » » » EnableRe
fresh(FX_BOOL bRefresh) = 0; | 339 » virtual void» » » » » » » EnableRe
fresh(bool bRefresh) = 0; |
| 340 | 340 |
| 341 virtual void RefreshW
ordRange(const CPVT_WordRange& wr) = 0; | 341 virtual void RefreshW
ordRange(const CPVT_WordRange& wr) = 0; |
| 342 | 342 |
| 343 //allow undo/redo? | 343 //allow undo/redo? |
| 344 » virtual void» » » » » » » EnableUn
do(FX_BOOL bUndo) = 0; | 344 » virtual void» » » » » » » EnableUn
do(bool bUndo) = 0; |
| 345 | 345 |
| 346 //allow notify? | 346 //allow notify? |
| 347 » virtual void» » » » » » » EnableNo
tify(FX_BOOL bNotify) = 0; | 347 » virtual void» » » » » » » EnableNo
tify(bool bNotify) = 0; |
| 348 | 348 |
| 349 //allow opr notify? | 349 //allow opr notify? |
| 350 » virtual void» » » » » » » EnableOp
rNotify(FX_BOOL bNotify) = 0; | 350 » virtual void» » » » » » » EnableOp
rNotify(bool bNotify) = 0; |
| 351 | 351 |
| 352 //map word place to word index. | 352 //map word place to word index. |
| 353 virtual int32_t WordPlaceToWordI
ndex(const CPVT_WordPlace & place) const = 0; | 353 virtual int32_t WordPlaceToWordI
ndex(const CPVT_WordPlace & place) const = 0; |
| 354 //map word index to word place. | 354 //map word index to word place. |
| 355 virtual CPVT_WordPlace WordIndexToWordP
lace(int32_t index) const = 0; | 355 virtual CPVT_WordPlace WordIndexToWordP
lace(int32_t index) const = 0; |
| 356 | 356 |
| 357 //get the beginning position of a line | 357 //get the beginning position of a line |
| 358 virtual CPVT_WordPlace GetLineBeginPlac
e(const CPVT_WordPlace & place) const = 0; | 358 virtual CPVT_WordPlace GetLineBeginPlac
e(const CPVT_WordPlace & place) const = 0; |
| 359 | 359 |
| 360 //get the ending position of a line | 360 //get the ending position of a line |
| (...skipping 14 matching lines...) Expand all Loading... |
| 375 virtual FX_WORD GetPassw
ordChar() const = 0; | 375 virtual FX_WORD GetPassw
ordChar() const = 0; |
| 376 //get the count of charArray | 376 //get the count of charArray |
| 377 virtual int32_t GetCharArray() c
onst = 0; | 377 virtual int32_t GetCharArray() c
onst = 0; |
| 378 //get the horizontal scale of all characters | 378 //get the horizontal scale of all characters |
| 379 virtual int32_t GetHorzScale() c
onst = 0; | 379 virtual int32_t GetHorzScale() c
onst = 0; |
| 380 //get the space of two characters | 380 //get the space of two characters |
| 381 virtual FX_FLOAT GetCharS
pace() const = 0; | 381 virtual FX_FLOAT GetCharS
pace() const = 0; |
| 382 //get the latin words of specified range | 382 //get the latin words of specified range |
| 383 virtual CFX_WideString GetRangeText(con
st CPVT_WordRange & range) const = 0; | 383 virtual CFX_WideString GetRangeText(con
st CPVT_WordRange & range) const = 0; |
| 384 //is the text full in bounding box | 384 //is the text full in bounding box |
| 385 » virtual FX_BOOL»» » » » » » IsTextFu
ll() const = 0; | 385 » virtual bool» » » » » » » IsTextFu
ll() const = 0; |
| 386 » virtual FX_BOOL»» » » » » » CanUndo(
) const = 0; | 386 » virtual bool» » » » » » » CanUndo(
) const = 0; |
| 387 » virtual FX_BOOL»» » » » » » CanRedo(
) const = 0; | 387 » virtual bool» » » » » » » CanRedo(
) const = 0; |
| 388 //if the content is changed after settext? | 388 //if the content is changed after settext? |
| 389 » virtual FX_BOOL»» » » » » » IsModifi
ed() const = 0; | 389 » virtual bool» » » » » » » IsModifi
ed() const = 0; |
| 390 //get the total words in edit | 390 //get the total words in edit |
| 391 virtual int32_t GetTotalWords()
const = 0; | 391 virtual int32_t GetTotalWords()
const = 0; |
| 392 | 392 |
| 393 virtual void AddUndoI
tem(IFX_Edit_UndoItem* pUndoItem) = 0; | 393 virtual void AddUndoI
tem(IFX_Edit_UndoItem* pUndoItem) = 0; |
| 394 | 394 |
| 395 static CFX_ByteString GetEditAppearanc
eStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, | 395 static CFX_ByteString GetEditAppearanc
eStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, |
| 396
const CPVT_WordRange* pRange = NULL, | 396
const CPVT_WordRange* pRange = NULL, |
| 397 » » » » » » » » » »
» » » FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0); | 397 » » » » » » » » » »
» » » bool bContinuous = true, FX_WORD SubWord = 0); |
| 398 static CFX_ByteString GetSelectAppeara
nceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange* pR
ange = NULL); | 398 static CFX_ByteString GetSelectAppeara
nceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange* pR
ange = NULL); |
| 399 static void
DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit,
FX_COLORREF crTextFill, FX_COLORREF crTextStroke, | 399 static void
DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit,
FX_COLORREF crTextFill, FX_COLORREF crTextStroke, |
| 400
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData); | 400
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData); |
| 401 static void
DrawUnderline(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pE
dit, FX_COLORREF color, | 401 static void
DrawUnderline(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pE
dit, FX_COLORREF color, |
| 402
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange); | 402
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange); |
| 403 static void
DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEd
it, | 403 static void
DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEd
it, |
| 404
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange); | 404
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, con
st CPVT_WordRange* pRange); |
| 405 static void
GeneratePageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEdit, | 405 static void
GeneratePageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEdit, |
| 406
const CPDF_Point& ptOffset, const CPVT_WordRange* pRange
, FX_COLORREF crText, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray); | 406
const CPDF_Point& ptOffset, const CPVT_WordRange* pRange
, FX_COLORREF crText, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray); |
| 407 static void
GenerateRichPageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEdit, | 407 static void
GenerateRichPageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEdit, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 444 |
| 445 virtual void SetPlate
Rect(const CPDF_Rect & rect) = 0; | 445 virtual void SetPlate
Rect(const CPDF_Rect & rect) = 0; |
| 446 virtual void SetFontS
ize(FX_FLOAT fFontSize) = 0; | 446 virtual void SetFontS
ize(FX_FLOAT fFontSize) = 0; |
| 447 | 447 |
| 448 virtual CPDF_Rect GetPlate
Rect() const = 0; | 448 virtual CPDF_Rect GetPlate
Rect() const = 0; |
| 449 virtual CPDF_Rect GetConte
ntRect() const = 0; | 449 virtual CPDF_Rect GetConte
ntRect() const = 0; |
| 450 | 450 |
| 451 virtual FX_FLOAT GetFontS
ize() const = 0; | 451 virtual FX_FLOAT GetFontS
ize() const = 0; |
| 452 virtual IFX_Edit* GetItemE
dit(int32_t nIndex) const = 0; | 452 virtual IFX_Edit* GetItemE
dit(int32_t nIndex) const = 0; |
| 453 virtual int32_t GetCount() const
= 0; | 453 virtual int32_t GetCount() const
= 0; |
| 454 » virtual FX_BOOL»» » » » » » IsItemSe
lected(int32_t nIndex) const = 0; | 454 » virtual bool» » » » » » » IsItemSe
lected(int32_t nIndex) const = 0; |
| 455 virtual FX_FLOAT GetFirst
Height() const = 0; | 455 virtual FX_FLOAT GetFirst
Height() const = 0; |
| 456 | 456 |
| 457 » virtual void» » » » » » » SetMulti
pleSel(FX_BOOL bMultiple) = 0; | 457 » virtual void» » » » » » » SetMulti
pleSel(bool bMultiple) = 0; |
| 458 » virtual FX_BOOL»» » » » » » IsMultip
leSel() const = 0; | 458 » virtual bool» » » » » » » IsMultip
leSel() const = 0; |
| 459 » virtual FX_BOOL»» » » » » » IsValid(
int32_t nItemIndex) const = 0; | 459 » virtual bool» » » » » » » IsValid(
int32_t nItemIndex) const = 0; |
| 460 virtual int32_t FindNext(int32_t
nIndex,FX_WCHAR nChar) const = 0; | 460 virtual int32_t FindNext(int32_t
nIndex,FX_WCHAR nChar) const = 0; |
| 461 | 461 |
| 462 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; | 462 virtual void SetScrol
lPos(const CPDF_Point & point) = 0; |
| 463 virtual void ScrollTo
ListItem(int32_t nItemIndex) = 0; | 463 virtual void ScrollTo
ListItem(int32_t nItemIndex) = 0; |
| 464 virtual CPDF_Rect GetItemR
ect(int32_t nIndex) const = 0; | 464 virtual CPDF_Rect GetItemR
ect(int32_t nIndex) const = 0; |
| 465 virtual int32_t GetCaret() const
= 0; | 465 virtual int32_t GetCaret() const
= 0; |
| 466 virtual int32_t GetSelect() cons
t = 0; | 466 virtual int32_t GetSelect() cons
t = 0; |
| 467 virtual int32_t GetTopItem() con
st = 0; | 467 virtual int32_t GetTopItem() con
st = 0; |
| 468 virtual int32_t GetItemIndex(con
st CPDF_Point & point) const = 0; | 468 virtual int32_t GetItemIndex(con
st CPDF_Point & point) const = 0; |
| 469 virtual int32_t GetFirstSelected
() const = 0; | 469 virtual int32_t GetFirstSelected
() const = 0; |
| 470 | 470 |
| 471 virtual void AddStrin
g(const FX_WCHAR* string) = 0; | 471 virtual void AddStrin
g(const FX_WCHAR* string) = 0; |
| 472 virtual void SetTopIt
em(int32_t nIndex) = 0; | 472 virtual void SetTopIt
em(int32_t nIndex) = 0; |
| 473 virtual void Select(i
nt32_t nItemIndex) = 0; | 473 virtual void Select(i
nt32_t nItemIndex) = 0; |
| 474 virtual void SetCaret
(int32_t nItemIndex) = 0; | 474 virtual void SetCaret
(int32_t nItemIndex) = 0; |
| 475 virtual void Empty()
= 0; | 475 virtual void Empty()
= 0; |
| 476 virtual void Cancel()
= 0; | 476 virtual void Cancel()
= 0; |
| 477 virtual CFX_WideString GetText() const
= 0; | 477 virtual CFX_WideString GetText() const
= 0; |
| 478 | 478 |
| 479 | 479 |
| 480 » virtual void» » » » » » » OnMouseD
own(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 480 » virtual void» » » » » » » OnMouseD
own(const CPDF_Point & point,bool bShift,bool bCtrl) = 0; |
| 481 » virtual void» » » » » » » OnMouseM
ove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 481 » virtual void» » » » » » » OnMouseM
ove(const CPDF_Point & point,bool bShift,bool bCtrl) = 0; |
| 482 » virtual void» » » » » » » OnVK_UP(
FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 482 » virtual void» » » » » » » OnVK_UP(
bool bShift,bool bCtrl) = 0; |
| 483 » virtual void» » » » » » » OnVK_DOW
N(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 483 » virtual void» » » » » » » OnVK_DOW
N(bool bShift,bool bCtrl) = 0; |
| 484 » virtual void» » » » » » » OnVK_LEF
T(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 484 » virtual void» » » » » » » OnVK_LEF
T(bool bShift,bool bCtrl) = 0; |
| 485 » virtual void» » » » » » » OnVK_RIG
HT(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 485 » virtual void» » » » » » » OnVK_RIG
HT(bool bShift,bool bCtrl) = 0; |
| 486 » virtual void» » » » » » » OnVK_HOM
E(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 486 » virtual void» » » » » » » OnVK_HOM
E(bool bShift,bool bCtrl) = 0; |
| 487 » virtual void» » » » » » » OnVK_END
(FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 487 » virtual void» » » » » » » OnVK_END
(bool bShift,bool bCtrl) = 0; |
| 488 » virtual void» » » » » » » OnVK(int
32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 488 » virtual void» » » » » » » OnVK(int
32_t nItemIndex,bool bShift,bool bCtrl) = 0; |
| 489 » virtual FX_BOOL»» » » » » » OnChar(F
X_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl) = 0; | 489 » virtual bool» » » » » » » OnChar(F
X_WORD nChar,bool bShift,bool bCtrl) = 0; |
| 490 | 490 |
| 491 protected: | 491 protected: |
| 492 ~IFX_List() { } | 492 ~IFX_List() { } |
| 493 }; | 493 }; |
| 494 | 494 |
| 495 #endif // FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ | 495 #endif // FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ |
| OLD | NEW |