Files
Upsilon/apps/calculation/app.cpp
Émilie Feral 06de0dd9db [escher] Only one app is on the heap at one time
Change-Id: I6c77601cb0cc883083a4dd05370ca543fa7951cc
2017-05-18 14:16:41 +02:00

45 lines
1.1 KiB
C++

#include "app.h"
#include "../apps_container.h"
#include "calculation_icon.h"
#include "../i18n.h"
using namespace Poincare;
using namespace Shared;
namespace Calculation {
App * App::Descriptor::build(Container * container) {
return new App(container, this);
}
I18n::Message App::Descriptor::name() {
return I18n::Message::CalculApp;
}
I18n::Message App::Descriptor::upperName() {
return I18n::Message::CalculAppCapital;
}
const Image * App::Descriptor::icon() {
return ImageStore::CalculationIcon;
}
App::App(Container * container, Descriptor * descriptor) :
TextFieldDelegateApp(container, &m_editExpressionController, descriptor),
m_localContext((GlobalContext *)((AppsContainer *)container)->globalContext(), &m_calculationStore),
m_calculationStore(),
m_historyController(&m_editExpressionController, &m_calculationStore),
m_editExpressionController(&m_modalViewController, &m_historyController, &m_calculationStore)
{
}
App::App::Descriptor * App::buildDescriptor() {
return new App::Descriptor();
}
Context * App::localContext() {
return &m_localContext;
}
}