summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_caret.cpp2
-rw-r--r--fpdfsdk/pdfwindow/cpwl_caret.h9
-rw-r--r--fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp22
-rw-r--r--fpdfsdk/pdfwindow/cpwl_edit_ctrl.h4
-rw-r--r--fpdfsdk/pdfwindow/cpwl_wnd.h1
5 files changed, 1 insertions, 37 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_caret.cpp b/fpdfsdk/pdfwindow/cpwl_caret.cpp
index a6a165f9a0..0d63622852 100644
--- a/fpdfsdk/pdfwindow/cpwl_caret.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_caret.cpp
@@ -16,8 +16,6 @@
#define PWL_CARET_FLASHINTERVAL 500
-PWL_CARET_INFO::PWL_CARET_INFO() : bVisible(false) {}
-
CPWL_Caret::CPWL_Caret() : m_bFlash(false), m_fWidth(0.4f), m_nDelay(0) {}
CPWL_Caret::~CPWL_Caret() {}
diff --git a/fpdfsdk/pdfwindow/cpwl_caret.h b/fpdfsdk/pdfwindow/cpwl_caret.h
index 7c723b96b3..0d9c1cdfd1 100644
--- a/fpdfsdk/pdfwindow/cpwl_caret.h
+++ b/fpdfsdk/pdfwindow/cpwl_caret.h
@@ -9,15 +9,6 @@
#include "fpdfsdk/pdfwindow/cpwl_wnd.h"
-struct PWL_CARET_INFO {
- public:
- PWL_CARET_INFO();
-
- bool bVisible;
- CFX_PointF ptHead;
- CFX_PointF ptFoot;
-};
-
class CPWL_Caret : public CPWL_Wnd {
public:
CPWL_Caret();
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
index 2c005a4335..59879bb274 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
@@ -78,21 +78,6 @@ void CPWL_EditCtrl::ScrollWindowVertically(float pos) {
m_pEdit->SetScrollPos(CFX_PointF(m_pEdit->GetScrollPos().x, pos));
}
-void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd,
- uint32_t msg,
- intptr_t wParam,
- intptr_t lParam) {
- CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
-
- switch (msg) {
- case PNM_SETCARETINFO: {
- if (PWL_CARET_INFO* pCaretInfo = (PWL_CARET_INFO*)wParam) {
- SetCaret(pCaretInfo->bVisible, pCaretInfo->ptHead, pCaretInfo->ptFoot);
- }
- } break;
- }
-}
-
void CPWL_EditCtrl::CreateChildWnd(const PWL_CREATEPARAM& cp) {
if (!IsReadOnly())
CreateEditCaret(cp);
@@ -452,12 +437,7 @@ void CPWL_EditCtrl::IOnSetCaret(bool bVisible,
const CFX_PointF& ptHead,
const CFX_PointF& ptFoot,
const CPVT_WordPlace& place) {
- PWL_CARET_INFO cInfo;
- cInfo.bVisible = bVisible;
- cInfo.ptHead = ptHead;
- cInfo.ptFoot = ptFoot;
-
- OnNotify(this, PNM_SETCARETINFO, (intptr_t)&cInfo, (intptr_t) nullptr);
+ SetCaret(bVisible, ptHead, ptFoot);
}
void CPWL_EditCtrl::IOnInvalidateRect(CFX_FloatRect* pRect) {
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h
index f72a7b2043..f81def6464 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h
+++ b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h
@@ -52,10 +52,6 @@ class CPWL_EditCtrl : public CPWL_Wnd {
bool OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) override;
bool OnLButtonUp(const CFX_PointF& point, uint32_t nFlag) override;
bool OnMouseMove(const CFX_PointF& point, uint32_t nFlag) override;
- void OnNotify(CPWL_Wnd* pWnd,
- uint32_t msg,
- intptr_t wParam = 0,
- intptr_t lParam = 0) override;
void SetScrollInfo(const PWL_SCROLL_INFO& info) override;
void SetScrollPosition(float pos) override;
void ScrollWindowVertically(float pos) override;
diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.h b/fpdfsdk/pdfwindow/cpwl_wnd.h
index ab4cf7ae77..4f378a419b 100644
--- a/fpdfsdk/pdfwindow/cpwl_wnd.h
+++ b/fpdfsdk/pdfwindow/cpwl_wnd.h
@@ -77,7 +77,6 @@ struct PWL_SCROLL_INFO;
#define PNM_LBUTTONDOWN 5
#define PNM_LBUTTONUP 6
#define PNM_MOUSEMOVE 7
-#define PNM_SETCARETINFO 8
#define PWL_CLASSNAME_EDIT "CPWL_Edit"