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_ListBox.h

Issue 1287193005: Use override in more classes in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits, rebase 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_Label.h ('k') | fpdfsdk/include/pdfwindow/PWL_ListCtrl.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_LISTBOX_H_ 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_LISTBOX_H_
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_LISTBOX_H_ 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_LISTBOX_H_
9 9
10 #include "../fxedit/fx_edit.h" 10 #include "../fxedit/fx_edit.h"
11 #include "PWL_Wnd.h" 11 #include "PWL_Wnd.h"
12 12
13 class CPDF_ListCtrl; 13 class CPDF_ListCtrl;
14 class CPWL_List_Notify; 14 class CPWL_List_Notify;
15 class CPWL_ListBox; 15 class CPWL_ListBox;
16 class IPWL_Filler_Notify; 16 class IPWL_Filler_Notify;
17 17
18 class CPWL_List_Notify : public IFX_List_Notify { 18 class CPWL_List_Notify : public IFX_List_Notify {
19 public: 19 public:
20 CPWL_List_Notify(CPWL_ListBox* pList); 20 CPWL_List_Notify(CPWL_ListBox* pList);
21 virtual ~CPWL_List_Notify(); 21 ~CPWL_List_Notify() override;
22 22
23 // IFX_List_Notify
23 void IOnSetScrollInfoX(FX_FLOAT fPlateMin, 24 void IOnSetScrollInfoX(FX_FLOAT fPlateMin,
24 FX_FLOAT fPlateMax, 25 FX_FLOAT fPlateMax,
25 FX_FLOAT fContentMin, 26 FX_FLOAT fContentMin,
26 FX_FLOAT fContentMax, 27 FX_FLOAT fContentMax,
27 FX_FLOAT fSmallStep, 28 FX_FLOAT fSmallStep,
28 FX_FLOAT fBigStep) {} 29 FX_FLOAT fBigStep) override {}
29 void IOnSetScrollInfoY(FX_FLOAT fPlateMin, 30 void IOnSetScrollInfoY(FX_FLOAT fPlateMin,
30 FX_FLOAT fPlateMax, 31 FX_FLOAT fPlateMax,
31 FX_FLOAT fContentMin, 32 FX_FLOAT fContentMin,
32 FX_FLOAT fContentMax, 33 FX_FLOAT fContentMax,
33 FX_FLOAT fSmallStep, 34 FX_FLOAT fSmallStep,
34 FX_FLOAT fBigStep); 35 FX_FLOAT fBigStep) override;
35 void IOnSetScrollPosX(FX_FLOAT fx) {} 36 void IOnSetScrollPosX(FX_FLOAT fx) override {}
36 void IOnSetScrollPosY(FX_FLOAT fy); 37 void IOnSetScrollPosY(FX_FLOAT fy) override;
38 void IOnInvalidateRect(CPDF_Rect* pRect) override;
39
37 void IOnSetCaret(FX_BOOL bVisible, 40 void IOnSetCaret(FX_BOOL bVisible,
38 const CPDF_Point& ptHead, 41 const CPDF_Point& ptHead,
39 const CPDF_Point& ptFoot, 42 const CPDF_Point& ptFoot,
40 const CPVT_WordPlace& place); 43 const CPVT_WordPlace& place);
41 void IOnCaretChange(const CPVT_SecProps& secProps, 44 void IOnCaretChange(const CPVT_SecProps& secProps,
42 const CPVT_WordProps& wordProps); 45 const CPVT_WordProps& wordProps);
43 void IOnInvalidateRect(CPDF_Rect* pRect);
44 46
45 private: 47 private:
46 CPWL_ListBox* m_pList; 48 CPWL_ListBox* m_pList;
47 }; 49 };
48 50
49 class CPWL_ListBox : public CPWL_Wnd { 51 class CPWL_ListBox : public CPWL_Wnd {
50 public: 52 public:
51 CPWL_ListBox(); 53 CPWL_ListBox();
52 virtual ~CPWL_ListBox(); 54 ~CPWL_ListBox() override;
53 55
54 virtual CFX_ByteString GetClassName() const; 56 // CPWL_Wnd
55 virtual void OnCreated(); 57 CFX_ByteString GetClassName() const override;
56 virtual void OnDestroy(); 58 void OnCreated() override;
57 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); 59 void OnDestroy() override;
58 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, 60 void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
59 CPDF_Matrix* pUser2Device); 61 void DrawThisAppearance(CFX_RenderDevice* pDevice,
62 CPDF_Matrix* pUser2Device) override;
63 FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
64 FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
65 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
66 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
67 FX_BOOL OnMouseMove(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 void KillFocus() override;
72 void OnNotify(CPWL_Wnd* pWnd,
73 FX_DWORD msg,
74 intptr_t wParam = 0,
75 intptr_t lParam = 0) override;
76 void RePosChildWnd() override;
77 CPDF_Rect GetFocusRect() const override;
78 void SetFontSize(FX_FLOAT fFontSize) override;
79 FX_FLOAT GetFontSize() const override;
60 80
61 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
62 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
63 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
64 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
65 virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag);
66 virtual FX_BOOL OnMouseWheel(short zDelta,
67 const CPDF_Point& point,
68 FX_DWORD nFlag);
69 virtual void KillFocus();
70
71 virtual void OnNotify(CPWL_Wnd* pWnd,
72 FX_DWORD msg,
73 intptr_t wParam = 0,
74 intptr_t lParam = 0);
75 virtual void RePosChildWnd();
76 virtual CFX_WideString GetText() const; 81 virtual CFX_WideString GetText() const;
77 virtual CPDF_Rect GetFocusRect() const;
78 virtual void SetFontSize(FX_FLOAT fFontSize);
79 virtual FX_FLOAT GetFontSize() const;
80 82
81 void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, FX_DWORD nFlag); 83 void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, FX_DWORD nFlag);
82 84
83 void AddString(const FX_WCHAR* string); 85 void AddString(const FX_WCHAR* string);
84 void SetTopVisibleIndex(int32_t nItemIndex); 86 void SetTopVisibleIndex(int32_t nItemIndex);
85 void ScrollToListItem(int32_t nItemIndex); 87 void ScrollToListItem(int32_t nItemIndex);
86 void ResetContent(); 88 void ResetContent();
87 void Reset(); 89 void Reset();
88 void Select(int32_t nItemIndex); 90 void Select(int32_t nItemIndex);
89 void SetCaret(int32_t nItemIndex); 91 void SetCaret(int32_t nItemIndex);
(...skipping 22 matching lines...) Expand all
112 IPWL_Filler_Notify* m_pFillerNotify; 114 IPWL_Filler_Notify* m_pFillerNotify;
113 115
114 public: 116 public:
115 void AttachFFLData(void* pData) { m_pFormFiller = pData; } 117 void AttachFFLData(void* pData) { m_pFormFiller = pData; }
116 118
117 private: 119 private:
118 void* m_pFormFiller; 120 void* m_pFormFiller;
119 }; 121 };
120 122
121 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_LISTBOX_H_ 123 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_LISTBOX_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Label.h ('k') | fpdfsdk/include/pdfwindow/PWL_ListCtrl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698