]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/unichar.h
4866c1c11de1fd2a8f24be4ddcee7043062e9b5b
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 A type capable of holding any Unicode code point.
23 We do not use wchar_t as it cannot do the job on Win32,
24 where wchar_t is a 16-bit type (wchar_t* is encoded using UTF-16 on Win32).
26 typedef wxUint32 value_type
;
35 Create a character from the 8-bit character value @a c using the
36 current locale’s encoding.
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 (i.e. if its value is less than 128).
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.