Numworks Epsilon  1.4.1
Graphing Calculator Operating System
history_view_cell.h
Go to the documentation of this file.
1 #ifndef CALCULATION_HISTORY_VIEW_CELL_H
2 #define CALCULATION_HISTORY_VIEW_CELL_H
3 
4 #include <escher.h>
5 #include "calculation.h"
8 
9 namespace Calculation {
10 
11 class HistoryViewCell : public ::EvenOddCell, public Responder {
12 public:
13  enum class SubviewType {
14  Input,
15  Output
16  };
18  void reloadCell() override;
19  void reloadScroll();
20  void setEven(bool even) override;
21  void setHighlighted(bool highlight) override;
22  Responder * responder() override {
23  return this;
24  }
25  KDColor backgroundColor() const override;
26  void setCalculation(Calculation * calculation);
27  int numberOfSubviews() const override;
28  View * subviewAtIndex(int index) override;
29  void layoutSubviews() override;
30  void didBecomeFirstResponder() override;
31  bool handleEvent(Ion::Events::Event event) override;
32  constexpr static KDCoordinate k_digitVerticalMargin = 5;
36 private:
37  constexpr static KDCoordinate k_resultWidth = 80;
38  ScrollableExpressionView m_inputView;
39  ScrollableOutputExpressionsView m_scrollableOutputView;
40  SubviewType m_selectedSubviewType;
41 };
42 
43 }
44 
45 #endif
void setCalculation(Calculation *calculation)
int16_t KDCoordinate
Definition: coordinate.h:6
KDColor backgroundColor() const override
void setHighlighted(bool highlight) override
Responder * parentResponder() const
Definition: responder.cpp:12
void setSelectedSubviewType(HistoryViewCell::SubviewType subviewType)
HistoryViewCell(Responder *parentResponder)
static constexpr KDCoordinate k_digitVerticalMargin
bool handleEvent(Ion::Events::Event event) override
Definition: color.h:6
Responder * responder() override
View * subviewAtIndex(int index) override
Definition: view.h:23
OutputExpressionsView * outputView()
int numberOfSubviews() const override
void setEven(bool even) override