MCPcopy Create free account
hub / github.com/MyGUI/mygui / getSize

Method getSize

MyGUIEngine/src/MyGUI_TextIterator.cpp:179–216  ·  view source on GitHub ↗

возвращает размер строки

Source from the content-addressed store, hash-verified

177
178 // возвращает размер строки
179 size_t TextIterator::getSize() const
180 {
181 if (mSize != ITEM_NONE)
182 return mSize;
183 mSize = mPosition;
184
185 for (UString::utf32string::const_iterator iter = mCurrent; iter != mEnd; ++iter)
186 {
187 if ((*iter) == L'#')
188 {
189 // следующий символ
190 ++iter;
191 if (iter == mEnd)
192 break;
193
194 // тэг цвета
195 if ((*iter) != L'#')
196 {
197 // остальные 5 символов цвета
198 for (size_t pos = 0; pos < 5; pos++)
199 {
200 ++iter;
201 if (iter == mEnd)
202 {
203 --iter;
204 break;
205 }
206 }
207 continue;
208 }
209 }
210
211 // обыкновенный символ
212 mSize++;
213 }
214
215 return mSize;
216 }
217
218 // возвращает текст без тегов
219 UString TextIterator::getOnlyText(const UString& _text)

Callers 15

Gui.hFile · 0.45
getFunction · 0.45
updateSizeMethod · 0.45
initialiseMethod · 0.45
frameEnteredCheckMethod · 0.45
updateMethod · 0.45
updateViewportMethod · 0.45
onDoModalMethod · 0.45
updateMeasureMethod · 0.45
updateContentMethod · 0.45
createSceneMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected