mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/sequence] Create a class curve view range
Change-Id: I72786a6efb6379604634abae63eb93ba758691a4
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
app_objs += $(addprefix apps/sequence/,\
|
||||
app.o\
|
||||
graph/banner_view.o\
|
||||
graph/curve_view_range.o\
|
||||
graph/graph_view.o\
|
||||
list/list_controller.o\
|
||||
list/list_parameter_controller.o\
|
||||
|
||||
20
apps/sequence/graph/curve_view_range.cpp
Normal file
20
apps/sequence/graph/curve_view_range.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "curve_view_range.h"
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
namespace Sequence {
|
||||
|
||||
CurveViewRange::CurveViewRange(CurveViewCursor * cursor, InteractiveCurveViewRangeDelegate * delegate) :
|
||||
InteractiveCurveViewRange(cursor, delegate)
|
||||
{
|
||||
m_xMin = -k_displayLeftMarginRatio*m_xMax;
|
||||
}
|
||||
|
||||
void CurveViewRange::setDefault() {
|
||||
m_xMax = 10.0f;
|
||||
m_xMin = -k_displayLeftMarginRatio*m_xMax;
|
||||
m_xGridUnit = computeGridUnit(Axis::X, m_xMin, m_xMax);
|
||||
setYAuto(true);
|
||||
}
|
||||
|
||||
}
|
||||
18
apps/sequence/graph/curve_view_range.h
Normal file
18
apps/sequence/graph/curve_view_range.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef SEQUENCE_CURVE_VIEW_RANGE_H
|
||||
#define SEQUENCE_CURVE_VIEW_RANGE_H
|
||||
|
||||
#include "../../shared/interactive_curve_view_range.h"
|
||||
|
||||
namespace Sequence {
|
||||
|
||||
class CurveViewRange : public Shared::InteractiveCurveViewRange {
|
||||
public:
|
||||
CurveViewRange(Shared::CurveViewCursor * cursor, Shared::InteractiveCurveViewRangeDelegate * delegate);
|
||||
void setDefault() override;
|
||||
private:
|
||||
constexpr static float k_displayLeftMarginRatio = 0.05f;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user