aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CaseFolder.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-07-11 10:43:40 +1000
committerNeil <nyamatongwe@gmail.com>2013-07-11 10:43:40 +1000
commit5262f832018923ecc8ccd25bedecbd5a291a563f (patch)
treed14831d0e08cd988dd8425674a29d514326c99f4 /src/CaseFolder.h
parent8ee42f850d492efbec73969eca52243e1acd1c96 (diff)
downloadscintilla-mirror-5262f832018923ecc8ccd25bedecbd5a291a563f.tar.gz
Include case conversion data in Scintilla so that all platforms will perform
case conversion of Unicode text in accordance with Unicode.
Diffstat (limited to 'src/CaseFolder.h')
-rw-r--r--src/CaseFolder.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/CaseFolder.h b/src/CaseFolder.h
new file mode 100644
index 000000000..2d754d4f3
--- /dev/null
+++ b/src/CaseFolder.h
@@ -0,0 +1,45 @@
+// Scintilla source code edit control
+/** @file CaseFolder.h
+ ** Classes for case folding.
+ **/
+// Copyright 1998-2013 by Neil Hodgson <neilh@scintilla.org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef CASEFOLDER_H
+#define CASEFOLDER_H
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+class CaseFolder {
+public:
+ virtual ~CaseFolder();
+ virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0;
+};
+
+class CaseFolderTable : public CaseFolder {
+protected:
+ char mapping[256];
+public:
+ CaseFolderTable();
+ virtual ~CaseFolderTable();
+ virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed);
+ void SetTranslation(char ch, char chTranslation);
+ void StandardASCII();
+};
+
+class ICaseConverter;
+
+class CaseFolderUnicode : public CaseFolderTable {
+ ICaseConverter *converter;
+public:
+ CaseFolderUnicode();
+ virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed);
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#endif