From ee96772e0878fa385b9a4a736a2fc109e19fd01e Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 19 Apr 2018 20:55:54 +0000 Subject: Add public APIs for undo / redo in forms. Add FORM_CanUndo(), FORM_CanRedo(), FORM_Undo(), and FORM_Redo(). BUG=chromium:764260 Change-Id: I1d9ea67152d9b35d9b8e1d7ef7d019706fdfa30a Reviewed-on: https://pdfium-review.googlesource.com/30872 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- fpdfsdk/pwl/cpwl_combo_box.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'fpdfsdk/pwl/cpwl_combo_box.cpp') diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp index 1576b022fd..2e6e56c52b 100644 --- a/fpdfsdk/pwl/cpwl_combo_box.cpp +++ b/fpdfsdk/pwl/cpwl_combo_box.cpp @@ -196,6 +196,22 @@ void CPWL_ComboBox::ReplaceSelection(const WideString& text) { m_pEdit->ReplaceSelection(text); } +bool CPWL_ComboBox::CanUndo() { + return m_pEdit && m_pEdit->CanUndo(); +} + +bool CPWL_ComboBox::CanRedo() { + return m_pEdit && m_pEdit->CanRedo(); +} + +bool CPWL_ComboBox::Undo() { + return m_pEdit && m_pEdit->Undo(); +} + +bool CPWL_ComboBox::Redo() { + return m_pEdit && m_pEdit->Redo(); +} + WideString CPWL_ComboBox::GetText() { return m_pEdit ? m_pEdit->GetText() : WideString(); } -- cgit v1.2.3