| 18 | const float TAB_SPEED_FADE_COEF = 5.0f; |
| 19 | |
| 20 | void TabControl::initialiseOverride() |
| 21 | { |
| 22 | Base::initialiseOverride(); |
| 23 | |
| 24 | if (isUserString("ButtonSkin")) |
| 25 | mButtonSkinName = getUserString("ButtonSkin"); |
| 26 | |
| 27 | // OBSOLETE |
| 28 | if (isUserString("OffsetBar")) |
| 29 | mOffsetTab = utility::parseValue<int>(getUserString("OffsetBar")); |
| 30 | |
| 31 | // OBSOLETE |
| 32 | if (isUserString("EmptyBarSkin")) |
| 33 | mEmptySkinName = getUserString("EmptyBarSkin"); |
| 34 | |
| 35 | // OBSOLETE |
| 36 | assignWidget(mWidgetBar, "Bar"); |
| 37 | if (mWidgetBar != nullptr) |
| 38 | { |
| 39 | mWidgetBar->setSize(mWidgetBar->getWidth() - mOffsetTab, mWidgetBar->getHeight()); |
| 40 | } |
| 41 | |
| 42 | ///@wskin_child{TabControl, Button, Left} Кнопка прокрутки заголовков влево. |
| 43 | assignWidget(mButtonLeft, "Left"); |
| 44 | if (mButtonLeft != nullptr) |
| 45 | { |
| 46 | mButtonLeft->eventMouseButtonClick += newDelegate(this, &TabControl::notifyPressedButtonEvent); |
| 47 | } |
| 48 | |
| 49 | ///@wskin_child{TabControl, Button, Right} Кнопка прокрутки заголовков вправо. |
| 50 | assignWidget(mButtonRight, "Right"); |
| 51 | if (mButtonRight != nullptr) |
| 52 | { |
| 53 | mButtonRight->eventMouseButtonClick += newDelegate(this, &TabControl::notifyPressedButtonEvent); |
| 54 | } |
| 55 | |
| 56 | // OBSOLETE |
| 57 | assignWidget(mButtonDecor, "ButtonDecor"); |
| 58 | if (mButtonDecor != nullptr) |
| 59 | { |
| 60 | mButtonDecor->setVisible(false); |
| 61 | } |
| 62 | |
| 63 | ///@wskin_child{TabControl, Widget, TabItem} Шаблон для страницы, по которому будут создаваться клиентские зоны страниц. |
| 64 | assignWidget(mItemTemplate, "TabItem"); |
| 65 | if (mItemTemplate != nullptr) |
| 66 | { |
| 67 | mItemTemplate->setVisible(false); |
| 68 | } |
| 69 | |
| 70 | #ifndef MYGUI_DONT_USE_OBSOLETE |
| 71 | if (mItemTemplate == nullptr) |
| 72 | { |
| 73 | assignWidget(mItemTemplate, "Sheet"); |
| 74 | if (mItemTemplate != nullptr) |
| 75 | { |
| 76 | mItemTemplate->setVisible(false); |
| 77 | } |
nothing calls this directly
no test coverage detected