summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_texteditengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/cfde_texteditengine.h')
-rw-r--r--xfa/fde/cfde_texteditengine.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/xfa/fde/cfde_texteditengine.h b/xfa/fde/cfde_texteditengine.h
index 58f77edf31..868be8866a 100644
--- a/xfa/fde/cfde_texteditengine.h
+++ b/xfa/fde/cfde_texteditengine.h
@@ -61,21 +61,27 @@ class CFDE_TextEditEngine {
virtual void Undo() const = 0;
};
+ struct TextChange {
+ WideString text;
+ WideString previous_text;
+ size_t selection_start;
+ size_t selection_end;
+ bool cancelled;
+ };
+
class Delegate {
public:
virtual ~Delegate() = default;
virtual void NotifyTextFull() = 0;
virtual void OnCaretChanged() = 0;
- virtual void OnTextChanged(const WideString& prevText) = 0;
+ virtual void OnTextWillChange(TextChange* change) = 0;
+ virtual void OnTextChanged() = 0;
virtual void OnSelChanged() = 0;
virtual bool OnValidate(const WideString& wsText) = 0;
virtual void SetScrollOffset(float fScrollOffset) = 0;
};
- enum class RecordOperation {
- kInsertRecord,
- kSkipRecord,
- };
+ enum class RecordOperation { kInsertRecord, kSkipRecord, kSkipNotify };
CFDE_TextEditEngine();
~CFDE_TextEditEngine();