Files
Upsilon/apps/graph/function_title_cell.h
Émilie Feral 7ca7bb2ebc [apps/graph] Fix bug: correct default font initialisation
Change-Id: Ie02912f8013a994de64fad58bbf8a9d1e2281aa5
2017-01-27 14:46:11 +01:00

31 lines
805 B
C++

#ifndef GRAPH_FUNCTION_TITLE_CELL_H
#define GRAPH_FUNCTION_TITLE_CELL_H
#include <escher.h>
namespace Graph {
class FunctionTitleCell : public EvenOddCell {
public:
enum class Orientation {
HorizontalIndicator,
VerticalIndicator
};
FunctionTitleCell(Orientation orientation, KDText::FontSize size = KDText::FontSize::Large);
void setColor(KDColor color);
void setText(const char * textContent);
void drawRect(KDContext * ctx, KDRect rect) const override;
void reloadCell() override;
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
private:
constexpr static KDCoordinate k_colorIndicatorThickness = 2;
KDColor m_functionColor;
BufferTextView m_bufferTextView;
Orientation m_orientation;
};
}
#endif