MCPcopy Create free account
hub / github.com/cinience/RedisStudio / DoEvent

Method DoEvent

DuiLib/Core/UIContainer.cpp:215–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 }
214
215 void CContainerUI::DoEvent(TEventUI& event)
216 {
217 if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
218 if( m_pParent != NULL ) m_pParent->DoEvent(event);
219 else CControlUI::DoEvent(event);
220 return;
221 }
222
223 if( event.Type == UIEVENT_SETFOCUS )
224 {
225 m_bFocused = true;
226 return;
227 }
228 if( event.Type == UIEVENT_KILLFOCUS )
229 {
230 m_bFocused = false;
231 return;
232 }
233 if( m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible() && m_pVerticalScrollBar->IsEnabled() )
234 {
235 if( event.Type == UIEVENT_KEYDOWN )
236 {
237 switch( event.chKey ) {
238 case VK_DOWN:
239 LineDown();
240 return;
241 case VK_UP:
242 LineUp();
243 return;
244 case VK_NEXT:
245 PageDown();
246 return;
247 case VK_PRIOR:
248 PageUp();
249 return;
250 case VK_HOME:
251 HomeUp();
252 return;
253 case VK_END:
254 EndDown();
255 return;
256 }
257 }
258 else if( event.Type == UIEVENT_SCROLLWHEEL )
259 {
260 switch( LOWORD(event.wParam) ) {
261 case SB_LINEUP:
262 LineUp();
263 return;
264 case SB_LINEDOWN:
265 LineDown();
266 return;
267 }
268 }
269 }
270 else if( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() && m_pHorizontalScrollBar->IsEnabled() ) {
271 if( event.Type == UIEVENT_KEYDOWN )
272 {

Callers

nothing calls this directly

Calls 2

IsVisibleMethod · 0.80
IsEnabledMethod · 0.80

Tested by

no test coverage detected