aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h17
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);
+ }
};
/**