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

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

Issue 1288393004: Merge to XFA: Use override in more classes in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: self review Created 5 years, 4 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"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 FX_BOOL& bExit, 44 FX_BOOL& bExit,
45 FX_DWORD nFlag) = 0; 45 FX_DWORD nFlag) = 0;
46 virtual void OnPopupPostOpen(void* pPrivateData, 46 virtual void OnPopupPostOpen(void* pPrivateData,
47 FX_BOOL& bExit, 47 FX_BOOL& bExit,
48 FX_DWORD nFlag) = 0; 48 FX_DWORD nFlag) = 0;
49 }; 49 };
50 50
51 class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify { 51 class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
52 public: 52 public:
53 CPWL_Edit(); 53 CPWL_Edit();
54 virtual ~CPWL_Edit(); 54 ~CPWL_Edit() override;
55 55
56 public: 56 // CPWL_EditCtrl
57 virtual CFX_ByteString GetClassName() const; 57 CFX_ByteString GetClassName() const override;
58 virtual void OnDestroy(); 58 void OnDestroy() override;
59 virtual void OnCreated(); 59 void OnCreated() override;
60 virtual void RePosChildWnd(); 60 void RePosChildWnd() override;
61 virtual CPDF_Rect GetClientRect() const; 61 CPDF_Rect GetClientRect() const override;
62 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
63 void DrawThisAppearance(CFX_RenderDevice* pDevice,
64 CPDF_Matrix* pUser2Device) override;
65 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
66 FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag) override;
67 FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
68 FX_BOOL OnMouseWheel(short zDelta,
69 const CPDF_Point& point,
70 FX_DWORD nFlag) override;
71 FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
72 FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
73 CPDF_Rect GetFocusRect() const override;
74 void OnSetFocus() override;
75 void OnKillFocus() override;
62 76
63 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
64 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
65 CPDF_Matrix* pUser2Device);
66
67 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
68 virtual FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag);
69 virtual FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
70 virtual FX_BOOL OnMouseWheel(short zDelta,
71 const CPDF_Point& point,
72 FX_DWORD nFlag);
73
74 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
75 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
76
77 virtual CPDF_Rect GetFocusRect() const;
78
79 public:
80 void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, 77 void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT,
81 FX_BOOL bPaint = TRUE); // 0:left 1:right 2:middle 78 FX_BOOL bPaint = TRUE); // 0:left 1:right 2:middle
82 void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, 79 void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP,
83 FX_BOOL bPaint = TRUE); // 0:top 1:bottom 2:center 80 FX_BOOL bPaint = TRUE); // 0:top 1:bottom 2:center
84 81
85 void SetCharArray(int32_t nCharArray); 82 void SetCharArray(int32_t nCharArray);
86 void SetLimitChar(int32_t nLimitChar); 83 void SetLimitChar(int32_t nLimitChar);
87 84
88 void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE); 85 void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE);
89 void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE); 86 void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE);
(...skipping 29 matching lines...) Expand all
119 m_pFillerNotify = pNotify; 116 m_pFillerNotify = pNotify;
120 } 117 }
121 118
122 void GeneratePageObjects(CPDF_PageObjects* pPageObjects, 119 void GeneratePageObjects(CPDF_PageObjects* pPageObjects,
123 const CPDF_Point& ptOffset, 120 const CPDF_Point& ptOffset,
124 CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray); 121 CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
125 void GeneratePageObjects(CPDF_PageObjects* pPageObjects, 122 void GeneratePageObjects(CPDF_PageObjects* pPageObjects,
126 const CPDF_Point& ptOffset); 123 const CPDF_Point& ptOffset);
127 124
128 protected: 125 protected:
129 virtual void OnSetFocus(); 126 // IFX_Edit_OprNotify
130 virtual void OnKillFocus(); 127 void OnInsertWord(const CPVT_WordPlace& place,
131 128 const CPVT_WordPlace& oldplace) override;
132 protected: 129 void OnInsertReturn(const CPVT_WordPlace& place,
133 virtual void OnInsertWord(const CPVT_WordPlace& place, 130 const CPVT_WordPlace& oldplace) override;
134 const CPVT_WordPlace& oldplace); 131 void OnBackSpace(const CPVT_WordPlace& place,
135 virtual void OnInsertReturn(const CPVT_WordPlace& place, 132 const CPVT_WordPlace& oldplace) override;
136 const CPVT_WordPlace& oldplace); 133 void OnDelete(const CPVT_WordPlace& place,
137 virtual void OnBackSpace(const CPVT_WordPlace& place, 134 const CPVT_WordPlace& oldplace) override;
138 const CPVT_WordPlace& oldplace); 135 void OnClear(const CPVT_WordPlace& place,
139 virtual void OnDelete(const CPVT_WordPlace& place, 136 const CPVT_WordPlace& oldplace) override;
140 const CPVT_WordPlace& oldplace); 137 void OnSetText(const CPVT_WordPlace& place,
141 virtual void OnClear(const CPVT_WordPlace& place, 138 const CPVT_WordPlace& oldplace) override;
142 const CPVT_WordPlace& oldplace); 139 void OnInsertText(const CPVT_WordPlace& place,
143 virtual void OnSetText(const CPVT_WordPlace& place, 140 const CPVT_WordPlace& oldplace) override;
144 const CPVT_WordPlace& oldplace); 141 void OnAddUndo(IFX_Edit_UndoItem* pUndoItem) override;
145 virtual void OnInsertText(const CPVT_WordPlace& place,
146 const CPVT_WordPlace& oldplace);
147 virtual void OnAddUndo(IFX_Edit_UndoItem* pUndoItem);
148 142
149 private: 143 private:
150 CPVT_WordRange GetSelectWordRange() const; 144 CPVT_WordRange GetSelectWordRange() const;
151 virtual void ShowVScrollBar(FX_BOOL bShow); 145 virtual void ShowVScrollBar(FX_BOOL bShow);
152 FX_BOOL IsVScrollBarVisible() const; 146 FX_BOOL IsVScrollBarVisible() const;
153 void SetParamByFlag(); 147 void SetParamByFlag();
154 148
155 FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray); 149 FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray);
156 CPDF_Point GetWordRightBottomPoint(const CPVT_WordPlace& wpWord); 150 CPDF_Point GetWordRightBottomPoint(const CPVT_WordPlace& wpWord);
157 151
(...skipping 16 matching lines...) Expand all
174 CPDF_Rect m_rcOldWindow; 168 CPDF_Rect m_rcOldWindow;
175 169
176 public: 170 public:
177 void AttachFFLData(void* pData) { m_pFormFiller = pData; } 171 void AttachFFLData(void* pData) { m_pFormFiller = pData; }
178 172
179 private: 173 private:
180 void* m_pFormFiller; 174 void* m_pFormFiller;
181 }; 175 };
182 176
183 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_ 177 #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