diff options
author | Lei Zhang <thestig@chromium.org> | 2015-08-14 22:16:22 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-08-14 22:16:22 -0700 |
commit | 2b1a2d528469cda4e9f3e36d3c7a649e0d476480 (patch) | |
tree | 91eea8ae70b87c632a06fba52ea06c0842e30878 /fpdfsdk/include/pdfwindow/PWL_Edit.h | |
parent | 62b2e912dc2a508972fbf01b25f7449c39ff1543 (diff) | |
download | pdfium-2b1a2d528469cda4e9f3e36d3c7a649e0d476480.tar.xz |
Merge to XFA: Use override in more classes in fpdfsdk/
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1287193005 .
(cherry picked from commit 0f6b51c0fdd14f5762bf3c7412ac59c825443cc3)
Review URL: https://codereview.chromium.org/1288393004 .
Diffstat (limited to 'fpdfsdk/include/pdfwindow/PWL_Edit.h')
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_Edit.h | 82 |
1 files changed, 38 insertions, 44 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h index c7430e5238..25da59197a 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Edit.h +++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h @@ -51,32 +51,29 @@ class IPWL_Filler_Notify { class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify { public: CPWL_Edit(); - virtual ~CPWL_Edit(); + ~CPWL_Edit() override; + + // CPWL_EditCtrl + CFX_ByteString GetClassName() const override; + void OnDestroy() override; + void OnCreated() override; + void RePosChildWnd() override; + CPDF_Rect GetClientRect() const override; + void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; + void DrawThisAppearance(CFX_RenderDevice* pDevice, + CPDF_Matrix* pUser2Device) override; + FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag) override; + FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override; + FX_BOOL OnMouseWheel(short zDelta, + const CPDF_Point& point, + FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; + CPDF_Rect GetFocusRect() const override; + void OnSetFocus() override; + void OnKillFocus() override; - public: - virtual CFX_ByteString GetClassName() const; - virtual void OnDestroy(); - virtual void OnCreated(); - virtual void RePosChildWnd(); - virtual CPDF_Rect GetClientRect() const; - - virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); - virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, - CPDF_Matrix* pUser2Device); - - virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); - virtual FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag); - virtual FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag); - virtual FX_BOOL OnMouseWheel(short zDelta, - const CPDF_Point& point, - FX_DWORD nFlag); - - virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); - - virtual CPDF_Rect GetFocusRect() const; - - public: void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); // 0:left 1:right 2:middle void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, @@ -126,25 +123,22 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify { const CPDF_Point& ptOffset); protected: - virtual void OnSetFocus(); - virtual void OnKillFocus(); - - protected: - virtual void OnInsertWord(const CPVT_WordPlace& place, - const CPVT_WordPlace& oldplace); - virtual void OnInsertReturn(const CPVT_WordPlace& place, - const CPVT_WordPlace& oldplace); - virtual void OnBackSpace(const CPVT_WordPlace& place, - const CPVT_WordPlace& oldplace); - virtual void OnDelete(const CPVT_WordPlace& place, - const CPVT_WordPlace& oldplace); - virtual void OnClear(const CPVT_WordPlace& place, - const CPVT_WordPlace& oldplace); - virtual void OnSetText(const CPVT_WordPlace& place, - const CPVT_WordPlace& oldplace); - virtual void OnInsertText(const CPVT_WordPlace& place, - const CPVT_WordPlace& oldplace); - virtual void OnAddUndo(IFX_Edit_UndoItem* pUndoItem); + // IFX_Edit_OprNotify + void OnInsertWord(const CPVT_WordPlace& place, + const CPVT_WordPlace& oldplace) override; + void OnInsertReturn(const CPVT_WordPlace& place, + const CPVT_WordPlace& oldplace) override; + void OnBackSpace(const CPVT_WordPlace& place, + const CPVT_WordPlace& oldplace) override; + void OnDelete(const CPVT_WordPlace& place, + const CPVT_WordPlace& oldplace) override; + void OnClear(const CPVT_WordPlace& place, + const CPVT_WordPlace& oldplace) override; + void OnSetText(const CPVT_WordPlace& place, + const CPVT_WordPlace& oldplace) override; + void OnInsertText(const CPVT_WordPlace& place, + const CPVT_WordPlace& oldplace) override; + void OnAddUndo(IFX_Edit_UndoItem* pUndoItem) override; private: CPVT_WordRange GetSelectWordRange() const; |