Numworks Epsilon  1.4.1
Graphing Calculator Operating System
Graph::GraphView Class Reference

#include <graph_view.h>

Inheritance diagram for Graph::GraphView:
Shared::FunctionGraphView Shared::CurveView View

Public Member Functions

 GraphView (CartesianFunctionStore *functionStore, Shared::InteractiveCurveViewRange *graphRange, Shared::CurveViewCursor *cursor, Shared::BannerView *bannerView, View *cursorView)
 
void reload () override
 
void drawRect (KDContext *ctx, KDRect rect) const override
 
void drawTangent (bool tangent)
 
void setAreaHighlightColor (bool highlightColor) override
 
- Public Member Functions inherited from Shared::FunctionGraphView
 FunctionGraphView (InteractiveCurveViewRange *graphRange, CurveViewCursor *cursor, BannerView *bannerView, View *cursorView)
 
void drawRect (KDContext *ctx, KDRect rect) const override
 
void setContext (Poincare::Context *context)
 
Poincare::Contextcontext () const
 
void selectFunction (Function *function)
 
void setAreaHighlight (float start, float end)
 
- Public Member Functions inherited from Shared::CurveView
 CurveView (CurveViewRange *curveViewRange=nullptr, CurveViewCursor *curveViewCursor=nullptr, BannerView *bannerView=nullptr, View *cursorView=nullptr, View *okView=nullptr)
 
bool isMainViewSelected () const
 
void selectMainView (bool mainViewSelected)
 
void setCursorView (View *cursorView)
 
void setBannerView (View *bannerView)
 
void setOkView (View *okView)
 
float resolution () const
 
- Public Member Functions inherited from View
 View ()
 
virtual ~View ()
 
 View (const View &other)=delete
 
 View (View &&other)=delete
 
Viewoperator= (const View &other)=delete
 
Viewoperator= (View &&other)=delete
 
void resetSuperview ()
 
void setSize (KDSize size)
 
void setFrame (KDRect frame)
 
KDPoint pointFromPointInView (View *view, KDPoint point)
 
KDRect bounds () const
 
Viewsubview (int index)
 
virtual KDSize minimalSizeForOptimalDisplay () const
 

Additional Inherited Members

- Public Types inherited from Shared::CurveView
enum  Axis { Axis::Horizontal = 0, Axis::Vertical = 1 }
 
typedef float(* EvaluateModelWithParameter) (float t, void *model, void *context)
 
- Protected Member Functions inherited from Shared::FunctionGraphView
void reloadBetweenBounds (float start, float end)
 
- Protected Member Functions inherited from Shared::CurveView
void setCurveViewRange (CurveViewRange *curveViewRange)
 
virtual float samplingRatio () const
 
float pixelToFloat (Axis axis, KDCoordinate p) const
 
float floatToPixel (Axis axis, float f) const
 
void drawLine (KDContext *ctx, KDRect rect, Axis axis, float coordinate, KDColor color, KDCoordinate thickness=1) const
 
void drawSegment (KDContext *ctx, KDRect rect, Axis axis, float coordinate, float lowerBound, float upperBound, KDColor color, KDCoordinate thickness=1) const
 
void drawDot (KDContext *ctx, KDRect rect, float x, float y, KDColor color, bool oversize=false) const
 
void drawGridLines (KDContext *ctx, KDRect rect, Axis axis, float step, KDColor color) const
 
void drawGrid (KDContext *ctx, KDRect rect) const
 
void drawAxes (KDContext *ctx, KDRect rect, Axis axis) const
 
void drawCurve (KDContext *ctx, KDRect rect, EvaluateModelWithParameter evaluation, void *model, void *context, KDColor color, bool colorUnderCurve=false, float colorLowerBound=0.0f, float colorUpperBound=0.0f, bool continuously=false) const
 
void drawHistogram (KDContext *ctx, KDRect rect, EvaluateModelWithParameter evaluation, void *model, void *context, float firstBarAbscissa, float barWidth, bool fillBar, KDColor defaultColor, KDColor highlightColor, float highlightLowerBound=INFINITY, float highlightUpperBound=-INFINITY) const
 
void computeLabels (Axis axis)
 
void drawLabels (KDContext *ctx, KDRect rect, Axis axis, bool shiftOrigin) const
 
- Protected Member Functions inherited from View
void markRectAsDirty (KDRect rect)
 
- Protected Attributes inherited from Shared::FunctionGraphView
Functionm_selectedFunction
 
float m_highlightedStart
 
float m_highlightedEnd
 
bool m_shouldColorHighlighted
 
- Protected Attributes inherited from Shared::CurveView
Viewm_bannerView
 
CurveViewCursorm_curveViewCursor
 
- Protected Attributes inherited from View
KDRect m_frame
 
- Static Protected Attributes inherited from Shared::CurveView
static constexpr KDCoordinate k_labelMargin = 4
 
static constexpr KDCoordinate k_okMargin = 10
 
static constexpr KDCoordinate k_labelGraduationLength = 6
 
static constexpr int k_maxNumberOfXLabels = CurveViewRange::k_maxNumberOfXGridUnits
 
static constexpr int k_maxNumberOfYLabels = CurveViewRange::k_maxNumberOfYGridUnits
 
static constexpr int k_externRectMargin = 2
 

Detailed Description

Definition at line 9 of file graph_view.h.

Constructor & Destructor Documentation

◆ GraphView()

Graph::GraphView::GraphView ( CartesianFunctionStore functionStore,
Shared::InteractiveCurveViewRange graphRange,
Shared::CurveViewCursor cursor,
Shared::BannerView bannerView,
View cursorView 
)

Member Function Documentation

◆ drawRect()

void Graph::GraphView::drawRect ( KDContext ctx,
KDRect  rect 
) const
overridevirtual

Reimplemented from View.

Definition at line 24 of file graph_view.cpp.

◆ drawTangent()

void Graph::GraphView::drawTangent ( bool  tangent)
inline

Definition at line 16 of file graph_view.h.

◆ reload()

void Graph::GraphView::reload ( )
overridevirtual

Reimplemented from Shared::CurveView.

Definition at line 16 of file graph_view.cpp.

◆ setAreaHighlightColor()

void Graph::GraphView::setAreaHighlightColor ( bool  highlightColor)
inlineoverridevirtual

Reimplemented from Shared::FunctionGraphView.

Definition at line 21 of file graph_view.h.


The documentation for this class was generated from the following files: