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

Method initialiseOverride

MyGUIEngine/src/MyGUI_EditBox.cpp:69–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 }
68
69 void EditBox::initialiseOverride()
70 {
71 Base::initialiseOverride();
72
73 mOriginalPointer = getPointer();
74
75 // FIXME нам нужен фокус клавы
76 setNeedKeyFocus(true);
77
78 assignWidget(mScrollViewClient, "Client");
79 if (getClientWidget() != nullptr)
80 {
81 getClientWidget()->eventMouseSetFocus += newDelegate(this, &EditBox::notifyMouseSetFocus);
82 getClientWidget()->eventMouseLostFocus += newDelegate(this, &EditBox::notifyMouseLostFocus);
83 getClientWidget()->eventMouseButtonPressed += newDelegate(this, &EditBox::notifyMousePressed);
84 getClientWidget()->eventMouseButtonReleased += newDelegate(this, &EditBox::notifyMouseReleased);
85 getClientWidget()->eventMouseDrag += newDelegate(this, &EditBox::notifyMouseDrag);
86 getClientWidget()->eventMouseButtonDoubleClick += newDelegate(this, &EditBox::notifyMouseButtonDoubleClick);
87 getClientWidget()->eventMouseWheel += newDelegate(this, &EditBox::notifyMouseWheel);
88 }
89
90 ///@wskin_child{EditBox, ScrollBar, VScroll} Вертикальная полоса прокрутки.
91 assignWidget(mVScroll, "VScroll");
92 if (mVScroll != nullptr)
93 {
94 mVScroll->eventScrollChangePosition += newDelegate(this, &EditBox::notifyScrollChangePosition);
95 }
96
97 ///@wskin_child{EditBox, ScrollBar, HScroll} Горизонтальная полоса прокрутки.
98 assignWidget(mHScroll, "HScroll");
99 if (mHScroll != nullptr)
100 {
101 mHScroll->eventScrollChangePosition += newDelegate(this, &EditBox::notifyScrollChangePosition);
102 }
103
104 mClientText = getSubWidgetText();
105 if (getClientWidget() != nullptr)
106 {
107 ISubWidgetText* text = getClientWidget()->getSubWidgetText();
108 if (text)
109 mClientText = text;
110 }
111
112 updateScrollSize();
113
114 // первоначальная инициализация курсора
115 if (mClientText != nullptr)
116 mClientText->setCursorPosition(mCursorPosition);
117
118 updateSelectText();
119 }
120
121 void EditBox::shutdownOverride()
122 {

Callers

nothing calls this directly

Calls 4

assignWidgetFunction · 0.85
newDelegateFunction · 0.85
getSubWidgetTextMethod · 0.80
setCursorPositionMethod · 0.80

Tested by

no test coverage detected