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

Method DoEvent

DuiLib/Control/UIDateTime.cpp:221–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219 }
220
221 void CDateTimeUI::DoEvent(TEventUI& event)
222 {
223 if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
224 if( m_pParent != NULL ) m_pParent->DoEvent(event);
225 else CLabelUI::DoEvent(event);
226 return;
227 }
228
229 if( event.Type == UIEVENT_SETCURSOR && IsEnabled() )
230 {
231 ::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM)));
232 return;
233 }
234 if( event.Type == UIEVENT_WINDOWSIZE )
235 {
236 if( m_pWindow != NULL ) m_pManager->SetFocusNeeded(this);
237 }
238 if( event.Type == UIEVENT_SCROLLWHEEL )
239 {
240 if( m_pWindow != NULL ) return;
241 }
242 if( event.Type == UIEVENT_SETFOCUS && IsEnabled() )
243 {
244 if( m_pWindow ) return;
245 m_pWindow = new CDateTimeWnd();
246 ASSERT(m_pWindow);
247 m_pWindow->Init(this);
248 m_pWindow->ShowWindow();
249 }
250 if( event.Type == UIEVENT_KILLFOCUS && IsEnabled() )
251 {
252 Invalidate();
253 }
254 if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK || event.Type == UIEVENT_RBUTTONDOWN)
255 {
256 if( IsEnabled() ) {
257 GetManager()->ReleaseCapture();
258 if( IsFocused() && m_pWindow == NULL )
259 {
260 m_pWindow = new CDateTimeWnd();
261 ASSERT(m_pWindow);
262 }
263 if( m_pWindow != NULL )
264 {
265 m_pWindow->Init(this);
266 m_pWindow->ShowWindow();
267 }
268 }
269 return;
270 }
271 if( event.Type == UIEVENT_MOUSEMOVE )
272 {
273 return;
274 }
275 if( event.Type == UIEVENT_BUTTONUP )
276 {
277 return;
278 }

Callers

nothing calls this directly

Calls 4

SetFocusNeededMethod · 0.80
ShowWindowMethod · 0.80
ReleaseCaptureMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected