Files
Upsilon/apps/graph/graph/graph_controller.h
Ruben Dashyan e7add02912 [apps] Remove FunctionGraphController::cursorView() virtual method
It was implemented by the Graph and Sequence GraphController derived
classes and was used
  1) in FunctionGraphController::viewWillAppear to set the cursorView
specific to each derived class,
  2) in FunctionGraphController::cursor/displayBottomMarginRatio()
methods.

Instead
  1) the viewWillAppear method of each derived classes sets its
cursorView itself
  2) one may already get the cursorView through curveView().
2019-05-03 15:54:21 +02:00

45 lines
2.0 KiB
C++

#ifndef GRAPH_GRAPH_CONTROLLER_H
#define GRAPH_GRAPH_CONTROLLER_H
#include "graph_view.h"
#include "graph_controller_helper.h"
#include "banner_view.h"
#include "curve_parameter_controller.h"
#include "../../shared/function_graph_controller.h"
#include "../../shared/curve_view_cursor.h"
#include "../../shared/round_cursor_view.h"
#include "../../shared/interactive_curve_view_range.h"
#include "../cartesian_function_store.h"
namespace Graph {
class GraphController : public Shared::FunctionGraphController, public GraphControllerHelper {
public:
GraphController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, CartesianFunctionStore * functionStore, Shared::InteractiveCurveViewRange * curveViewRange, Shared::CurveViewCursor * cursor, int * indexFunctionSelectedByCursor, uint32_t * modelVersion, uint32_t * rangeVersion, Poincare::Preferences::AngleUnit * angleUnitVersion, ButtonRowController * header);
I18n::Message emptyMessage() override;
void viewWillAppear() override;
bool displayDerivativeInBanner() const;
void setDisplayDerivativeInBanner(bool displayDerivative);
float interestingXHalfRange() const override;
private:
int estimatedBannerNumberOfLines() const override;
void selectFunctionWithCursor(int functionIndex) override;
BannerView * bannerView() override;
void reloadBannerView() override;
bool moveCursorHorizontally(int direction) override;
Shared::InteractiveCurveViewRange * interactiveCurveViewRange() override;
GraphView * functionGraphView() override;
CurveParameterController * curveParameterController() override;
CartesianFunctionStore * functionStore() const override { return static_cast<CartesianFunctionStore *>(Shared::FunctionGraphController::functionStore()); }
Shared::RoundCursorView m_cursorView;
BannerView m_bannerView;
GraphView m_view;
Shared::InteractiveCurveViewRange * m_graphRange;
CurveParameterController m_curveParameterController;
bool m_displayDerivativeInBanner;
};
}
#endif