| 17 | { |
| 18 | |
| 19 | void ListBox::initialiseOverride() |
| 20 | { |
| 21 | Base::initialiseOverride(); |
| 22 | |
| 23 | // FIXME нам нужен фокус клавы |
| 24 | setNeedKeyFocus(true); |
| 25 | |
| 26 | // парсим свойства |
| 27 | if (isUserString("SkinLine")) |
| 28 | mSkinLine = getUserString("SkinLine"); |
| 29 | |
| 30 | if (isUserString("HeightLine")) |
| 31 | mHeightLine = utility::parseInt(getUserString("HeightLine")); |
| 32 | |
| 33 | if (mHeightLine < 1) |
| 34 | mHeightLine = 1; |
| 35 | |
| 36 | if (getClientWidget() != nullptr) |
| 37 | { |
| 38 | getClientWidget()->eventMouseButtonPressed += newDelegate(this, &ListBox::notifyMousePressed); |
| 39 | getClientWidget()->eventMouseButtonReleased += newDelegate(this, &ListBox::notifyMouseButtonReleased); |
| 40 | getClientWidget()->eventKeyButtonPressed += newDelegate(this, &ListBox::notifyKeyButtonPressed); |
| 41 | getClientWidget()->eventKeyButtonReleased += newDelegate(this, &ListBox::notifyKeyButtonReleased); |
| 42 | } |
| 43 | |
| 44 | ///@wskin_child{ListBox, ScrollBar, VScroll} Вертикальная полоса прокрутки. |
| 45 | assignWidget(mWidgetScroll, "VScroll"); |
| 46 | if (mWidgetScroll != nullptr) |
| 47 | { |
| 48 | mWidgetScroll->eventScrollChangePosition += newDelegate(this, &ListBox::notifyScrollChangePosition); |
| 49 | mWidgetScroll->setScrollPage((size_t)mHeightLine); |
| 50 | } |
| 51 | |
| 52 | updateScroll(); |
| 53 | updateLine(); |
| 54 | } |
| 55 | |
| 56 | void ListBox::shutdownOverride() |
| 57 | { |
nothing calls this directly
no test coverage detected