| 1239 | } |
| 1240 | |
| 1241 | void EditBox::setEditPassword(bool _password) |
| 1242 | { |
| 1243 | if (mModePassword == _password) |
| 1244 | return; |
| 1245 | mModePassword = _password; |
| 1246 | |
| 1247 | if (mModePassword) |
| 1248 | { |
| 1249 | if (mClientText != nullptr) |
| 1250 | { |
| 1251 | mPasswordText = mClientText->getCaption(); |
| 1252 | mClientText->setCaption(UString(mTextLength, '*')); |
| 1253 | } |
| 1254 | } |
| 1255 | else |
| 1256 | { |
| 1257 | if (mClientText != nullptr) |
| 1258 | { |
| 1259 | mClientText->setCaption(mPasswordText); |
| 1260 | mPasswordText.clear(); |
| 1261 | } |
| 1262 | } |
| 1263 | // обновляем по размерам |
| 1264 | updateView(); |
| 1265 | // сбрасываем историю |
| 1266 | commandResetHistory(); |
| 1267 | } |
| 1268 | |
| 1269 | void EditBox::setText(const UString& _caption, bool _history) |
| 1270 | { |
no test coverage detected