From 6af5369477ec05554ef9e73ae6762860095f09e9 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 29 May 2018 19:42:39 +0000 Subject: [xfa] Propagate the xfa change data for text to JS and back. This CL adds the necessary plumbing to propagate the change information for a text widget from FWL out to JS and handle the returned value as necessary. Bug: pdfium:1066 Change-Id: I78fd81761b90294f1836e9f09dba12ed238963cc Reviewed-on: https://pdfium-review.googlesource.com/33070 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fwl/cfwl_eventtextwillchange.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 xfa/fwl/cfwl_eventtextwillchange.h (limited to 'xfa/fwl/cfwl_eventtextwillchange.h') diff --git a/xfa/fwl/cfwl_eventtextwillchange.h b/xfa/fwl/cfwl_eventtextwillchange.h new file mode 100644 index 0000000000..4b2781f0d1 --- /dev/null +++ b/xfa/fwl/cfwl_eventtextwillchange.h @@ -0,0 +1,24 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FWL_CFWL_EVENTTEXTWILLCHANGE_H_ +#define XFA_FWL_CFWL_EVENTTEXTWILLCHANGE_H_ + +#include "xfa/fwl/cfwl_event.h" + +class CFWL_EventTextWillChange : public CFWL_Event { + public: + explicit CFWL_EventTextWillChange(CFWL_Widget* pSrcTarget); + ~CFWL_EventTextWillChange() override; + + WideString change_text; + WideString previous_text; + bool cancelled = false; + size_t selection_start = 0; + size_t selection_end = 0; +}; + +#endif // XFA_FWL_CFWL_EVENTTEXTWILLCHANGE_H_ -- cgit v1.2.3