| Flutter iOS Embedder |

Public Member Functions | List of all members
flutter::TextEditingDelta Struct Reference

A change in the state of an input field. More...

`#include <text_editing_delta.h>`

## Public Member Functions
| TextEditingDelta (const std::u16string &text_before_change, const TextRange &range, const std::u16string &text)
| TextEditingDelta (const std::string &text_before_change, const TextRange &range, const std::string &text)
| TextEditingDelta (const std::u16string &text)
| TextEditingDelta (const std::string &text)
virtual | ~TextEditingDelta ()=default
std::string | old_text () const
std::string | delta_text () const
int | delta_start () const
| Get the delta_start_ value. More...
int | delta_end () const
| Get the delta_end_ value. More...
bool | operator== (const TextEditingDelta &rhs) const =default
| TextEditingDelta (const TextEditingDelta &other)=default
TextEditingDelta & | operator= (const TextEditingDelta &other)=default

## Detailed Description

A change in the state of an input field.

Definition at line 16 of file text_editing_delta.h.

## Constructor & Destructor Documentation

## ◆ TextEditingDelta() [1/5]

flutter::TextEditingDelta::TextEditingDelta | ( | const std::u16string & | text_before_change,
|  | const TextRange & | range,
|  | const std::u16string & | text
| ) |  |

Definition at line 11 of file text_editing_delta.cc.

14 : old_text_(text_before_change),
15 delta_text_(text),
16 delta_start_(range.start()),
17 delta_end_(range.start() + range.length()) {}

## ◆ TextEditingDelta() [2/5]

flutter::TextEditingDelta::TextEditingDelta | ( | const std::string & | text_before_change,
|  | const TextRange & | range,
|  | const std::string & | text
| ) |  |

Definition at line 19 of file text_editing_delta.cc.

22 : old_text_(fml::Utf8ToUtf16(text_before_change)),
23 delta_text_(fml::Utf8ToUtf16(text)),
24 delta_start_(range.start()),
25 delta_end_(range.start() + range.length()) {}

## ◆ TextEditingDelta() [3/5]

flutter::TextEditingDelta::TextEditingDelta | ( | const std::u16string & | text | ) |
| explicit

Definition at line 27 of file text_editing_delta.cc.

28 : old_text_(text), delta_text_(u""), delta_start_(-1), delta_end_(-1) {}

## ◆ TextEditingDelta() [4/5]

flutter::TextEditingDelta::TextEditingDelta | ( | const std::string & | text | ) |
| explicit

Definition at line 30 of file text_editing_delta.cc.

31 : old_text_(fml::Utf8ToUtf16(text)),
32 delta_text_(u""),
33 delta_start_(-1),
34 delta_end_(-1) {}

## ◆ ~TextEditingDelta()

virtual flutter::TextEditingDelta::~TextEditingDelta | ( |  | ) |
| virtual default

## ◆ TextEditingDelta() [5/5]

flutter::TextEditingDelta::TextEditingDelta | ( | const TextEditingDelta & | other | ) |
| default

## Member Function Documentation

## ◆ delta_end()

int flutter::TextEditingDelta::delta_end | ( |  | ) | const
| inline

Get the delta_end_ value.

Definition at line 45 of file text_editing_delta.h.

45 { return delta_end_; }

Referenced by flutter::TEST().

## ◆ delta_start()

int flutter::TextEditingDelta::delta_start | ( |  | ) | const
| inline

Get the delta_start_ value.

Definition at line 42 of file text_editing_delta.h.

42 { return delta_start_; }

Referenced by flutter::TEST().

## ◆ delta_text()

std::string flutter::TextEditingDelta::delta_text | ( |  | ) | const
| inline

Get the delta_text value.

All strings are stored as UTF16 but converted to UTF8 when accessed.

Definition at line 39 of file text_editing_delta.h.

39 { return fml::Utf16ToUtf8(delta_text_); }

Referenced by flutter::TEST().

## ◆ old_text()

std::string flutter::TextEditingDelta::old_text | ( |  | ) | const
| inline

Get the old_text_ value.

All strings are stored as UTF16 but converted to UTF8 when accessed.

Definition at line 34 of file text_editing_delta.h.

34 { return fml::Utf16ToUtf8(old_text_); }

Referenced by operator=(), and flutter::TEST().

## ◆ operator=()

TextEditingDelta& flutter::TextEditingDelta::operator= | ( | const TextEditingDelta & | other | ) |
| default

References old_text().

## ◆ operator==()

bool flutter::TextEditingDelta::operator== | ( | const TextEditingDelta & | rhs | ) | const
| default

The documentation for this struct was generated from the following files:

- shell/platform/common/text_editing_delta.h
- shell/platform/common/text_editing_delta.cc