mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
24 lines
770 B
C++
24 lines
770 B
C++
#ifndef SHARED_ZOOM_AND_PAN_CURVE_VIEW_CONTROLLER_H
|
|
#define SHARED_ZOOM_AND_PAN_CURVE_VIEW_CONTROLLER_H
|
|
|
|
#include "zoom_curve_view_controller.h"
|
|
|
|
namespace Shared {
|
|
|
|
/* ZoomAndPanCurveViewController is a View controller with a cursor that can
|
|
* handles zoom in/out and directional pan events. */
|
|
|
|
class ZoomAndPanCurveViewController : public ZoomCurveViewController {
|
|
public:
|
|
ZoomAndPanCurveViewController(Responder * parentResponder) : ZoomCurveViewController(parentResponder) {}
|
|
bool handleEvent(Ion::Events::Event event) override;
|
|
protected:
|
|
virtual bool handlePan(Ion::Events::Event event);
|
|
float xFocus() override { return interactiveCurveViewRange()->xCenter(); }
|
|
float yFocus() override { return interactiveCurveViewRange()->yCenter(); }
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|