Files
Upsilon/apps/shared/function_app.h
Émilie Feral 71608762aa [escher] Add a data source to tab to be hold by snapshots
Change-Id: I48b242ff433170d6b9618661e613a47669910a79
2017-05-19 11:25:04 +02:00

40 lines
913 B
C++

#ifndef SHARED_FUNCTION_APP_H
#define SHARED_FUNCTION_APP_H
#include <poincare.h>
#include "text_field_delegate_app.h"
#include "curve_view_cursor.h"
#include "interval.h"
class AppsContainer;
namespace Shared {
class FunctionApp : public TextFieldDelegateApp {
public:
class Snapshot : public ::App::Snapshot, public TabViewDataSource {
public:
Snapshot();
CurveViewCursor * cursor();
uint32_t * modelVersion();
uint32_t * rangeVersion();
Interval * interval();
void reset() override;
protected:
CurveViewCursor m_cursor;
Interval m_interval;
private:
uint32_t m_modelVersion;
uint32_t m_rangeVersion;
};
virtual ~FunctionApp() = default;
virtual InputViewController * inputViewController() = 0;
void willBecomeInactive() override;
protected:
FunctionApp(Container * container, Snapshot * snapshot, ViewController * rootViewController);
};
}
#endif