mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
35 lines
616 B
C++
35 lines
616 B
C++
#include "apps_container.h"
|
|
|
|
AppsContainer::AppsContainer() :
|
|
Container()
|
|
{
|
|
}
|
|
|
|
bool AppsContainer::handleEvent(ion_event_t event) {
|
|
if (event == F1) {
|
|
#if USE_PIC_VIEW_APP
|
|
if (activeApp() == &m_picViewApp) {
|
|
Container::switchTo(&m_graphApp);
|
|
} else {
|
|
Container::switchTo(&m_picViewApp);
|
|
}
|
|
#endif
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void AppsContainer::switchTo(AppId appId) {
|
|
Container::switchTo(appWithId(appId));
|
|
}
|
|
|
|
App * AppsContainer::appWithId(AppId appId) {
|
|
App * apps[] = {
|
|
&m_graphApp
|
|
#if USE_PIC_VIEW_APP
|
|
, &m_picViewApp
|
|
#endif
|
|
};
|
|
return apps[(int)appId];
|
|
};
|