fxunicode.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                   U N I C O D E   C h a r a c t e r   I n f o                 *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2005,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: fxunicode.h,v 1.3 2006/01/22 17:58:14 fox Exp $                          *
00023 ********************************************************************************/
00024 #ifndef FXUNICODE_H
00025 #define FXUNICODE_H
00026 
00027 
00028 namespace FX {
00029 
00030 
00032 enum {
00033   CatNotAssigned          = 0,     
00034   CatControl              = 1,     
00035   CatFormat               = 2,     
00036   CatSurrogate            = 3,     
00037   CatOther                = 4,     
00038   CatMarkNonSpacing       = 5,     
00039   CatMarkSpacingCombining = 6,     
00040   CatMarkEnclosing        = 7,     
00041   CatSeparatorSpace       = 8,     
00042   CatSeparatorLine        = 9,     
00043   CatSeparatorParagraph   = 10,    
00044   CatLetterUpper          = 11,    
00045   CatLetterLower          = 12,    
00046   CatLetterTitle          = 13,    
00047   CatLetterModifier       = 14,    
00048   CatLetterOther          = 15,    
00049   CatNumberLetter         = 16,    
00050   CatNumberDecimal        = 17,    
00051   CatNumberOther          = 18,    
00052   CatPunctConnector       = 19,    
00053   CatPunctDash            = 20,    
00054   CatPunctOpen            = 21,    
00055   CatPunctClose           = 22,    
00056   CatPunctInitial         = 23,    
00057   CatPunctFinal           = 24,    
00058   CatPunctOther           = 25,    
00059   CatSymbolMath           = 26,    
00060   CatSymbolCurrency       = 27,    
00061   CatSymbolModifier       = 28,    
00062   CatSymbolOther          = 29     
00063   };
00064 
00065 
00067 enum {
00068   DirL   = 0,           
00069   DirLRE = 1,           
00070   DirLRO = 2,           
00071   DirR   = 3,           
00072   DirAL  = 4,           
00073   DirRLE = 5,           
00074   DirRLO = 6,           
00075   DirPDF = 7,           
00076   DirEN  = 8,           
00077   DirES  = 9,           
00078   DirET  = 10,          
00079   DirAN  = 11,          
00080   DirCS  = 12,          
00081   DirNSM = 13,          
00082   DirBN  = 14,          
00083   DirB   = 15,          
00084   DirS   = 16,          
00085   DirWS  = 17,          
00086   DirON  = 18           
00087   };
00088 
00089 
00091 enum {
00092   NonJoining   = 0,
00093   RightJoining = 1,
00094   DualJoining  = 2,
00095   JoinCausing  = 3
00096   };
00097 
00098 
00100 enum {
00101   CombBelowLeftAtt  = 200,     
00102   CombBelowAtt      = 202,     
00103   CombBelowRightAtt = 204,     
00104   CombLeftAtt       = 208,     
00105   CombRightAtt      = 210,     
00106   CombAboveLeftAtt  = 212,     
00107   CombAboveAtt      = 214,     
00108   CombAboveRightAtt = 216,     
00109   CombBelowLeft     = 218,     
00110   CombBelow         = 220,     
00111   CombBelowRight    = 222,     
00112   CombLeft          = 224,     
00113   CombRight         = 226,     
00114   CombAboveLeft     = 228,     
00115   CombAbove         = 230,     
00116   CombAboveRight    = 232,     
00117   CombDoubleBelow   = 233,     
00118   CombDoubleAbove   = 234,     
00119   CombIotaSub       = 240      
00120   };
00121 
00122 
00124 enum {
00125   DecNone      = 0,     
00126   DecFont      = 1,     
00127   DecNoBreak   = 2,     
00128   DecInitial   = 3,     
00129   DecMedial    = 4,     
00130   DecFinal     = 5,     
00131   DecIsolated  = 6,     
00132   DecCircle    = 7,     
00133   DecSuper     = 8,     
00134   DecSub       = 9,     
00135   DecVertical  = 10,    
00136   DecWide      = 11,    
00137   DecNarrow    = 12,    
00138   DecSmall     = 13,    
00139   DecSquare    = 14,    
00140   DecFraction  = 15,    
00141   DecCompat    = 16,    
00142   DecCanonical = 17     
00143   };
00144 
00145 
00147 enum {
00148   BreakUnknown    = 0,          
00149 
00150   BreakMandarory  = 1,          
00151   BreakReturn     = 2,          
00152   BreakLineFeed   = 3,          
00153   BreakCombMark   = 4,          
00154   BreakNextLine   = 5,          
00155   BreakSurrogate  = 6,          
00156   BreakWordJoiner = 7,          
00157   BreakZWSpace    = 8,          
00158   BreakGlue       = 9,          
00159   BreakContingent = 10,         
00160   BreakSpace      = 11,         
00161 
00162   BreakBoth       = 12,         
00163   BreakAfter      = 13,         
00164   BreakBefore     = 14,         
00165   BreakHyphen     = 15,         
00166 
00167   BreakOpen       = 16,         
00168   BreakClose      = 17,         
00169   BreakQuote      = 18,         
00170   BreakExclaim    = 19,         
00171   BreakInsep      = 20,         
00172   BreakNonStart   = 21,         
00173 
00174   BreakInfix      = 22,         
00175   BreakNumeric    = 23,         
00176   BreakPostfix    = 24,         
00177   BreakPrefix     = 25,         
00178   BreakSymbol     = 26,         
00179 
00180   BreakOrdinary   = 27,         
00181   BreakIdeograph  = 28,         
00182   BreakComplex    = 29          
00183   };
00184 
00185 
00187 enum {
00188   ScriptCommon             = 0,       
00189   ScriptInherited          = 1,       
00190 
00191   ScriptLatin              = 2,       
00192   ScriptGreek              = 3,       
00193   ScriptCyrillic           = 4,       
00194   ScriptArmenian           = 5,       
00195   ScriptGeorgian           = 6,       
00196   ScriptRunic              = 7,       
00197   ScriptOgham              = 8,       
00198 
00199   ScriptHebrew             = 9,       
00200   ScriptArabic             = 10,      
00201   ScriptSyriac             = 11,      
00202   ScriptThaana             = 12,      
00203 
00204   ScriptDevanagari         = 13,      
00205   ScriptBengali            = 14,      
00206   ScriptGurmukhi           = 15,      
00207   ScriptGujarati           = 16,      
00208   ScriptOriya              = 17,      
00209   ScriptTamil              = 18,      
00210   ScriptTelugu             = 19,      
00211   ScriptKannada            = 20,      
00212   ScriptMalayalam          = 21,      
00213   ScriptSinhala            = 22,      
00214   ScriptThai               = 23,      
00215   ScriptLao                = 24,      
00216   ScriptTibetan            = 25,      
00217   ScriptMyanmar            = 26,      
00218   ScriptKhmer              = 27,      
00219 
00220   ScriptHan                = 28,      
00221   ScriptHiragana           = 29,      
00222   ScriptKatakana           = 30,      
00223   ScriptHangul             = 31,      
00224   ScriptBopomofo           = 32,      
00225   ScriptYi                 = 33,      
00226 
00227   ScriptEthiopic           = 34,      
00228   ScriptCherokee           = 35,      
00229   ScriptCanadianAboriginal = 36,      
00230   ScriptMongolian          = 37,      
00231   ScriptGothic             = 38,      
00232 
00233   ScriptTagalog            = 39,      
00234   ScriptHanunoo            = 40,      
00235   ScriptBuhid              = 41,      
00236   ScriptTagbanwa           = 42,      
00237   ScriptLimbu              = 43,      
00238   ScriptTaiLe              = 44,      
00239   ScriptUgaritic           = 45,      
00240   ScriptOsmanya            = 46,      
00241   ScriptCypriot            = 47,      
00242   ScriptShavian            = 48,      
00243   ScriptDeseret            = 49,      
00244   ScriptKatakanaHiragana   = 50       
00245   };
00246 
00247 
00249 namespace Unicode {
00250 
00252 extern FXAPI FXuint charCategory(FXwchar ucs);
00253 
00255 extern FXAPI FXuint charDirection(FXwchar ucs);
00256 
00258 extern FXAPI FXuint decomposeType(FXwchar ucs);
00259 
00261 extern FXAPI FXuint charNumDecompose(FXwchar ucs);
00262 
00264 extern FXAPI const FXwchar* charDecompose(FXwchar ucs);
00265 
00267 extern FXAPI FXwchar charCompose(FXwchar ucsa,FXwchar ucsb);
00268 
00270 extern FXAPI FXuint joiningType(FXwchar ucs);
00271 
00273 extern FXAPI FXuint isSymmetric(FXwchar ucs);
00274 
00276 extern FXAPI FXuint charCombining(FXwchar ucs);
00277 
00279 extern FXAPI FXint digitValue(FXwchar ucs);
00280 
00282 extern FXAPI FXuint lineBreakType(FXwchar ucs);
00283 
00284 
00286 extern FXAPI FXwchar mirrorImage(FXwchar ucs);
00287 
00289 extern FXAPI FXuint scriptType(FXwchar ucs);
00290 
00291 
00293 extern FXAPI bool hasCase(FXwchar ucs);
00294 extern FXAPI bool isUpper(FXwchar ucs);
00295 extern FXAPI bool isLower(FXwchar ucs);
00296 extern FXAPI bool isTitle(FXwchar ucs);
00297 extern FXAPI bool isAscii(FXwchar ucs);
00298 extern FXAPI bool isLetter(FXwchar ucs);
00299 extern FXAPI bool isDigit(FXwchar ucs);
00300 extern FXAPI bool isAlphaNumeric(FXwchar ucs);
00301 extern FXAPI bool isControl(FXwchar ucs);
00302 extern FXAPI bool isSpace(FXwchar ucs);
00303 extern FXAPI bool isBlank(FXwchar ucs);
00304 extern FXAPI bool isPunct(FXwchar ucs);
00305 extern FXAPI bool isGraph(FXwchar ucs);
00306 extern FXAPI bool isPrint(FXwchar ucs);
00307 extern FXAPI bool isHexDigit(FXwchar ucs);
00308 extern FXAPI bool isSymbol(FXwchar ucs);
00309 extern FXAPI bool isMark(FXwchar ucs);
00310 extern FXAPI bool isSep(FXwchar ucs);
00311 
00313 extern FXAPI FXwchar toUpper(FXwchar ucs);
00314 extern FXAPI FXwchar toLower(FXwchar ucs);
00315 extern FXAPI FXwchar toTitle(FXwchar ucs);
00316 
00317 }
00318 
00319 
00320 }
00321 
00322 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:25 2009 for TnFOX by doxygen v1.4.7