63 bool hitTest (
int x,
int y)
override;
64 void visibilityChanged()
override;
73 void mouseHovered (
int mouseX,
int mouseY)
override;
74 void mouseMovedAfterHover()
override;
82 float valueToY (
float val)
const;
83 float yToValue (
double y)
const;
87 void selectableObjectChanged (
Selectable*)
override;
88 void selectableObjectAboutToBeDeleted (
Selectable*)
override;
91 void updateLineThickness();
93 Edit& getEdit()
const;
94 virtual Track* getTrack() {
return {}; }
100 virtual float getPointValue (
int idx) = 0;
101 virtual float getPointCurve (
int idx) = 0;
102 virtual void removePoint (
int index) = 0;
104 virtual int getNumPoints() = 0;
105 virtual CurvePoint getBezierHandle (
int idx) = 0;
106 virtual CurvePoint getBezierPoint (
int idx) = 0;
108 virtual void getBezierEnds (
int index,
double& x1out,
float& y1out,
double& x2out,
float& y2out) = 0;
109 virtual int movePoint (
int index,
TimePosition newTime,
float newValue,
bool removeInterveningPoints) = 0;
110 virtual void setValueWhenNoPoints (
float value) = 0;
112 virtual int curvePoint (
int index,
float newCurve) = 0;
114 virtual int getCurveNameOffset() = 0;
116 virtual bool isShowingCurve()
const = 0;
117 virtual void updateFromTrack() = 0;
124 virtual juce::Colour getCurveNameTextBackgroundColour()
const = 0;
127 void selectPoint (
int pointIdx,
bool addToSelection);
131 virtual void showBubbleForPointUnderMouse() = 0;
132 virtual void hideBubble() = 0;
134 virtual void nonRealTimeDragStart() {}
135 virtual void nonRealTimeDragEnd() {}
137 bool isPointSelected (
int idx);
138 bool areAnyPointsSelected();
141 static constexpr const float pointRadius = 5.0f;
146 float parameterMinValue = 0, parameterRange = 1.0f;
148 int firstIndexOnScreen = 0;
149 int pointUnderMouse = -1, pointBeingMoved = -1;
150 int curveUnderMouse = -1, lineUnderMouse = -1;
151 bool dragged =
false, movingAllPoints =
false;
153 float mouseDownValue = 0;
154 bool isCurveSelected =
false;
155 float mouseDownCurve = 0;
156 float point1 = 0, point2 = 0;
157 bool realTimeDrag =
true;
158 float defaultCurve = 0;
159 float lineThickness = 1.0f;