mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 10:09:53 +01:00
[escher] Only one app is on the heap at one time
Change-Id: I6c77601cb0cc883083a4dd05370ca543fa7951cc
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "app.h"
|
||||
#include "../apps_container.h"
|
||||
#include "calculation_icon.h"
|
||||
#include "../i18n.h"
|
||||
using namespace Poincare;
|
||||
@@ -7,15 +8,35 @@ using namespace Shared;
|
||||
|
||||
namespace Calculation {
|
||||
|
||||
App::App(Container * container, Context * context) :
|
||||
TextFieldDelegateApp(container, &m_editExpressionController, I18n::Message::CalculApp, I18n::Message::CalculAppCapital, ImageStore::CalculationIcon),
|
||||
m_localContext((GlobalContext *)context, &m_calculationStore),
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user