Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_Edit.h

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_ComboBox.h ('k') | fpdfsdk/include/pdfwindow/PWL_EditCtrl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PDFWINDOW_PWL_EDIT_H_ 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_ 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_
9 9
10 #include "../../../core/include/fxcrt/fx_basic.h" 10 #include "../../../core/include/fxcrt/fx_basic.h"
11 #include "PWL_EditCtrl.h" 11 #include "PWL_EditCtrl.h"
12 #include "PWL_Wnd.h" 12 #include "PWL_Wnd.h"
13 13
14 class CPWL_Edit; 14 class CPWL_Edit;
15 class IPWL_Filler_Notify; 15 class IPWL_Filler_Notify;
16 class IPWL_SpellCheck; 16 class IPWL_SpellCheck;
17 17
18 class IPWL_Filler_Notify 18 class IPWL_Filler_Notify
19 { 19 {
20 public: 20 public:
21 virtual ~IPWL_Filler_Notify() { } 21 virtual ~IPWL_Filler_Notify() { }
22 virtual void QueryWherePopup(void* pP rivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, 22 virtual void QueryWherePopup(void* pP rivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax,
23 » » » » » » » » » » FX_INT32 & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top) 23 » » » » » » » » » » int32_t & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top)
24 » virtual void» » » » » OnBeforeKeyStroke(FX_BOO L bEditOrList, void* pPrivateData, FX_INT32 nKeyCode, 24 » virtual void» » » » » OnBeforeKeyStroke(FX_BOO L bEditOrList, void* pPrivateData, int32_t nKeyCode,
25 CFX_WideString & strChange, const CFX_WideString& strChangeEx, 25 CFX_WideString & strChange, const CFX_WideString& strChangeEx,
26 int nSelStart, int nSelEnd, 26 int nSelStart, int nSelEnd,
27 FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag) = 0; 27 FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag) = 0;
28 virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) = 0; 28 virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) = 0;
29 29
30 virtual void OnPopupPreOpen(void* pPr ivateData, FX_BOOL& bExit, FX_DWORD nFlag) = 0; 30 virtual void OnPopupPreOpen(void* pPr ivateData, FX_BOOL& bExit, FX_DWORD nFlag) = 0;
31 virtual void OnPopupPostOpen(void* pP rivateData, FX_BOOL& bExit, FX_DWORD nFlag) = 0; 31 virtual void OnPopupPostOpen(void* pP rivateData, FX_BOOL& bExit, FX_DWORD nFlag) = 0;
32 }; 32 };
33 33
34 class PWL_CLASS CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify 34 class PWL_CLASS CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify
(...skipping 19 matching lines...) Expand all
54 54
55 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); 55 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
56 virtual FX_BOOL OnChar(FX_WORD nChar, FX _DWORD nFlag); 56 virtual FX_BOOL OnChar(FX_WORD nChar, FX _DWORD nFlag);
57 57
58 virtual CPDF_Rect GetFocusRect() const; 58 virtual CPDF_Rect GetFocusRect() const;
59 59
60 public: 60 public:
61 void SetAlignFormatH( PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle 61 void SetAlignFormatH( PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle
62 void SetAlignFormatV( PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, FX_BOOL bPaint = TRUE); //0:top 1:bottom 2:center 62 void SetAlignFormatV( PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, FX_BOOL bPaint = TRUE); //0:top 1:bottom 2:center
63 63
64 » void» » » » » » » SetCharArray(FX_ INT32 nCharArray); 64 » void» » » » » » » SetCharArray(int 32_t nCharArray);
65 » void» » » » » » » SetLimitChar(FX_ INT32 nLimitChar); 65 » void» » » » » » » SetLimitChar(int 32_t nLimitChar);
66 66
67 » void» » » » » » » SetHorzScale(FX_ INT32 nHorzScale, FX_BOOL bPaint = TRUE); 67 » void» » » » » » » SetHorzScale(int 32_t nHorzScale, FX_BOOL bPaint = TRUE);
68 void SetCharSpace(FX_ FLOAT fCharSpace, FX_BOOL bPaint = TRUE); 68 void SetCharSpace(FX_ FLOAT fCharSpace, FX_BOOL bPaint = TRUE);
69 69
70 void SetLineLeading(F X_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); 70 void SetLineLeading(F X_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
71 71
72 void EnableSpellCheck (FX_BOOL bEnabled); 72 void EnableSpellCheck (FX_BOOL bEnabled);
73 73
74 FX_BOOL CanSelectAll() c onst; 74 FX_BOOL CanSelectAll() c onst;
75 FX_BOOL CanClear() const ; 75 FX_BOOL CanClear() const ;
76 FX_BOOL CanCopy() const; 76 FX_BOOL CanCopy() const;
77 FX_BOOL CanCut() const; 77 FX_BOOL CanCut() const;
78 FX_BOOL CanPaste() const ; 78 FX_BOOL CanPaste() const ;
79 79
80 virtual void CopyText(); 80 virtual void CopyText();
81 virtual void PasteText(); 81 virtual void PasteText();
82 virtual void CutText(); 82 virtual void CutText();
83 83
84 virtual void SetText(FX_LPCWSTR csTex t); 84 virtual void SetText(FX_LPCWSTR csTex t);
85 void ReplaceSel(FX_LP CWSTR csText); 85 void ReplaceSel(FX_LP CWSTR csText);
86 86
87 CFX_ByteString GetTextAppearanceStream( const CPDF_Point & ptOffset) const; 87 CFX_ByteString GetTextAppearanceStream( const CPDF_Point & ptOffset) const;
88 CFX_ByteString GetCaretAppearanceStream (const CPDF_Point & ptOffset) const; 88 CFX_ByteString GetCaretAppearanceStream (const CPDF_Point & ptOffset) const;
89 CFX_ByteString GetSelectAppearanceStrea m(const CPDF_Point & ptOffset) const; 89 CFX_ByteString GetSelectAppearanceStrea m(const CPDF_Point & ptOffset) const;
90 90
91 FX_BOOL IsTextFull() con st; 91 FX_BOOL IsTextFull() con st;
92 92
93 » static FX_FLOAT»» » » » GetCharArrayAutoFontSize (CPDF_Font* pFont, const CPDF_Rect& rcPlate, FX_INT32 nCharArray); 93 » static FX_FLOAT»» » » » GetCharArrayAutoFontSize (CPDF_Font* pFont, const CPDF_Rect& rcPlate, int32_t nCharArray);
94 94
95 void SetFillerNotify( IPWL_Filler_Notify* pNotify) {m_pFillerNotify = pNotify;} 95 void SetFillerNotify( IPWL_Filler_Notify* pNotify) {m_pFillerNotify = pNotify;}
96 96
97 void GeneratePageObje cts(CPDF_PageObjects* pPageObjects, 97 void GeneratePageObje cts(CPDF_PageObjects* pPageObjects,
98 const CPDF_Point& ptOffset, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray); 98 const CPDF_Point& ptOffset, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
99 void GeneratePageObje cts(CPDF_PageObjects* pPageObjects, 99 void GeneratePageObje cts(CPDF_PageObjects* pPageObjects,
100 const CPDF_Point& ptOffset); 100 const CPDF_Point& ptOffset);
101 101
102 protected: 102 protected:
103 virtual void OnSetFocus(); 103 virtual void OnSetFocus();
104 virtual void OnKillFocus(); 104 virtual void OnKillFocus();
105 105
106 protected: 106 protected:
107 virtual void OnInsertWord(const CPVT_ WordPlace& place, const CPVT_WordPlace& oldplace); 107 virtual void OnInsertWord(const CPVT_ WordPlace& place, const CPVT_WordPlace& oldplace);
108 virtual void OnInsertReturn(const CPV T_WordPlace& place, const CPVT_WordPlace& oldplace); 108 virtual void OnInsertReturn(const CPV T_WordPlace& place, const CPVT_WordPlace& oldplace);
109 virtual void OnBackSpace(const CPVT_W ordPlace& place, const CPVT_WordPlace& oldplace); 109 virtual void OnBackSpace(const CPVT_W ordPlace& place, const CPVT_WordPlace& oldplace);
110 virtual void OnDelete(const CPVT_Word Place& place, const CPVT_WordPlace& oldplace); 110 virtual void OnDelete(const CPVT_Word Place& place, const CPVT_WordPlace& oldplace);
111 virtual void OnClear(const CPVT_WordP lace& place, const CPVT_WordPlace& oldplace); 111 virtual void OnClear(const CPVT_WordP lace& place, const CPVT_WordPlace& oldplace);
112 virtual void OnSetText(const CPVT_Wor dPlace& place, const CPVT_WordPlace& oldplace); 112 virtual void OnSetText(const CPVT_Wor dPlace& place, const CPVT_WordPlace& oldplace);
113 virtual void OnInsertText(const CPVT_ WordPlace& place, const CPVT_WordPlace& oldplace); 113 virtual void OnInsertText(const CPVT_ WordPlace& place, const CPVT_WordPlace& oldplace);
114 virtual void OnAddUndo(IFX_Edit_UndoI tem* pUndoItem); 114 virtual void OnAddUndo(IFX_Edit_UndoI tem* pUndoItem);
115 115
116 private: 116 private:
117 CPVT_WordRange GetSelectWordRange() con st; 117 CPVT_WordRange GetSelectWordRange() con st;
118 virtual void ShowVScrollBar(FX_BOOL b Show); 118 virtual void ShowVScrollBar(FX_BOOL b Show);
119 FX_BOOL IsVScrollBarVisi ble() const; 119 FX_BOOL IsVScrollBarVisi ble() const;
120 void SetParamByFlag() ; 120 void SetParamByFlag() ;
121 121
122 » FX_FLOAT» » » » » » GetCharArrayAuto FontSize(FX_INT32 nCharArray); 122 » FX_FLOAT» » » » » » GetCharArrayAuto FontSize(int32_t nCharArray);
123 CPDF_Point GetWordRightBott omPoint(const CPVT_WordPlace& wpWord); 123 CPDF_Point GetWordRightBott omPoint(const CPVT_WordPlace& wpWord);
124 124
125 CPVT_WordRange CombineWordRange(const C PVT_WordRange& wr1, const CPVT_WordRange& wr2); 125 CPVT_WordRange CombineWordRange(const C PVT_WordRange& wr1, const CPVT_WordRange& wr2);
126 CPVT_WordRange GetLatinWordsRange(const CPDF_Point & point) const; 126 CPVT_WordRange GetLatinWordsRange(const CPDF_Point & point) const;
127 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace & place) const; 127 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace & place) const;
128 CPVT_WordRange GetArabicWordsRange(cons t CPVT_WordPlace & place) const; 128 CPVT_WordRange GetArabicWordsRange(cons t CPVT_WordPlace & place) const;
129 CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, FX_BOOL bLatin, FX_BOOL bArabic) const; 129 CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, FX_BOOL bLatin, FX_BOOL bArabic) const;
130 130
131 void AjustArabicWords (const CPVT_WordRange& wr); 131 void AjustArabicWords (const CPVT_WordRange& wr);
132 public: 132 public:
133 FX_BOOL IsProceedtoOnCha r(FX_WORD nKeyCode, FX_DWORD nFlag); 133 FX_BOOL IsProceedtoOnCha r(FX_WORD nKeyCode, FX_DWORD nFlag);
134 private: 134 private:
135 IPWL_Filler_Notify* m_pFillerNotify; 135 IPWL_Filler_Notify* m_pFillerNotify;
136 IPWL_SpellCheck* m_pSpellCheck; 136 IPWL_SpellCheck* m_pSpellCheck;
137 FX_BOOL m_bFocus; 137 FX_BOOL m_bFocus;
138 CPDF_Rect m_rcOldWindow; 138 CPDF_Rect m_rcOldWindow;
139 public: 139 public:
140 void AttachFFLData(vo id* pData) {m_pFormFiller = pData;} 140 void AttachFFLData(vo id* pData) {m_pFormFiller = pData;}
141 private: 141 private:
142 void* m_pFormFiller; 142 void* m_pFormFiller;
143 }; 143 };
144 144
145 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_ 145 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_ComboBox.h ('k') | fpdfsdk/include/pdfwindow/PWL_EditCtrl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698