mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
20 lines
774 B
C++
20 lines
774 B
C++
#include <escher/input_event_handler.h>
|
|
#include <escher/input_event_handler_delegate.h>
|
|
#include <escher/container.h>
|
|
#include <escher/toolbox.h>
|
|
#include <escher/metric.h>
|
|
|
|
bool InputEventHandler::handleBoxEvent(Ion::Events::Event event) {
|
|
NestedMenuController * box = nullptr;
|
|
if (m_inputEventHandlerDelegate) {
|
|
box = event == Ion::Events::Toolbox ? m_inputEventHandlerDelegate->toolboxForInputEventHandler(this) : box;
|
|
box = event == Ion::Events::Var ? m_inputEventHandlerDelegate->variableBoxForInputEventHandler(this) : box;
|
|
}
|
|
if (box) {
|
|
box->setSender(this);
|
|
Container::activeApp()->displayModalViewController(box, 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|