Files
Upsilon/apps/graph/graph/preimage_parameter_controller.h
Hugo Saint-Vignes 5c75cc55d3 [apps/shared] Apply changes on confirm with GoTo functions
Change-Id: I6ebec412b4b6612710476274a8665375d21f9ef8
2020-07-29 10:07:07 +02:00

35 lines
1.1 KiB
C++

#ifndef GRAPH_PREIMAGE_PARAMETER_CONTROLLER
#define GRAPH_PREIMAGE_PARAMETER_CONTROLLER
#include "../../shared/go_to_parameter_controller.h"
#include "preimage_graph_controller.h"
namespace Graph {
class PreimageParameterController : public Shared::GoToParameterController {
public:
PreimageParameterController(
Responder * parentResponder,
InputEventHandlerDelegate * inputEventHandlerDelegate,
Shared::InteractiveCurveViewRange * graphRange,
Shared::CurveViewCursor * cursor,
PreimageGraphController * preimageGraphController
);
const char * title() override { return I18n::translate(I18n::Message::Preimage); }
void setRecord(Ion::Storage::Record record) { m_record = record; }
void viewWillAppear() override;
private:
void buttonAction() override;
double extractParameterAtIndex(int index) override {
assert(index == 0);
return m_preimageGraphController->image();
}
bool confirmParameterAtIndex(int parameterIndex, double f) override;
Ion::Storage::Record m_record;
PreimageGraphController * m_preimageGraphController;
};
}
#endif