Numworks Epsilon  1.4.1
Graphing Calculator Operating System
interactive_curve_view_range.h
Go to the documentation of this file.
1 #ifndef SHARED_INTERACTIVE_CURVE_VIEW_RANGE_H
2 #define SHARED_INTERACTIVE_CURVE_VIEW_RANGE_H
3 
4 #include <stdint.h>
6 #include "curve_view_cursor.h"
8 
9 namespace Shared {
10 
12 public:
15  void setCursor(CurveViewCursor * cursor);
16  uint32_t rangeChecksum() override;
17 
18  //CurveViewWindow
19  bool yAuto();
20  void setXMin(float f) override;
21  void setXMax(float f) override;
22  void setYMin(float f) override;
23  void setYMax(float f) override;
24  void setYAuto(bool yAuto);
25 
26  // Window
27  void zoom(float ratio, float x, float y);
28  void panWithVector(float x, float y);
29  virtual void roundAbscissa();
30  virtual void normalize();
31  virtual void setTrigonometric();
32  virtual void setDefault();
33  void centerAxisAround(Axis axis, float position);
34  void panToMakePointVisible(float x, float y, float topMarginRatio, float rightMarginRatio, float bottomMarginRation, float leftMarginRation);
35  bool isCursorVisible(float topMarginRatio, float rightMarginRatio, float bottomMarginRation, float leftMarginRation);
36 protected:
37  bool m_yAuto;
38  static float clipped(float f, bool isMax);
40 private:
41  constexpr static float k_minFloat = 1E-8f;
42  constexpr static float k_upperMaxFloat = 1E+8f;
43  constexpr static float k_lowerMaxFloat = 9E+7f;
44  constexpr static float k_maxRatioPositionRange = 1E5f;
45  CurveViewCursor * m_cursor;
46 };
47 
51 
52 }
53 
54 #endif
InteractiveCurveViewRangeDelegate * m_delegate
void zoom(float ratio, float x, float y)
unsigned int uint32_t
Definition: stdint.h:6
void(InteractiveCurveViewRange::* RangeMethodPointer)()
bool isCursorVisible(float topMarginRatio, float rightMarginRatio, float bottomMarginRation, float leftMarginRation)
float(InteractiveCurveViewRange::* ParameterGetterPointer)()
void panToMakePointVisible(float x, float y, float topMarginRatio, float rightMarginRatio, float bottomMarginRation, float leftMarginRation)
InteractiveCurveViewRange(CurveViewCursor *cursor, InteractiveCurveViewRangeDelegate *delegate=nullptr)
void(InteractiveCurveViewRange::* ParameterSetterPointer)(float)
void centerAxisAround(Axis axis, float position)
void setDelegate(InteractiveCurveViewRangeDelegate *delegate)
static float clipped(float f, bool isMax)