MCPcopy Create free account
hub / github.com/cmauri/eviacam / NotifyButtonClick

Method NotifyButtonClick

src/clickwindowcontroller.cpp:359–385  ·  view source on GitHub ↗

Called from window. Notifies that button has been clicked.

Source from the content-addressed store, hash-verified

357
358// Called from window. Notifies that button has been clicked.
359void CClickWindowController::NotifyButtonClick (CClickWindowController::EButton button)
360{
361 if (m_enabled)
362 {
363 if (button== CClickWindowController::NO_CLICK)
364 // Disable click
365 m_enabled= false;
366 else
367 {
368 if (m_fastMode || (m_currentButton!= m_lockedButton && button== m_currentButton))
369 m_lockedButton= button;
370 m_currentButton= button;
371 }
372
373 m_pWindow->UpdateButtons(GetEnabled(),GetCurrentButton(), GetLockedButton());
374 }
375 else
376 {
377 // Disabled state. Only handle NO_CLICK button
378 if (button== CClickWindowController::NO_CLICK)
379 {
380 m_enabled= true;
381
382 m_pWindow->UpdateButtons(GetEnabled(),GetCurrentButton(), GetLockedButton());
383 }
384 }
385}
386
387// Called from window. Notifies that button has been entered
388void CClickWindowController::NotifyButtonEnter (CClickWindowController::EButton button)

Callers 1

OnLeftUpMethod · 0.80

Calls 1

UpdateButtonsMethod · 0.45

Tested by

no test coverage detected