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
commitdad0081820141b9823f8a4ad633b28515f055f1f (patch)
tree823e4cc29a3fa9a524aa308bb824cf5406c7b47f /src/CaseFolder.h
parent431004e5efda4bddbeb265db3d0e28fda828a808 (diff)
downloadscintilla-mirror-dad0081820141b9823f8a4ad633b28515f055f1f.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