geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

CharClassify.h
Go to the documentation of this file.
1// Scintilla source code edit control
2/** @file CharClassify.h
3 ** Character classifications used by Document and RESearch.
4 **/
5// Copyright 2006-2009 by Neil Hodgson <neilh@scintilla.org>
6// The License.txt file describes the conditions under which this software may be distributed.
7
8#ifndef CHARCLASSIFY_H
9#define CHARCLASSIFY_H
10
11namespace Scintilla {
12
14public:
16
18 void SetDefaultCharClasses(bool includeWordClass);
19 void SetCharClasses(const unsigned char *chars, cc newCharClass);
20 int GetCharsOfClass(cc characterClass, unsigned char *buffer) const noexcept;
21 cc GetClass(unsigned char ch) const noexcept { return static_cast<cc>(charClass[ch]);}
22 bool IsWord(unsigned char ch) const noexcept { return static_cast<cc>(charClass[ch]) == ccWord;}
23
24private:
25 enum { maxChar=256 };
26 unsigned char charClass[maxChar]; // not type cc to save space
27};
28
29}
30
31#endif
bool IsWord(unsigned char ch) const noexcept
Definition: CharClassify.h:22
unsigned char charClass[maxChar]
Definition: CharClassify.h:26
cc GetClass(unsigned char ch) const noexcept
Definition: CharClassify.h:21
void SetDefaultCharClasses(bool includeWordClass)
void SetCharClasses(const unsigned char *chars, cc newCharClass)
int GetCharsOfClass(cc characterClass, unsigned char *buffer) const noexcept
const gchar * chars[][2]
Definition: htmlchars.c:72
Styling buffer using one element for each run rather than using a filled buffer.
Definition: Converter.h:9