summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_EditCtrl.cpp')
-rw-r--r--fpdfsdk/pdfwindow/PWL_EditCtrl.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
index 90b7a3c7c0..64272e34c5 100644
--- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
@@ -40,8 +40,8 @@ void CPWL_EditCtrl::OnCreated() {
bool CPWL_EditCtrl::IsWndHorV() {
CFX_Matrix mt = GetWindowMatrix();
- CFX_FloatPoint point1(0, 1);
- CFX_FloatPoint point2(1, 1);
+ CFX_PointF point1(0, 1);
+ CFX_PointF point2(1, 1);
mt.TransformPoint(point1.x, point1.y);
mt.TransformPoint(point2.x, point2.y);
@@ -93,8 +93,7 @@ void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd,
FX_FLOAT fPos = *(FX_FLOAT*)lParam;
switch (wParam) {
case SBT_VSCROLL:
- m_pEdit->SetScrollPos(
- CFX_FloatPoint(m_pEdit->GetScrollPos().x, fPos));
+ m_pEdit->SetScrollPos(CFX_PointF(m_pEdit->GetScrollPos().x, fPos));
break;
}
} break;
@@ -281,7 +280,7 @@ bool CPWL_EditCtrl::OnChar(uint16_t nChar, uint32_t nFlag) {
return true;
}
-bool CPWL_EditCtrl::OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) {
+bool CPWL_EditCtrl::OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) {
CPWL_Wnd::OnLButtonDown(point, nFlag);
if (ClientHitTest(point)) {
@@ -297,7 +296,7 @@ bool CPWL_EditCtrl::OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) {
return true;
}
-bool CPWL_EditCtrl::OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) {
+bool CPWL_EditCtrl::OnLButtonUp(const CFX_PointF& point, uint32_t nFlag) {
CPWL_Wnd::OnLButtonUp(point, nFlag);
if (m_bMouseDown) {
@@ -312,7 +311,7 @@ bool CPWL_EditCtrl::OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) {
return true;
}
-bool CPWL_EditCtrl::OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) {
+bool CPWL_EditCtrl::OnMouseMove(const CFX_PointF& point, uint32_t nFlag) {
CPWL_Wnd::OnMouseMove(point, nFlag);
if (m_bMouseDown)
@@ -326,8 +325,8 @@ CFX_FloatRect CPWL_EditCtrl::GetContentRect() const {
}
void CPWL_EditCtrl::SetEditCaret(bool bVisible) {
- CFX_FloatPoint ptHead;
- CFX_FloatPoint ptFoot;
+ CFX_PointF ptHead;
+ CFX_PointF ptFoot;
if (bVisible)
GetCaretInfo(ptHead, ptFoot);
@@ -335,8 +334,7 @@ void CPWL_EditCtrl::SetEditCaret(bool bVisible) {
IOnSetCaret(bVisible, ptHead, ptFoot, wpTemp);
}
-void CPWL_EditCtrl::GetCaretInfo(CFX_FloatPoint& ptHead,
- CFX_FloatPoint& ptFoot) const {
+void CPWL_EditCtrl::GetCaretInfo(CFX_PointF& ptHead, CFX_PointF& ptFoot) const {
CFX_Edit_Iterator* pIterator = m_pEdit->GetIterator();
pIterator->SetAt(m_pEdit->GetCaret());
CPVT_Word word;
@@ -355,15 +353,15 @@ void CPWL_EditCtrl::GetCaretInfo(CFX_FloatPoint& ptHead,
}
void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const {
- CFX_FloatPoint ptHead;
- CFX_FloatPoint ptFoot;
+ CFX_PointF ptHead;
+ CFX_PointF ptFoot;
GetCaretInfo(ptHead, ptFoot);
PWLtoWnd(ptHead, x, y);
}
void CPWL_EditCtrl::SetCaret(bool bVisible,
- const CFX_FloatPoint& ptHead,
- const CFX_FloatPoint& ptFoot) {
+ const CFX_PointF& ptHead,
+ const CFX_PointF& ptFoot) {
if (m_pEditCaret) {
if (!IsFocused() || m_pEdit->IsSelected())
bVisible = false;
@@ -413,11 +411,11 @@ int32_t CPWL_EditCtrl::GetTotalWords() const {
return m_pEdit->GetTotalWords();
}
-void CPWL_EditCtrl::SetScrollPos(const CFX_FloatPoint& point) {
+void CPWL_EditCtrl::SetScrollPos(const CFX_PointF& point) {
m_pEdit->SetScrollPos(point);
}
-CFX_FloatPoint CPWL_EditCtrl::GetScrollPos() const {
+CFX_PointF CPWL_EditCtrl::GetScrollPos() const {
return m_pEdit->GetScrollPos();
}
@@ -544,8 +542,8 @@ void CPWL_EditCtrl::IOnSetScrollPosY(FX_FLOAT fy) {
}
void CPWL_EditCtrl::IOnSetCaret(bool bVisible,
- const CFX_FloatPoint& ptHead,
- const CFX_FloatPoint& ptFoot,
+ const CFX_PointF& ptHead,
+ const CFX_PointF& ptFoot,
const CPVT_WordPlace& place) {
PWL_CARET_INFO cInfo;
cInfo.bVisible = bVisible;
@@ -572,9 +570,9 @@ void CPWL_EditCtrl::GetTextRange(const CFX_FloatRect& rect,
int32_t& nStartChar,
int32_t& nEndChar) const {
nStartChar = m_pEdit->WordPlaceToWordIndex(
- m_pEdit->SearchWordPlace(CFX_FloatPoint(rect.left, rect.top)));
+ m_pEdit->SearchWordPlace(CFX_PointF(rect.left, rect.top)));
nEndChar = m_pEdit->WordPlaceToWordIndex(
- m_pEdit->SearchWordPlace(CFX_FloatPoint(rect.right, rect.bottom)));
+ m_pEdit->SearchWordPlace(CFX_PointF(rect.right, rect.bottom)));
}
CFX_WideString CPWL_EditCtrl::GetText(int32_t& nStartChar,