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

Method initialiseOverride

MyGUIEngine/src/MyGUI_ListBox.cpp:19–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 4

parseIntFunction · 0.85
newDelegateFunction · 0.85
assignWidgetFunction · 0.85
setScrollPageMethod · 0.80

Tested by

no test coverage detected