2 #if defined(USE_DIRECTX_RENDERER) || 0 12 CUniLine(
int nInitialSize = 0 );
15 static void Initialize();
16 static void Uninitialize();
18 int GetBufferSize()
const;
19 bool SetBufferSize(
int nSize );
20 int GetTextSize()
const;
21 const char16_t* GetBuffer()
const;
28 int GetBufferA(std::string& out)
const;
30 const char16_t& operator[](
int n )
const {
return m_pwszBuffer[n]; }
31 char16_t& operator[](
int n);
32 GUIFontElement* GetFontNode()
const{
return m_pFontNode; }
33 void SetFontNode( GUIFontElement *pFontNode ) { m_pFontNode = pFontNode; }
36 bool InsertChar(
int nIndex, char16_t wchar);
37 bool RemoveChar(
int nIndex );
38 bool InsertString(
int nIndex,
const char16_t *pStr,
int nCount = -1);
39 bool InsertStringA(
int nIndex,
const char*pStr,
int nCount = -1);
40 bool SetTextA( LPCSTR szText );
41 bool SetText(
const char16_t* wszText );
44 HRESULT CPtoX(
int nCP, BOOL bTrail,
int *pX );
45 HRESULT XtoCP(
int nX,
int *pCP,
int *pnTrail );
46 void GetPriorItemPos(
int nCP,
int *pPrior );
47 void GetNextItemPos(
int nCP,
int *pPrior );
48 const TEXTMETRIC& GetTextMetric(){
49 if( m_bAnalyseRequired )
57 char16_t* m_pwszBuffer;
61 GUIFontElement* m_pFontNode;
62 bool m_bAnalyseRequired;
63 SCRIPT_STRING_ANALYSIS m_Analysis;
64 TEXTMETRIC m_TextMetric;
67 static HRESULT WINAPI Dummy_ScriptApplyDigitSubstitution(
const SCRIPT_DIGITSUBSTITUTE*, SCRIPT_CONTROL*, SCRIPT_STATE* ) {
return E_NOTIMPL; }
68 static HRESULT WINAPI Dummy_ScriptStringAnalyse( HDC,
const void *,
int,
int,
int, DWORD,
int, SCRIPT_CONTROL*, SCRIPT_STATE*,
const int*, SCRIPT_TABDEF*,
const BYTE*, SCRIPT_STRING_ANALYSIS* ) {
return E_NOTIMPL; }
69 static HRESULT WINAPI Dummy_ScriptStringCPtoX( SCRIPT_STRING_ANALYSIS,
int, BOOL,
int* ) {
return E_NOTIMPL; }
70 static HRESULT WINAPI Dummy_ScriptStringXtoCP( SCRIPT_STRING_ANALYSIS,
int,
int*,
int* ) {
return E_NOTIMPL; }
71 static HRESULT WINAPI Dummy_ScriptStringFree( SCRIPT_STRING_ANALYSIS* ) {
return E_NOTIMPL; }
72 static const SCRIPT_LOGATTR* WINAPI Dummy_ScriptString_pLogAttr( SCRIPT_STRING_ANALYSIS ) {
return NULL; }
73 static const int* WINAPI Dummy_ScriptString_pcOutChars( SCRIPT_STRING_ANALYSIS ) {
return NULL; }
74 static bool WINAPI Dummy_GetTextMetrics(HDC, LPTEXTMETRIC){
return true;}
76 static HRESULT (WINAPI *_ScriptApplyDigitSubstitution)(
const SCRIPT_DIGITSUBSTITUTE*, SCRIPT_CONTROL*, SCRIPT_STATE* );
77 static HRESULT (WINAPI *_ScriptStringAnalyse)( HDC,
const void *, int, int, int, DWORD, int, SCRIPT_CONTROL*, SCRIPT_STATE*,
const int*, SCRIPT_TABDEF*,
const BYTE*, SCRIPT_STRING_ANALYSIS* );
78 static HRESULT (WINAPI *_ScriptStringCPtoX)( SCRIPT_STRING_ANALYSIS, int, BOOL,
int* );
79 static HRESULT (WINAPI *_ScriptStringXtoCP)( SCRIPT_STRING_ANALYSIS, int,
int*,
int* );
80 static HRESULT (WINAPI *_ScriptStringFree)( SCRIPT_STRING_ANALYSIS* );
81 static const SCRIPT_LOGATTR* (WINAPI *_ScriptString_pLogAttr)( SCRIPT_STRING_ANALYSIS );
82 static const int* (WINAPI *_ScriptString_pcOutChars)( SCRIPT_STRING_ANALYSIS );
83 static bool (WINAPI *_GetTextMetrics)(HDC, LPTEXTMETRIC);
84 static HINSTANCE s_hDll;
90 CUniBuffer(
int nInitialSize = 1 );
93 static void Initialize();
94 static void Uninitialize();
96 int GetBufferSize()
const{
98 return m_lines.front()->GetBufferSize();
102 bool SetBufferSize(
int nSize );
103 int GetTextSize()
const;
104 const char16_t* GetBuffer()
const {
106 return m_lines.front()->GetBuffer();
116 int GetBufferA(std::string& out)
const;
117 char16_t& operator[](
int n );
118 GUIFontElement* GetFontNode()
const{
120 return m_lines.front()->GetFontNode();
124 void SetFontNode( GUIFontElement *pFontNode ) {
126 m_lines.front()->SetFontNode(pFontNode);
131 bool InsertChar(
int nIndex, char16_t wchar);
132 bool RemoveChar(
int nIndex );
133 bool InsertString(
int nIndex,
const char16_t *pStr,
int nCount = -1);
134 bool InsertStringA(
int nIndex,
const char *pStr,
int nCount = -1 );
135 bool SetTextA(
const char* szText );
136 bool SetText(
const char16_t* wszText );
139 HRESULT CPtoXY(
int nCP, BOOL bTrail,
int *pX,
int *pY);
140 HRESULT XYtoCP(
int nX,
int nY,
int *pCP,
int *pnTrail);
141 void GetPriorItemPos(
int nCP,
int *pPrior );
142 void GetNextItemPos(
int nCP,
int *pPrior );
144 bool GetMultiline()
const{
return m_bMultiline;}
145 void SetMultiline(
bool multiline){m_bMultiline=multiline;};
153 int GetLineAt(
int nIndex);
155 CUniLine *GetCurLine(){
return m_curLine;};
168 list<CUniLine*> m_lines;
179 static void Initialize(){};
180 static void Uninitialize(){};
181 int GetTextSize()
const;
182 const char16_t* GetBuffer()
const;
184 char16_t& operator[](
int n);
191 int GetBufferA(std::string& out)
const;
193 bool InsertChar(
int nIndex, char16_t wchar);
195 bool RemoveChar(
int nIndex);
197 bool InsertString(
int nIndex,
const char16_t *pStr,
int nCount = -1);
199 bool InsertStringA(
int nIndex,
const char *pStr,
int nCount = -1);
200 bool SetTextA(LPCSTR szText);
201 bool SetText(
const char16_t* wszText);
204 HRESULT CPtoXY(
int nCP, BOOL bTrail,
int *pX,
int *pY);
205 HRESULT XYtoCP(
int nX,
int nY,
int *pCP,
int *pnTrail);
206 void GetPriorItemPos(
int nCP,
int *pPrior);;
207 void GetNextItemPos(
int nCP,
int *pPrior);;
209 bool GetMultiline()
const{
return false; }
210 void SetMultiline(
bool multiline){};
212 const std::string& GetUtf8Text()
const {
return m_utf8Text; }
213 const std::u16string& GetUtf16Text()
const {
return m_utf16Text; }
217 std::string m_utf8Text;
218 std::u16string m_utf16Text;
different physics engine has different winding order.
Definition: EventBinding.h:32
Null implementation.
Definition: GUIUniBuffer.h:176