mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 01:59:59 +01:00
Additional checks have been added to ensure that the first move of the cursor from the center of the graph would not cause the window to pan up or down. Change-Id: I44d7e86223941076cbf03db7a221e9c0427a64e4
30 lines
860 B
C++
30 lines
860 B
C++
#ifndef SHARED_INTERACTIVE_CURVE_VIEW_DELEGATE_H
|
|
#define SHARED_INTERACTIVE_CURVE_VIEW_DELEGATE_H
|
|
|
|
#include <assert.h>
|
|
|
|
namespace Shared {
|
|
|
|
class InteractiveCurveViewRange;
|
|
|
|
class InteractiveCurveViewRangeDelegate {
|
|
public:
|
|
bool didChangeRange(InteractiveCurveViewRange * interactiveCurveViewRange);
|
|
virtual float interestingXMin() const { return -interestingXHalfRange(); }
|
|
virtual float interestingXHalfRange() const { return 10.0f; }
|
|
virtual bool defaultRangeIsNormalized() const { return false; }
|
|
virtual void interestingRanges(InteractiveCurveViewRange * range) const { assert(false); }
|
|
virtual float addMargin(float x, float range, bool isVertical, bool isMin) = 0;
|
|
protected:
|
|
struct Range {
|
|
float min;
|
|
float max;
|
|
};
|
|
private:
|
|
virtual Range computeYRange(InteractiveCurveViewRange * interactiveCurveViewRange) = 0;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|