diff options
author | nyamatongwe <unknown> | 2004-05-11 13:31:02 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2004-05-11 13:31:02 +0000 |
commit | c71c1f0039a2d9333f6ea5548ba8e48f89f6101c (patch) | |
tree | 34443907ffade9fc3c6ce4311c9184395b01ff18 /src/Editor.h | |
parent | 6274bce67c1b422a912087dbcb6e42088b685f69 (diff) | |
download | scintilla-mirror-c71c1f0039a2d9333f6ea5548ba8e48f89f6101c.tar.gz |
Modifications to selection handling to make copying and
pasting from/to various encodings work.
Diffstat (limited to 'src/Editor.h')
-rw-r--r-- | src/Editor.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Editor.h b/src/Editor.h index 76635e658..9e9af0ec1 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -134,22 +134,27 @@ public: char *s; int len; bool rectangular; + int codePage; int characterSet; - SelectionText() : s(0), len(0), rectangular(false), characterSet(0) {} + SelectionText() : s(0), len(0), rectangular(false), codePage(0), characterSet(0) {} ~SelectionText() { - Set(0, 0, 0); + Free(); } - void Set(char *s_, int len_, int characterSet_, bool rectangular_=false) { + void Free() { + Set(0, 0, 0, 0, false); + } + void Set(char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { delete []s; s = s_; if (s) len = len_; else len = 0; + codePage = codePage_; characterSet = characterSet_; rectangular = rectangular_; } - void Copy(const char *s_, int len_, int characterSet_, bool rectangular_=false) { + void Copy(const char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { delete []s; s = new char[len_]; if (s) { @@ -160,9 +165,13 @@ public: } else { len = 0; } + codePage = codePage_; characterSet = characterSet_; rectangular = rectangular_; } + void Copy(const SelectionText &other) { + Copy(other.s, other.len, other.codePage, other.characterSet, other.rectangular); + } }; /** |