Numworks Epsilon  1.4.1
Graphing Calculator Operating System
Shared::FunctionGraphView Class Reference

#include <function_graph_view.h>

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

Public Member Functions

 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)
 
virtual void setAreaHighlightColor (bool highlightColor)
 
- Public Member Functions inherited from Shared::CurveView
 CurveView (CurveViewRange *curveViewRange=nullptr, CurveViewCursor *curveViewCursor=nullptr, BannerView *bannerView=nullptr, View *cursorView=nullptr, View *okView=nullptr)
 
virtual void reload ()
 
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
 

Protected Member Functions

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

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
 

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)
 
- 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 12 of file function_graph_view.h.

Constructor & Destructor Documentation

◆ FunctionGraphView()

Shared::FunctionGraphView::FunctionGraphView ( InteractiveCurveViewRange graphRange,
CurveViewCursor cursor,
BannerView bannerView,
View cursorView 
)

Definition at line 9 of file function_graph_view.cpp.

Member Function Documentation

◆ context()

Context * Shared::FunctionGraphView::context ( ) const

Definition at line 35 of file function_graph_view.cpp.

◆ drawRect()

void Shared::FunctionGraphView::drawRect ( KDContext ctx,
KDRect  rect 
) const
overridevirtual

Reimplemented from View.

Definition at line 22 of file function_graph_view.cpp.

◆ reloadBetweenBounds()

void Shared::FunctionGraphView::reloadBetweenBounds ( float  start,
float  end 
)
protected

Definition at line 76 of file function_graph_view.cpp.

◆ selectFunction()

void Shared::FunctionGraphView::selectFunction ( Function function)

Definition at line 39 of file function_graph_view.cpp.

◆ setAreaHighlight()

void Shared::FunctionGraphView::setAreaHighlight ( float  start,
float  end 
)

Definition at line 46 of file function_graph_view.cpp.

◆ setAreaHighlightColor()

void Shared::FunctionGraphView::setAreaHighlightColor ( bool  highlightColor)
virtual

Reimplemented in Graph::GraphView.

Definition at line 65 of file function_graph_view.cpp.

◆ setContext()

void Shared::FunctionGraphView::setContext ( Poincare::Context context)

Definition at line 31 of file function_graph_view.cpp.

Member Data Documentation

◆ m_highlightedEnd

float Shared::FunctionGraphView::m_highlightedEnd
protected

Definition at line 26 of file function_graph_view.h.

◆ m_highlightedStart

float Shared::FunctionGraphView::m_highlightedStart
protected

Definition at line 25 of file function_graph_view.h.

◆ m_selectedFunction

Function* Shared::FunctionGraphView::m_selectedFunction
protected

Definition at line 24 of file function_graph_view.h.

◆ m_shouldColorHighlighted

bool Shared::FunctionGraphView::m_shouldColorHighlighted
protected

Definition at line 27 of file function_graph_view.h.


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