summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_formfill.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-17 20:32:41 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-17 20:32:41 +0000
commita37989fe53097e4a0b6e87eb6ba01def1e13b675 (patch)
tree9267a150f8d58d96dc7e8448b235eda8561de75d /fpdfsdk/fpdf_formfill.cpp
parent5ae6c564d16ce8b625df3d1950abc822f9ecc987 (diff)
downloadpdfium-a37989fe53097e4a0b6e87eb6ba01def1e13b675.tar.xz
Add FORM_OnLButtonDoubleClick().
The code for this already exists, but is not hooked up to a public API. Hook it up and add a test case. Change-Id: I2ebc8492d8b7347849ff06f664155c6d72ecf76f Reviewed-on: https://pdfium-review.googlesource.com/c/44130 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_formfill.cpp')
-rw-r--r--fpdfsdk/fpdf_formfill.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index 7b8215d9e2..4b23ce41b0 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -410,6 +410,22 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,
return pPageView->OnLButtonUp(CFX_PointF(page_x, page_y), modifier);
}
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FORM_OnLButtonDoubleClick(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int modifier,
+ double page_x,
+ double page_y) {
+ CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
+ if (!pPageView)
+ return false;
+#ifdef PDF_ENABLE_CLICK_LOGGING
+ fprintf(stderr, "mousedown,doubleleft,%d,%d\n",
+ static_cast<int>(round(page_x)), static_cast<int>(round(page_y)));
+#endif // PDF_ENABLE_CLICK_LOGGING
+ return pPageView->OnLButtonDblClk(CFX_PointF(page_x, page_y), modifier);
+}
+
#ifdef PDF_ENABLE_XFA
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle,
FPDF_PAGE page,