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

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_Caret.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_Button.h ('k') | fpdfsdk/include/pdfwindow/PWL_ComboBox.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_CARET_H_ 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_CARET_H_
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_CARET_H_ 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_CARET_H_
9 9
10 #include "PWL_Wnd.h" 10 #include "PWL_Wnd.h"
11 11
12 struct PWL_CARET_INFO { 12 struct PWL_CARET_INFO {
13 public: 13 public:
14 PWL_CARET_INFO() : bVisible(FALSE), ptHead(0, 0), ptFoot(0, 0) {} 14 PWL_CARET_INFO() : bVisible(FALSE), ptHead(0, 0), ptFoot(0, 0) {}
15 15
16 FX_BOOL bVisible; 16 FX_BOOL bVisible;
17 CPDF_Point ptHead; 17 CPDF_Point ptHead;
18 CPDF_Point ptFoot; 18 CPDF_Point ptFoot;
19 }; 19 };
20 20
21 class CPWL_Caret : public CPWL_Wnd { 21 class CPWL_Caret : public CPWL_Wnd {
22 public: 22 public:
23 CPWL_Caret(); 23 CPWL_Caret();
24 virtual ~CPWL_Caret(); 24 ~CPWL_Caret() override;
25 25
26 virtual CFX_ByteString GetClassName() const; 26 // CPWL_Wnd
27 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); 27 CFX_ByteString GetClassName() const override;
28 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, 28 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
29 CPDF_Matrix* pUser2Device); 29 void DrawThisAppearance(CFX_RenderDevice* pDevice,
30 virtual void InvalidateRect(CPDF_Rect* pRect = NULL); 30 CPDF_Matrix* pUser2Device) override;
31 virtual void SetVisible(FX_BOOL bVisible) {} 31 void InvalidateRect(CPDF_Rect* pRect = NULL) override;
32 virtual void TimerProc(); 32 void SetVisible(FX_BOOL bVisible) override {}
33 void TimerProc() override;
34
33 void SetCaret(FX_BOOL bVisible, 35 void SetCaret(FX_BOOL bVisible,
34 const CPDF_Point& ptHead, 36 const CPDF_Point& ptHead,
35 const CPDF_Point& ptFoot); 37 const CPDF_Point& ptFoot);
36 CFX_ByteString GetCaretAppearanceStream(const CPDF_Point& ptOffset); 38 CFX_ByteString GetCaretAppearanceStream(const CPDF_Point& ptOffset);
37 void SetInvalidRect(CPDF_Rect rc) { m_rcInvalid = rc; } 39 void SetInvalidRect(CPDF_Rect rc) { m_rcInvalid = rc; }
38 40
39 private: 41 private:
40 void GetCaretApp(CFX_ByteTextBuf& sAppStream, const CPDF_Point& ptOffset); 42 void GetCaretApp(CFX_ByteTextBuf& sAppStream, const CPDF_Point& ptOffset);
41 CPDF_Rect GetCaretRect() const; 43 CPDF_Rect GetCaretRect() const;
42 44
43 FX_BOOL m_bFlash; 45 FX_BOOL m_bFlash;
44 CPDF_Point m_ptHead; 46 CPDF_Point m_ptHead;
45 CPDF_Point m_ptFoot; 47 CPDF_Point m_ptFoot;
46 FX_FLOAT m_fWidth; 48 FX_FLOAT m_fWidth;
47 int32_t m_nDelay; 49 int32_t m_nDelay;
48 CPDF_Rect m_rcInvalid; 50 CPDF_Rect m_rcInvalid;
49 }; 51 };
50 52
51 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_CARET_H_ 53 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_CARET_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Button.h ('k') | fpdfsdk/include/pdfwindow/PWL_ComboBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698