Files
Upsilon/python/port/mod/matplotlib/plot_controller.h
Émilie Feral fb3f6ab6f3 [apps/code][python] ConsoleController doesn't keep any pointer/boolean to know
if the sandbox/matplotlib view controller is displayed. Its state won't be
always right; instead, use the StackViewController depth.

This fixes the following bug: when popping the sandbox/matplotlib view
controller, the first responder token was not given to the console
controller!
2020-04-01 10:18:09 +02:00

28 lines
726 B
C++

#ifndef PYTHON_MATPLOTLIB_PLOT_CONTROLLER_H
#define PYTHON_MATPLOTLIB_PLOT_CONTROLLER_H
#include <apps/shared/zoom_and_pan_curve_view_controller.h>
#include "plot_view.h"
#include "plot_store.h"
namespace Matplotlib {
class PlotController : public Shared::ZoomAndPanCurveViewController {
public:
PlotController(PlotStore * store) : Shared::ZoomAndPanCurveViewController(nullptr), m_store(store), m_view(m_store) {}
void viewWillAppear() override;
void viewDidDisappear() override;
protected:
Shared::CurveView * curveView() override { return &m_view; }
Shared::InteractiveCurveViewRange * interactiveCurveViewRange() override { return m_store; }
private:
PlotStore * m_store;
PlotView m_view;
};
}
#endif