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

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_EditCtrl.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_Edit.h ('k') | fpdfsdk/include/pdfwindow/PWL_FontMap.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_EDITCTRL_H_ 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_ 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_
9 9
10 #include "../../../core/include/fxcrt/fx_string.h" 10 #include "../../../core/include/fxcrt/fx_string.h"
(...skipping 19 matching lines...) Expand all
30 PEAV_TOP = 0, 30 PEAV_TOP = 0,
31 PEAV_CENTER, 31 PEAV_CENTER,
32 PEAV_BOTTOM 32 PEAV_BOTTOM
33 }; 33 };
34 34
35 class IPWL_Edit_Notify 35 class IPWL_Edit_Notify
36 { 36 {
37 public: 37 public:
38 virtual ~IPWL_Edit_Notify() { } 38 virtual ~IPWL_Edit_Notify() { }
39 //when the position of caret is changed in edit 39 //when the position of caret is changed in edit
40 » virtual void» » » » » OnCaretMove(FX_INT32 x1, FX_INT32 y1, FX_INT32 x2, FX_INT32 y2) {} 40 » virtual void» » » » » OnCaretMove(int32_t x1, int32_t y1, int32_t x2, int32_t y2) {}
41 virtual void OnContentChange(const CP DF_Rect& rcContent){} 41 virtual void OnContentChange(const CP DF_Rect& rcContent){}
42 //OprType: 0 InsertWord 42 //OprType: 0 InsertWord
43 //1 InsertReturn 43 //1 InsertReturn
44 //2 BackSpace 44 //2 BackSpace
45 //3 Delete 45 //3 Delete
46 //4 Clear 46 //4 Clear
47 //5 InsertText 47 //5 InsertText
48 //6 SetText 48 //6 SetText
49 virtual void OnInsertWord(const CPVT_ WordPlace& place, const CPVT_WordPlace& oldplace){} 49 virtual void OnInsertWord(const CPVT_ WordPlace& place, const CPVT_WordPlace& oldplace){}
50 virtual void OnInsertReturn(const CPV T_WordPlace& place, const CPVT_WordPlace& oldplace){} 50 virtual void OnInsertReturn(const CPV T_WordPlace& place, const CPVT_WordPlace& oldplace){}
(...skipping 15 matching lines...) Expand all
66 66
67 public: 67 public:
68 virtual void OnCreate(PWL_CREATEPARAM & cp); 68 virtual void OnCreate(PWL_CREATEPARAM & cp);
69 virtual void OnCreated(); 69 virtual void OnCreated();
70 70
71 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); 71 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
72 virtual FX_BOOL OnChar(FX_WORD nChar, FX _DWORD nFlag); 72 virtual FX_BOOL OnChar(FX_WORD nChar, FX _DWORD nFlag);
73 virtual FX_BOOL OnLButtonDown(const CPDF _Point & point, FX_DWORD nFlag); 73 virtual FX_BOOL OnLButtonDown(const CPDF _Point & point, FX_DWORD nFlag);
74 virtual FX_BOOL OnLButtonUp(const CPDF_P oint & point, FX_DWORD nFlag); 74 virtual FX_BOOL OnLButtonUp(const CPDF_P oint & point, FX_DWORD nFlag);
75 virtual FX_BOOL OnMouseMove(const CPDF_P oint & point, FX_DWORD nFlag); 75 virtual FX_BOOL OnMouseMove(const CPDF_P oint & point, FX_DWORD nFlag);
76 » virtual void» » » » » OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0); 76 » virtual void» » » » » OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
77 77
78 virtual void CreateChildWnd(const PWL _CREATEPARAM & cp); 78 virtual void CreateChildWnd(const PWL _CREATEPARAM & cp);
79 virtual void RePosChildWnd(); 79 virtual void RePosChildWnd();
80 virtual void SetFontSize(FX_FLOAT fFo ntSize); 80 virtual void SetFontSize(FX_FLOAT fFo ntSize);
81 virtual FX_FLOAT GetFontSize() const; 81 virtual FX_FLOAT GetFontSize() const;
82 82
83 public: 83 public:
84 virtual void SetText(FX_LPCWSTR csTex t); 84 virtual void SetText(FX_LPCWSTR csTex t);
85 85
86 virtual void CopyText(); 86 virtual void CopyText();
87 virtual void PasteText(); 87 virtual void PasteText();
88 virtual void CutText(); 88 virtual void CutText();
89 89
90 CPDF_Rect GetContentRect() const; 90 CPDF_Rect GetContentRect() const;
91 » void» » » » » » » GetCaretPos(FX_I NT32& x, FX_INT32& y) const; 91 » void» » » » » » » GetCaretPos(int3 2_t& x, int32_t& y) const;
92 FX_BOOL IsModified() con st; 92 FX_BOOL IsModified() con st;
93 93
94 CFX_WideString GetText() const; 94 CFX_WideString GetText() const;
95 » void» » » » » » » SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar); 95 » void» » » » » » » SetSel(int32_t n StartChar,int32_t nEndChar);
96 » void» » » » » » » GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar ) const; 96 » void» » » » » » » GetSel(int32_t & nStartChar, int32_t & nEndChar ) const;
97 » void» » » » » » » GetTextRange(con st CPDF_Rect& rect, FX_INT32 & nStartChar, FX_INT32 & nEndChar) const; 97 » void» » » » » » » GetTextRange(con st CPDF_Rect& rect, int32_t & nStartChar, int32_t & nEndChar) const;
98 » CFX_WideString» » » » » GetText(FX_INT32 & nStar tChar, FX_INT32 & nEndChar) const; 98 » CFX_WideString» » » » » GetText(int32_t & nStart Char, int32_t & nEndChar) const;
99 void Clear(); 99 void Clear();
100 void SelectAll(); 100 void SelectAll();
101 101
102 » FX_INT32» » » » » » GetCaret() const ; 102 » int32_t»» » » » » GetCaret() const;
103 » void» » » » » » » SetCaret(FX_INT3 2 nPos); 103 » void» » » » » » » SetCaret(int32_t nPos);
104 » FX_INT32» » » » » » GetTotalWords() const; 104 » int32_t»» » » » » GetTotalWords() const;
105 105
106 void Paint(); 106 void Paint();
107 107
108 void EnableRefresh(FX _BOOL bRefresh); 108 void EnableRefresh(FX _BOOL bRefresh);
109 CPDF_Point GetScrollPos() c onst; 109 CPDF_Point GetScrollPos() c onst;
110 void SetScrollPos(con st CPDF_Point& point); 110 void SetScrollPos(con st CPDF_Point& point);
111 111
112 void SetEditNotify(IP WL_Edit_Notify* pNotify) {m_pEditNotify = pNotify;} 112 void SetEditNotify(IP WL_Edit_Notify* pNotify) {m_pEditNotify = pNotify;}
113 113
114 » void» » » » » » » SetCharSet(FX_BY TE nCharSet){m_nCharSet = nCharSet;} 114 » void» » » » » » » SetCharSet(uint8 _t nCharSet){m_nCharSet = nCharSet;}
115 » FX_INT32» » » » » » GetCharSet() con st; 115 » int32_t»» » » » » GetCharSet() const;
116 116
117 » void» » » » » » » SetCodePage(FX_I NT32 nCodePage){m_nCodePage = nCodePage;} 117 » void» » » » » » » SetCodePage(int3 2_t nCodePage){m_nCodePage = nCodePage;}
118 » FX_INT32» » » » » » GetCodePage() co nst {return m_nCodePage;} 118 » int32_t»» » » » » GetCodePage() const {ret urn m_nCodePage;}
119 119
120 CPDF_Font * GetCaretFont() c onst; 120 CPDF_Font * GetCaretFont() c onst;
121 FX_FLOAT GetCaretFontSize () const; 121 FX_FLOAT GetCaretFontSize () const;
122 122
123 FX_BOOL CanUndo() const; 123 FX_BOOL CanUndo() const;
124 FX_BOOL CanRedo() const; 124 FX_BOOL CanRedo() const;
125 void Redo(); 125 void Redo();
126 void Undo(); 126 void Undo();
127 127
128 void SetReadyToInput( ); 128 void SetReadyToInput( );
129 protected: 129 protected:
130 virtual void ShowVScrollBar(FX_BOOL b Show); 130 virtual void ShowVScrollBar(FX_BOOL b Show);
131 131
132 » virtual void» » » » » InsertWord(FX_WORD word, FX_INT32 nCharset); 132 » virtual void» » » » » InsertWord(FX_WORD word, int32_t nCharset);
133 virtual void InsertReturn(); 133 virtual void InsertReturn();
134 virtual void InsertText(FX_LPCWSTR cs Text); 134 virtual void InsertText(FX_LPCWSTR cs Text);
135 135
136 virtual void SetCursor(); 136 virtual void SetCursor();
137 FX_BOOL IsWndHorV(); 137 FX_BOOL IsWndHorV();
138 138
139 void Delete(); 139 void Delete();
140 void Backspace(); 140 void Backspace();
141 141
142 protected: 142 protected:
(...skipping 19 matching lines...) Expand all
162 private: 162 private:
163 void CreateEditCaret( const PWL_CREATEPARAM & cp); 163 void CreateEditCaret( const PWL_CREATEPARAM & cp);
164 164
165 protected: 165 protected:
166 IFX_Edit* m_pEdit; 166 IFX_Edit* m_pEdit;
167 CPWL_Caret* m_pEditCaret; 167 CPWL_Caret* m_pEditCaret;
168 FX_BOOL m_bMouseDown; 168 FX_BOOL m_bMouseDown;
169 IPWL_Edit_Notify* m_pEditNotify; 169 IPWL_Edit_Notify* m_pEditNotify;
170 170
171 private: 171 private:
172 » FX_INT32» » » » » » m_nCharSet; 172 » int32_t»» » » » » m_nCharSet;
173 » FX_INT32» » » » » » m_nCodePage; 173 » int32_t»» » » » » m_nCodePage;
174 }; 174 };
175 175
176 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_ 176 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Edit.h ('k') | fpdfsdk/include/pdfwindow/PWL_FontMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698