mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Graph: all contexts parse x now so no need for a specific one in
graph
This commit is contained in:
@@ -57,7 +57,6 @@ void App::Snapshot::tidy() {
|
||||
|
||||
App::App(Container * container, Snapshot * snapshot) :
|
||||
FunctionApp(container, snapshot, &m_inputViewController),
|
||||
m_xContext('x',((AppsContainer *)container)->globalContext()),
|
||||
m_listController(&m_listFooter, snapshot->functionStore(), &m_listHeader, &m_listFooter),
|
||||
m_listFooter(&m_listHeader, &m_listController, &m_listController, ButtonRowController::Position::Bottom, ButtonRowController::Style::EmbossedGrey),
|
||||
m_listHeader(&m_listStackViewController, &m_listFooter, &m_listController),
|
||||
@@ -79,13 +78,6 @@ InputViewController * App::inputViewController() {
|
||||
return &m_inputViewController;
|
||||
}
|
||||
|
||||
Context * App::localContext() {
|
||||
if (m_tabViewController.activeTab() == 0) {
|
||||
return &m_xContext;
|
||||
}
|
||||
return TextFieldDelegateApp::localContext();
|
||||
}
|
||||
|
||||
const char * App::XNT() {
|
||||
return "x";
|
||||
}
|
||||
|
||||
@@ -33,15 +33,9 @@ public:
|
||||
Shared::InteractiveCurveViewRange m_graphRange;
|
||||
};
|
||||
InputViewController * inputViewController() override;
|
||||
/* This local context can parse x. However, it always stores NAN
|
||||
* as x value. When we need to evaluate expression with a specific x value, we
|
||||
* use a temporary local context (on the stack). That way, we avoid keeping
|
||||
* weird x values after drawing curves or displaying the value table. */
|
||||
Poincare::Context * localContext() override;
|
||||
const char * XNT() override;
|
||||
private:
|
||||
App(Container * container, Snapshot * snapshot);
|
||||
Poincare::VariableContext<float> m_xContext;
|
||||
ListController m_listController;
|
||||
ButtonRowController m_listFooter;
|
||||
ButtonRowController m_listHeader;
|
||||
|
||||
Reference in New Issue
Block a user