summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/pdfwindow
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 22:16:22 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 22:16:22 -0700
commit2b1a2d528469cda4e9f3e36d3c7a649e0d476480 (patch)
tree91eea8ae70b87c632a06fba52ea06c0842e30878 /fpdfsdk/include/pdfwindow
parent62b2e912dc2a508972fbf01b25f7449c39ff1543 (diff)
downloadpdfium-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')
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Button.h11
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Caret.h20
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h79
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h82
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h111
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h34
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Icon.h9
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_IconList.h59
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Label.h20
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h68
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListCtrl.h9
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h226
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ScrollBar.h60
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Signature.h26
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_SpecialButton.h25
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h6
16 files changed, 407 insertions, 438 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_Button.h b/fpdfsdk/include/pdfwindow/PWL_Button.h
index 363556762f..28a026c3bf 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Button.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Button.h
@@ -12,12 +12,13 @@
class CPWL_Button : public CPWL_Wnd {
public:
CPWL_Button();
- virtual ~CPWL_Button();
+ ~CPWL_Button() override;
- virtual CFX_ByteString GetClassName() const;
- virtual void OnCreate(PWL_CREATEPARAM& cp);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void OnCreate(PWL_CREATEPARAM& cp) override;
+ FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
protected:
FX_BOOL m_bMouseDown;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Caret.h b/fpdfsdk/include/pdfwindow/PWL_Caret.h
index 7e61eeb66e..0fe4e89c2e 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Caret.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Caret.h
@@ -21,15 +21,17 @@ struct PWL_CARET_INFO {
class CPWL_Caret : public CPWL_Wnd {
public:
CPWL_Caret();
- virtual ~CPWL_Caret();
-
- virtual CFX_ByteString GetClassName() const;
- virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
- virtual void InvalidateRect(CPDF_Rect* pRect = NULL);
- virtual void SetVisible(FX_BOOL bVisible) {}
- virtual void TimerProc();
+ ~CPWL_Caret() override;
+
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ void InvalidateRect(CPDF_Rect* pRect = NULL) override;
+ void SetVisible(FX_BOOL bVisible) override {}
+ void TimerProc() override;
+
void SetCaret(FX_BOOL bVisible,
const CPDF_Point& ptHead,
const CPDF_Point& ptFoot);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index 98ae7ca986..e29752326c 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -13,17 +13,17 @@
class CPWL_CBEdit : public CPWL_Edit {
public:
- CPWL_CBEdit(){};
- virtual ~CPWL_CBEdit(){};
+ CPWL_CBEdit() {}
+ ~CPWL_CBEdit() override {}
};
class CPWL_CBListBox : public CPWL_ListBox {
public:
- CPWL_CBListBox(){};
- virtual ~CPWL_CBListBox(){};
+ CPWL_CBListBox() {}
+ ~CPWL_CBListBox() override {}
- public:
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
+ // CPWL_ListBox
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
FX_BOOL OnKeyDownWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag);
FX_BOOL OnCharWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag);
@@ -33,46 +33,40 @@ class CPWL_CBListBox : public CPWL_ListBox {
class CPWL_CBButton : public CPWL_Wnd {
public:
- CPWL_CBButton(){};
- virtual ~CPWL_CBButton(){};
-
- public:
- 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 OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
+ CPWL_CBButton() {}
+ ~CPWL_CBButton() override {}
+
+ // CPWL_Wnd
+ 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 OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
};
class CPWL_ComboBox : public CPWL_Wnd {
public:
CPWL_ComboBox();
- operator CPWL_Edit*() { return m_pEdit; }
-
- public:
- virtual CFX_ByteString GetClassName() const;
- virtual void OnCreate(PWL_CREATEPARAM& cp);
-
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
-
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
-
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
- virtual void RePosChildWnd();
-
- virtual CPDF_Rect GetFocusRect() const;
+ ~CPWL_ComboBox() {}
- virtual void SetFocus();
- virtual void KillFocus();
+ operator CPWL_Edit*() { return m_pEdit; }
- FX_BOOL IsModified() const;
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void OnCreate(PWL_CREATEPARAM& cp) override;
+ FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void RePosChildWnd() override;
+ CPDF_Rect GetFocusRect() const override;
+ void SetFocus() override;
+ void KillFocus() override;
+ FX_BOOL IsModified() const override;
- public:
void SetFillerNotify(IPWL_Filler_Notify* pNotify);
CFX_WideString GetText() const;
@@ -90,28 +84,23 @@ class CPWL_ComboBox : public CPWL_Wnd {
void SetSelectText();
+ void AttachFFLData(void* pData) { m_pFormFiller = pData; }
+
private:
void CreateEdit(const PWL_CREATEPARAM& cp);
void CreateButton(const PWL_CREATEPARAM& cp);
void CreateListBox(const PWL_CREATEPARAM& cp);
-
void SetPopup(FX_BOOL bPopup);
- private:
CPWL_CBEdit* m_pEdit;
CPWL_CBButton* m_pButton;
CPWL_CBListBox* m_pList;
-
FX_BOOL m_bPopup;
CPDF_Rect m_rcOldWindow;
int32_t m_nPopupWhere;
int32_t m_nSelectItem;
IPWL_Filler_Notify* m_pFillerNotify;
- public:
- void AttachFFLData(void* pData) { m_pFormFiller = pData; }
-
- private:
void* m_pFormFiller;
};
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;
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
index 784ec61140..bd241a3a48 100644
--- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
@@ -57,37 +57,10 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify {
public:
CPWL_EditCtrl();
- virtual ~CPWL_EditCtrl();
-
- public:
- virtual void OnCreate(PWL_CREATEPARAM& cp);
- virtual void OnCreated();
-
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
-
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
- virtual void RePosChildWnd();
- virtual void SetFontSize(FX_FLOAT fFontSize);
- virtual FX_FLOAT GetFontSize() const;
-
- public:
- virtual void SetText(const FX_WCHAR* csText);
-
- virtual void CopyText();
- virtual void PasteText();
- virtual void CutText();
+ ~CPWL_EditCtrl() override;
CPDF_Rect GetContentRect() const;
void GetCaretPos(int32_t& x, int32_t& y) const;
- FX_BOOL IsModified() const;
CFX_WideString GetText() const;
void SetSel(int32_t nStartChar, int32_t nEndChar);
@@ -127,20 +100,64 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify {
void SetReadyToInput();
- protected:
- virtual void ShowVScrollBar(FX_BOOL bShow);
+ // CPWL_Wnd
+ void OnCreate(PWL_CREATEPARAM& cp) override;
+ void OnCreated() override;
+ FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void RePosChildWnd() override;
+ void SetFontSize(FX_FLOAT fFontSize) override;
+ FX_FLOAT GetFontSize() const override;
+ void SetCursor() override;
+ FX_BOOL IsModified() const override;
- virtual void InsertWord(FX_WORD word, int32_t nCharset);
- virtual void InsertReturn();
- virtual void InsertText(const FX_WCHAR* csText);
+ protected:
+ // IFX_Edit_Notify
+ void IOnSetScrollInfoX(FX_FLOAT fPlateMin,
+ FX_FLOAT fPlateMax,
+ FX_FLOAT fContentMin,
+ FX_FLOAT fContentMax,
+ FX_FLOAT fSmallStep,
+ FX_FLOAT fBigStep) override {}
+ void IOnSetScrollInfoY(FX_FLOAT fPlateMin,
+ FX_FLOAT fPlateMax,
+ FX_FLOAT fContentMin,
+ FX_FLOAT fContentMax,
+ FX_FLOAT fSmallStep,
+ FX_FLOAT fBigStep) override;
+ void IOnSetScrollPosX(FX_FLOAT fx) override {}
+ void IOnSetScrollPosY(FX_FLOAT fy) override;
+ void IOnSetCaret(FX_BOOL bVisible,
+ const CPDF_Point& ptHead,
+ const CPDF_Point& ptFoot,
+ const CPVT_WordPlace& place) override;
+ void IOnCaretChange(const CPVT_SecProps& secProps,
+ const CPVT_WordProps& wordProps) override;
+ void IOnContentChange(const CPDF_Rect& rcContent) override;
+ void IOnInvalidateRect(CPDF_Rect* pRect) override;
+
+ void InsertText(const FX_WCHAR* csText);
+ void SetText(const FX_WCHAR* csText);
+ void CopyText();
+ void PasteText();
+ void CutText();
+ void ShowVScrollBar(FX_BOOL bShow);
+ void InsertWord(FX_WORD word, int32_t nCharset);
+ void InsertReturn();
- virtual void SetCursor();
FX_BOOL IsWndHorV();
void Delete();
void Backspace();
- protected:
void GetCaretInfo(CPDF_Point& ptHead, CPDF_Point& ptFoot) const;
void SetCaret(FX_BOOL bVisible,
const CPDF_Point& ptHead,
@@ -148,30 +165,6 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify {
void SetEditCaret(FX_BOOL bVisible);
- protected:
- virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin,
- FX_FLOAT fPlateMax,
- FX_FLOAT fContentMin,
- FX_FLOAT fContentMax,
- FX_FLOAT fSmallStep,
- FX_FLOAT fBigStep) {}
- virtual void IOnSetScrollInfoY(FX_FLOAT fPlateMin,
- FX_FLOAT fPlateMax,
- FX_FLOAT fContentMin,
- FX_FLOAT fContentMax,
- FX_FLOAT fSmallStep,
- FX_FLOAT fBigStep);
- virtual void IOnSetScrollPosX(FX_FLOAT fx) {}
- virtual void IOnSetScrollPosY(FX_FLOAT fy);
- virtual void IOnSetCaret(FX_BOOL bVisible,
- const CPDF_Point& ptHead,
- const CPDF_Point& ptFoot,
- const CPVT_WordPlace& place);
- virtual void IOnCaretChange(const CPVT_SecProps& secProps,
- const CPVT_WordProps& wordProps);
- virtual void IOnContentChange(const CPDF_Rect& rcContent);
- virtual void IOnInvalidateRect(CPDF_Rect* pRect);
-
private:
void CreateEditCaret(const PWL_CREATEPARAM& cp);
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index 0f5124ca02..f91d7e823f 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -51,24 +51,20 @@ struct CPWL_FontMap_Native {
class CPWL_FontMap : public IFX_Edit_FontMap {
public:
CPWL_FontMap(IFX_SystemHandler* pSystemHandler);
- virtual ~CPWL_FontMap();
+ ~CPWL_FontMap() override;
- virtual CPDF_Font* GetPDFFont(int32_t nFontIndex);
- virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex);
- virtual int32_t GetWordFontIndex(FX_WORD word,
- int32_t nCharset,
- int32_t nFontIndex);
- virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word);
- virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
+ // IFX_Edit_FontMap
+ CPDF_Font* GetPDFFont(int32_t nFontIndex) override;
+ CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) override;
+ int32_t GetWordFontIndex(FX_WORD word,
+ int32_t nCharset,
+ int32_t nFontIndex) override;
+ int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) override;
+ int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) override;
- public:
- virtual void Initial(const FX_CHAR* fontname = NULL);
void SetSystemHandler(IFX_SystemHandler* pSystemHandler);
-
int32_t GetFontMapCount() const;
const CPWL_FontMap_Data* GetFontMapData(int32_t nIndex) const;
-
- public:
static int32_t GetNativeCharset();
CFX_ByteString GetNativeFontName(int32_t nCharset);
@@ -84,12 +80,12 @@ class CPWL_FontMap : public IFX_Edit_FontMap {
uint8_t nCharset);
protected:
- virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias,
- int32_t nCharset);
- virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
- FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
+ void Initial(const FX_CHAR* fontname = NULL);
+ CPDF_Document* GetDocument();
+ CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset);
+ void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
- virtual CPDF_Document* GetDocument();
+ FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
void Empty();
int32_t GetFontIndex(const CFX_ByteString& sFontName,
@@ -128,7 +124,7 @@ class CPWL_DocFontMap : public CPWL_FontMap {
public:
CPWL_DocFontMap(IFX_SystemHandler* pSystemHandler,
CPDF_Document* pAttachedDoc);
- virtual ~CPWL_DocFontMap();
+ ~CPWL_DocFontMap() override;
virtual CPDF_Document* GetDocument();
diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h
index 7183f0245c..95157cad1f 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Icon.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h
@@ -13,7 +13,7 @@
class CPWL_Image : public CPWL_Wnd {
public:
CPWL_Image();
- virtual ~CPWL_Image();
+ ~CPWL_Image() override;
virtual CFX_ByteString GetImageAppStream();
@@ -36,12 +36,13 @@ class CPWL_Image : public CPWL_Wnd {
class CPWL_Icon : public CPWL_Image {
public:
CPWL_Icon();
- virtual ~CPWL_Icon();
+ ~CPWL_Icon() override;
virtual CPDF_IconFit* GetIconFit() { return m_pIconFit; };
- virtual void GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale);
- virtual void GetImageOffset(FX_FLOAT& x, FX_FLOAT& y);
+ // CPWL_Image
+ void GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) override;
+ void GetImageOffset(FX_FLOAT& x, FX_FLOAT& y) override;
int32_t GetScaleMethod();
FX_BOOL IsProportionalScale();
diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h
index 30a12dcd9b..9ffb5ee8f5 100644
--- a/fpdfsdk/include/pdfwindow/PWL_IconList.h
+++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h
@@ -26,11 +26,7 @@ class IPWL_IconList_Notify {
class CPWL_IconList_Item : public CPWL_Wnd {
public:
CPWL_IconList_Item();
- virtual ~CPWL_IconList_Item();
-
- virtual CFX_ByteString GetClassName() const;
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
- virtual void RePosChildWnd();
+ ~CPWL_IconList_Item() override;
void SetSelect(FX_BOOL bSelected);
FX_BOOL IsSelected() const;
@@ -41,12 +37,15 @@ class CPWL_IconList_Item : public CPWL_Wnd {
CFX_WideString GetText() const;
protected:
- virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth);
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
-
- virtual void OnEnabled();
- virtual void OnDisabled();
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void RePosChildWnd() override;
+ FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override;
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ void OnEnabled() override;
+ void OnDisabled() override;
private:
int32_t m_nIconIndex;
@@ -59,7 +58,7 @@ class CPWL_IconList_Item : public CPWL_Wnd {
class CPWL_IconList_Content : public CPWL_ListCtrl {
public:
CPWL_IconList_Content(int32_t nListCount);
- virtual ~CPWL_IconList_Content();
+ ~CPWL_IconList_Content() override;
void SetSelect(int32_t nIndex);
int32_t GetSelect() const;
@@ -74,11 +73,12 @@ class CPWL_IconList_Content : public CPWL_ListCtrl {
void ScrollToItem(int32_t nItemIndex);
protected:
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ // CPWL_ListCtrl
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
private:
CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const;
@@ -95,11 +95,7 @@ class CPWL_IconList_Content : public CPWL_ListCtrl {
class CPWL_IconList : public CPWL_Wnd {
public:
CPWL_IconList(int32_t nListCount);
- virtual ~CPWL_IconList();
-
- virtual FX_BOOL OnMouseWheel(short zDelta,
- const CPDF_Point& point,
- FX_DWORD nFlag);
+ ~CPWL_IconList() override;
void SetSelect(int32_t nIndex);
void SetTopItem(int32_t nIndex);
@@ -113,14 +109,17 @@ class CPWL_IconList : public CPWL_Wnd {
CFX_WideString GetListString(int32_t nItemIndex) const;
protected:
- virtual void OnCreated();
- virtual void RePosChildWnd();
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
-
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
+ // CPWL_Wnd
+ FX_BOOL OnMouseWheel(short zDelta,
+ const CPDF_Point& point,
+ FX_DWORD nFlag) override;
+ void OnCreated() override;
+ void RePosChildWnd() override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
private:
CPWL_IconList_Content* m_pListContent;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Label.h b/fpdfsdk/include/pdfwindow/PWL_Label.h
index b6cb7f557c..0504bb3e0b 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Label.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Label.h
@@ -14,11 +14,7 @@ class IFX_Edit;
class CPWL_Label : public CPWL_Wnd {
public:
CPWL_Label();
- virtual ~CPWL_Label();
-
- virtual CFX_ByteString GetClassName() const;
- virtual void SetFontSize(FX_FLOAT fFontSize);
- virtual FX_FLOAT GetFontSize() const;
+ ~CPWL_Label() override;
void SetText(const FX_WCHAR* csText);
CFX_WideString GetText() const;
@@ -30,11 +26,15 @@ class CPWL_Label : public CPWL_Wnd {
CFX_ByteString GetTextAppearanceStream(const CPDF_Point& ptOffset) const;
protected:
- virtual void OnCreated();
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
- virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
- virtual void RePosChildWnd();
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void SetFontSize(FX_FLOAT fFontSize) override;
+ FX_FLOAT GetFontSize() const override;
+ void OnCreated() override;
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
+ void RePosChildWnd() override;
private:
void SetParamByFlag();
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index b9372eff9c..942a568836 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -18,29 +18,31 @@ class IPWL_Filler_Notify;
class CPWL_List_Notify : public IFX_List_Notify {
public:
CPWL_List_Notify(CPWL_ListBox* pList);
- virtual ~CPWL_List_Notify();
+ ~CPWL_List_Notify() override;
+ // IFX_List_Notify
void IOnSetScrollInfoX(FX_FLOAT fPlateMin,
FX_FLOAT fPlateMax,
FX_FLOAT fContentMin,
FX_FLOAT fContentMax,
FX_FLOAT fSmallStep,
- FX_FLOAT fBigStep) {}
+ FX_FLOAT fBigStep) override {}
void IOnSetScrollInfoY(FX_FLOAT fPlateMin,
FX_FLOAT fPlateMax,
FX_FLOAT fContentMin,
FX_FLOAT fContentMax,
FX_FLOAT fSmallStep,
- FX_FLOAT fBigStep);
- void IOnSetScrollPosX(FX_FLOAT fx) {}
- void IOnSetScrollPosY(FX_FLOAT fy);
+ FX_FLOAT fBigStep) override;
+ void IOnSetScrollPosX(FX_FLOAT fx) override {}
+ void IOnSetScrollPosY(FX_FLOAT fy) override;
+ void IOnInvalidateRect(CPDF_Rect* pRect) override;
+
void IOnSetCaret(FX_BOOL bVisible,
const CPDF_Point& ptHead,
const CPDF_Point& ptFoot,
const CPVT_WordPlace& place);
void IOnCaretChange(const CPVT_SecProps& secProps,
const CPVT_WordProps& wordProps);
- void IOnInvalidateRect(CPDF_Rect* pRect);
private:
CPWL_ListBox* m_pList;
@@ -49,34 +51,34 @@ class CPWL_List_Notify : public IFX_List_Notify {
class CPWL_ListBox : public CPWL_Wnd {
public:
CPWL_ListBox();
- virtual ~CPWL_ListBox();
-
- virtual CFX_ByteString GetClassName() const;
- virtual void OnCreated();
- virtual void OnDestroy();
- virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
-
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseWheel(short zDelta,
- const CPDF_Point& point,
- FX_DWORD nFlag);
- virtual void KillFocus();
-
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
- virtual void RePosChildWnd();
+ ~CPWL_ListBox() override;
+
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void OnCreated() override;
+ void OnDestroy() override;
+ void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnMouseWheel(short zDelta,
+ const CPDF_Point& point,
+ FX_DWORD nFlag) override;
+ void KillFocus() override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
+ void RePosChildWnd() override;
+ CPDF_Rect GetFocusRect() const override;
+ void SetFontSize(FX_FLOAT fFontSize) override;
+ FX_FLOAT GetFontSize() const override;
+
virtual CFX_WideString GetText() const;
- virtual CPDF_Rect GetFocusRect() const;
- virtual void SetFontSize(FX_FLOAT fFontSize);
- virtual FX_FLOAT GetFontSize() const;
void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, FX_DWORD nFlag);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
index cd90692150..dbaffc5b58 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
@@ -12,7 +12,7 @@
class CPWL_ListCtrl : public CPWL_Wnd {
public:
CPWL_ListCtrl();
- virtual ~CPWL_ListCtrl();
+ ~CPWL_ListCtrl() override;
void SetScrollPos(const CPDF_Point& point);
CPDF_Point GetScrollPos() const;
@@ -30,9 +30,10 @@ class CPWL_ListCtrl : public CPWL_Wnd {
CPDF_Rect OutToIn(const CPDF_Rect& rect) const;
protected:
- virtual void RePosChildWnd();
- virtual void DrawChildAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
+ // CPWL_Wnd
+ void RePosChildWnd() override;
+ void DrawChildAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
private:
void ResetAll(FX_BOOL bMove, int32_t nStart);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index 4f18fa20d0..b25d989ec7 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -82,14 +82,14 @@ class IPWL_NoteItem {
class CPWL_Note_Icon : public CPWL_Wnd {
public:
CPWL_Note_Icon();
- virtual ~CPWL_Note_Icon();
+ ~CPWL_Note_Icon() override;
void SetIconType(int32_t nType);
- public:
protected:
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
+ // CPWL_Wnd
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
private:
int32_t m_nType;
@@ -98,13 +98,14 @@ class CPWL_Note_Icon : public CPWL_Wnd {
class CPWL_Note_CloseBox : public CPWL_Button {
public:
CPWL_Note_CloseBox();
- virtual ~CPWL_Note_CloseBox();
+ ~CPWL_Note_CloseBox() override;
protected:
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
+ // CPWL_Button
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
private:
FX_BOOL m_bMouseDown;
@@ -113,43 +114,44 @@ class CPWL_Note_CloseBox : public CPWL_Button {
class CPWL_Note_LBBox : public CPWL_Wnd {
public:
CPWL_Note_LBBox();
- virtual ~CPWL_Note_LBBox();
+ ~CPWL_Note_LBBox() override;
protected:
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
+ // CPWL_Wnd
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
};
class CPWL_Note_RBBox : public CPWL_Wnd {
public:
CPWL_Note_RBBox();
- virtual ~CPWL_Note_RBBox();
+ ~CPWL_Note_RBBox() override;
protected:
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
+ // CPWL_Wnd
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
};
class CPWL_Note_Edit : public CPWL_Edit {
public:
CPWL_Note_Edit();
- virtual ~CPWL_Note_Edit();
+ ~CPWL_Note_Edit() override;
void EnableNotify(FX_BOOL bEnable) { m_bEnableNotify = bEnable; }
- virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth);
- FX_FLOAT GetItemLeftMargin();
- FX_FLOAT GetItemRightMargin();
-
- virtual void SetText(const FX_WCHAR* csText);
- protected:
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
- virtual void RePosChildWnd();
- virtual void OnSetFocus();
- virtual void OnKillFocus();
+ // CPWL_Edit
+ FX_FLOAT GetItemLeftMargin() override;
+ FX_FLOAT GetItemRightMargin() override;
+ FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override;
+ void SetText(const FX_WCHAR* csText) override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
+ void RePosChildWnd() override;
+ void OnSetFocus() override;
+ void OnKillFocus() override;
private:
FX_BOOL m_bEnableNotify;
@@ -162,17 +164,17 @@ class CPWL_Note_Edit : public CPWL_Edit {
class CPWL_Note_Options : public CPWL_Wnd {
public:
CPWL_Note_Options();
- virtual ~CPWL_Note_Options();
+ ~CPWL_Note_Options() override;
CPDF_Rect GetContentRect() const;
- virtual void SetTextColor(const CPWL_Color& color);
void SetText(const CFX_WideString& sText);
- protected:
- virtual void RePosChildWnd();
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
+ // CPWL_Wnd
+ void RePosChildWnd() override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ void SetTextColor(const CPWL_Color& color) override;
private:
CPWL_Label* m_pText;
@@ -181,19 +183,11 @@ class CPWL_Note_Options : public CPWL_Wnd {
class CPWL_Note_Contents : public CPWL_ListCtrl {
public:
CPWL_Note_Contents();
- virtual ~CPWL_Note_Contents();
-
- virtual CFX_ByteString GetClassName() const;
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
+ ~CPWL_Note_Contents() override;
void SetEditFocus(FX_BOOL bLast);
CPWL_Edit* GetEdit() const;
- public:
void SetText(const CFX_WideString& sText);
CFX_WideString GetText() const;
@@ -206,8 +200,14 @@ class CPWL_Note_Contents : public CPWL_ListCtrl {
void EnableRead(FX_BOOL bEnabled);
void EnableModify(FX_BOOL bEnabled);
- protected:
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
+ // CPWL_ListCtrl
+ CFX_ByteString GetClassName() const override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
+ FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
private:
CPWL_Note_Edit* m_pEdit;
@@ -216,65 +216,60 @@ class CPWL_Note_Contents : public CPWL_ListCtrl {
class CPWL_NoteItem : public CPWL_Wnd, public IPWL_NoteItem {
public:
CPWL_NoteItem();
- virtual ~CPWL_NoteItem();
-
- public:
- virtual void SetPrivateData(void* pData);
- virtual void SetBkColor(const CPWL_Color& color);
- virtual void SetSubjectName(const CFX_WideString& sName);
- virtual void SetAuthorName(const CFX_WideString& sName);
- virtual void SetDateTime(FX_SYSTEMTIME time);
- virtual void SetContents(const CFX_WideString& sContents);
-
- virtual IPWL_NoteItem* CreateSubItem();
- virtual int32_t CountSubItems() const;
- virtual IPWL_NoteItem* GetSubItems(int32_t index) const;
- virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem);
- virtual void SetFocus() { SetNoteFocus(FALSE); }
-
- virtual IPWL_NoteItem* GetParentItem() const;
- virtual void* GetPrivateData() const;
- virtual CFX_WideString GetAuthorName() const;
- virtual CPWL_Color GetBkColor() const;
- virtual CFX_WideString GetContents() const;
- virtual FX_SYSTEMTIME GetDateTime() const;
- virtual CFX_WideString GetSubjectName() const;
- virtual FX_BOOL IsTopItem() const { return FALSE; }
- virtual CPWL_Edit* GetEdit() const;
+ ~CPWL_NoteItem() override;
- public:
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual CFX_ByteString GetClassName() const;
virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point);
virtual IPWL_NoteItem* GetFocusedNoteItem() const;
+ virtual FX_BOOL IsTopItem() const { return FALSE; }
+
virtual void ResetSubjectName(int32_t nItemIndex);
void EnableRead(FX_BOOL bEnabled);
void EnableModify(FX_BOOL bEnabled);
- protected:
- virtual void RePosChildWnd();
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
+ void OnContentsValidate();
+ void OnCreateNoteItem();
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
+ // IPWL_NoteItem
+ void SetPrivateData(void* pData) override;
+ void SetBkColor(const CPWL_Color& color) override;
+ void SetSubjectName(const CFX_WideString& sName) override;
+ void SetAuthorName(const CFX_WideString& sName) override;
+ void SetDateTime(FX_SYSTEMTIME time) override;
+ void SetContents(const CFX_WideString& sContents) override;
+ IPWL_NoteItem* CreateSubItem() override;
+ int32_t CountSubItems() const override;
+ IPWL_NoteItem* GetSubItems(int32_t index) const override;
+ void DeleteSubItem(IPWL_NoteItem* pNoteItem) override;
+ void SetFocus() override { SetNoteFocus(FALSE); }
+ IPWL_NoteItem* GetParentItem() const override;
+ void* GetPrivateData() const override;
+ CFX_WideString GetAuthorName() const override;
+ CPWL_Color GetBkColor() const override;
+ CFX_WideString GetContents() const override;
+ FX_SYSTEMTIME GetDateTime() const override;
+ CFX_WideString GetSubjectName() const override;
+ CPWL_Edit* GetEdit() const override;
+
+ protected:
+ // CPWL_Wnd
+ FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ CFX_ByteString GetClassName() const override;
+ void RePosChildWnd() override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
+ FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override;
+ FX_FLOAT GetItemLeftMargin() override;
+ FX_FLOAT GetItemRightMargin() override;
- public:
- virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth);
- virtual FX_FLOAT GetItemLeftMargin();
- virtual FX_FLOAT GetItemRightMargin();
CPWL_NoteItem* CreateNoteItem();
CPWL_NoteItem* GetParentNoteItem() const;
void SetNoteFocus(FX_BOOL bLast);
- void OnContentsValidate();
-
- void OnCreateNoteItem();
-
- protected:
void PopupNoteItemMenu(const CPDF_Point& point);
virtual const CPWL_Note* GetNote() const;
@@ -300,19 +295,8 @@ class CPWL_Note : public CPWL_NoteItem {
CPWL_Note(IPopup_Note* pPopupNote,
IPWL_NoteNotify* pNoteNotify,
IPWL_NoteHandler* pNoteHandler);
- virtual ~CPWL_Note();
+ ~CPWL_Note() override;
- public:
- virtual void SetSubjectName(const CFX_WideString& sName);
- virtual void SetAuthorName(const CFX_WideString& sName);
- virtual CFX_WideString GetAuthorName() const;
- virtual void SetBkColor(const CPWL_Color& color);
- virtual void ResetSubjectName(int32_t nItemIndex) {}
- virtual FX_BOOL IsTopItem() const { return TRUE; }
- virtual const CPWL_Note* GetNote() const;
- virtual IPWL_NoteNotify* GetNoteNotify() const;
-
- public:
IPWL_NoteItem* Reply();
void EnableNotify(FX_BOOL bEnabled);
void SetIconType(int32_t nType);
@@ -329,22 +313,28 @@ class CPWL_Note : public CPWL_NoteItem {
CPDF_Rect GetCaptionRect() const { return m_rcCaption; }
IPopup_Note* GetPopupNote() const { return m_pPopupNote; }
- public:
- virtual FX_BOOL OnLButtonDown(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);
+ // CPWL_NoteItem
+ void SetSubjectName(const CFX_WideString& sName) override;
+ void SetAuthorName(const CFX_WideString& sName) override;
+ CFX_WideString GetAuthorName() const override;
+ void SetBkColor(const CPWL_Color& color) override;
+ void ResetSubjectName(int32_t nItemIndex) override {}
+ FX_BOOL IsTopItem() const override { return TRUE; }
+ const CPWL_Note* GetNote() const override;
+ IPWL_NoteNotify* GetNoteNotify() const override;
+ FX_BOOL OnLButtonDown(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;
+ void RePosChildWnd() override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
protected:
- virtual void RePosChildWnd();
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
-
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
-
FX_BOOL ResetScrollBar();
void RePosNoteChildren();
FX_BOOL ScrollBarShouldVisible();
diff --git a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
index a149a01416..ec1b78ed5e 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
@@ -35,17 +35,17 @@ class CPWL_SBButton : public CPWL_Wnd {
public:
CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,
PWL_SBBUTTON_TYPE eButtonType);
- virtual ~CPWL_SBButton();
-
- public:
- virtual CFX_ByteString GetClassName() const;
- virtual void OnCreate(PWL_CREATEPARAM& cp);
- 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 OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag);
+ ~CPWL_SBButton() override;
+
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void OnCreate(PWL_CREATEPARAM& cp) 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 OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) override;
protected:
PWL_SCROLLBAR_TYPE m_eScrollBarType;
@@ -92,24 +92,23 @@ struct PWL_SCROLL_PRIVATEDATA {
class CPWL_ScrollBar : public CPWL_Wnd {
public:
CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL);
- virtual ~CPWL_ScrollBar();
-
- public:
- virtual CFX_ByteString GetClassName() const;
- virtual void OnCreate(PWL_CREATEPARAM& cp);
- virtual void RePosChildWnd();
- 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 OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd,
- FX_DWORD msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0);
-
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
+ ~CPWL_ScrollBar() override;
+
+ // CPWL_Wnd
+ CFX_ByteString GetClassName() const override;
+ void OnCreate(PWL_CREATEPARAM& cp) override;
+ void RePosChildWnd() 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 OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ void OnNotify(CPWL_Wnd* pWnd,
+ FX_DWORD msg,
+ intptr_t wParam = 0,
+ intptr_t lParam = 0) override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void TimerProc() override;
FX_FLOAT GetScrollBarWidth() const;
PWL_SCROLLBAR_TYPE GetScrollBarType() const { return m_sbType; };
@@ -142,9 +141,6 @@ class CPWL_ScrollBar : public CPWL_Wnd {
FX_FLOAT TrueToFace(FX_FLOAT);
FX_FLOAT FaceToTrue(FX_FLOAT);
- virtual void TimerProc();
-
- private:
PWL_SCROLLBAR_TYPE m_sbType;
PWL_SCROLL_INFO m_OriginInfo;
CPWL_SBButton* m_pMinButton;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Signature.h b/fpdfsdk/include/pdfwindow/PWL_Signature.h
index c48d4e9708..009dd87592 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Signature.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Signature.h
@@ -16,17 +16,17 @@ class CPWL_Label;
class CPWL_Signature_Image : public CPWL_Image {
public:
CPWL_Signature_Image();
- virtual ~CPWL_Signature_Image();
+ ~CPWL_Signature_Image() override;
void SetImage(CFX_DIBSource* pImage);
CFX_DIBSource* GetImage();
protected:
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
- virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
-
- virtual void GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale);
+ // CPWL_Image
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
+ void GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) override;
private:
CFX_DIBSource* m_pImage;
@@ -35,7 +35,7 @@ class CPWL_Signature_Image : public CPWL_Image {
class CPWL_Signature : public CPWL_Wnd {
public:
CPWL_Signature();
- virtual ~CPWL_Signature();
+ ~CPWL_Signature() override;
void SetText(const FX_WCHAR* sText);
void SetDescription(const FX_WCHAR* string);
@@ -47,12 +47,12 @@ class CPWL_Signature : public CPWL_Wnd {
void SetFoxitFlag(FX_BOOL bFlagExist);
protected:
- virtual void RePosChildWnd();
- virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
-
- virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
- CPDF_Matrix* pUser2Device);
- virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
+ // CPWL_Wnd
+ void RePosChildWnd() override;
+ void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
+ void DrawThisAppearance(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device) override;
+ void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
private:
CPWL_Label* m_pText;
diff --git a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
index 8cfe819a67..a62d18d257 100644
--- a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
+++ b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
@@ -12,20 +12,22 @@
class CPWL_PushButton : public CPWL_Button {
public:
CPWL_PushButton();
- virtual ~CPWL_PushButton();
+ ~CPWL_PushButton() override;
- virtual CFX_ByteString GetClassName() const;
- virtual CPDF_Rect GetFocusRect() const;
+ // CPWL_Button
+ CFX_ByteString GetClassName() const override;
+ CPDF_Rect GetFocusRect() const override;
};
class CPWL_CheckBox : public CPWL_Button {
public:
CPWL_CheckBox();
- virtual ~CPWL_CheckBox();
+ ~CPWL_CheckBox() override;
- virtual CFX_ByteString GetClassName() const;
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ // CPWL_Button
+ CFX_ByteString GetClassName() const override;
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
void SetCheck(FX_BOOL bCheck);
FX_BOOL IsChecked() const;
@@ -37,11 +39,12 @@ class CPWL_CheckBox : public CPWL_Button {
class CPWL_RadioButton : public CPWL_Button {
public:
CPWL_RadioButton();
- virtual ~CPWL_RadioButton();
+ ~CPWL_RadioButton() override;
- virtual CFX_ByteString GetClassName() const;
- virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ // CPWL_Button
+ CFX_ByteString GetClassName() const override;
+ FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
void SetCheck(FX_BOOL bCheck);
FX_BOOL IsChecked() const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index e66c15e5e7..37af083835 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -284,7 +284,7 @@ class CPWL_Wnd : public CPWL_TimerHandler {
public:
CPWL_Wnd();
- virtual ~CPWL_Wnd();
+ ~CPWL_Wnd() override;
void Create(const PWL_CREATEPARAM& cp);
virtual CFX_ByteString GetClassName() const;
@@ -373,7 +373,6 @@ class CPWL_Wnd : public CPWL_TimerHandler {
IFX_Edit_FontMap* GetFontMap() const;
IPWL_Provider* GetProvider() const;
- virtual IFX_SystemHandler* GetSystemHandler() const;
IPWL_FocusHandler* GetFocusHandler() const;
int32_t GetTransparency();
@@ -399,6 +398,9 @@ class CPWL_Wnd : public CPWL_TimerHandler {
virtual void SetCursor();
protected:
+ // CPWL_TimerHandler
+ IFX_SystemHandler* GetSystemHandler() const override;
+
virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
virtual void RePosChildWnd();
void GetAppearanceStream(CFX_ByteTextBuf& sAppStream);