| 433 | } |
| 434 | |
| 435 | int TabControl::_getTextWidth(const UString& _text) |
| 436 | { |
| 437 | if (mItemButton.empty()) |
| 438 | _createItemButton(); |
| 439 | |
| 440 | UString save = mItemButton[0]->getCaption(); |
| 441 | mItemButton[0]->setCaption(_text); |
| 442 | |
| 443 | ISubWidgetText* text = mItemButton[0]->getSubWidgetText(); |
| 444 | const IntSize& size = text ? text->getTextSize() : IntSize(); |
| 445 | const IntCoord& coord = text ? text->getCoord() : IntCoord(); |
| 446 | |
| 447 | mItemButton[0]->setCaption(save); |
| 448 | |
| 449 | return size.width + mItemButton[0]->getWidth() - coord.width; |
| 450 | } |
| 451 | |
| 452 | void TabControl::_notifyDeleteItem(TabItem* _sheet) |
| 453 | { |
nothing calls this directly
no test coverage detected