]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/unichar.h
fd058c1ddca970e9e5634fa2d661bd5d9685fe6e
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxUniChar
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 This class represents a single Unicode character. It can be converted to
13 and from @c char or @c wchar_t and implements commonly used character operations.
22 This is not wchar_t on purpose, it needs to represent the entire
23 Unicode code points range and wchar_t may be too small for that
24 (e.g. on Win32 where wchar_t* is encoded in UTF-16).
26 typedef wxUint32 value_type
;
35 Create the character from 8bit character value encoded in the current
39 wxUniChar(unsigned char c
);
43 wxUniChar(unsigned int c
);
44 wxUniChar(long int c
);
45 wxUniChar(unsigned long int c
);
46 wxUniChar(short int c
);
47 wxUniChar(unsigned short int c
);
49 wxUniChar(const wxUniCharRef
& c
);
52 Returns Unicode code point value of the character.
54 value_type
GetValue() const;
57 Returns true if the character is an ASCII character.
63 Conversions to char and wchar_t types: all of those are needed to be
64 able to pass wxUniChars to various standard narrow and wide character
67 operator char() const;
68 operator unsigned char() const;
69 operator wchar_t() const;
71 operator unsigned int() const;
72 operator long int() const;
73 operator unsigned long int() const;
74 operator short int() const;
75 operator unsigned short int() const;
82 wxUniChar
& operator=(const wxUniChar
& c
);
83 wxUniChar
& operator=(const wxUniCharRef
& c
);
84 wxUniChar
& operator=(char c
);
85 wxUniChar
& operator=(unsigned char c
);
86 wxUniChar
& operator=(wchar_t c
);
87 wxUniChar
& operator=(int c
);
88 wxUniChar
& operator=(unsigned int c
);
89 wxUniChar
& operator=(long int c
);
90 wxUniChar
& operator=(unsigned long int c
);
91 wxUniChar
& operator=(short int c
);
92 wxUniChar
& operator=(unsigned short int c
);
100 Writeable reference to a character in wxString.
102 This class can be used in the same way wxChar is used, except that changing
103 its value updates the underlying string object.