Files
Upsilon/apps/graph/function_title_cell.h
Émilie Feral b56d88cefa [apps/graph] make the function title cells consistent
Change-Id: Ib59f3d5f8a679cddd8a88e16711138425a6e9ecb
2016-10-25 17:55:28 +02:00

33 lines
807 B
C++

#ifndef GRAPH_FUNCTION_TITLE_CELL_H
#define GRAPH_FUNCTION_TITLE_CELL_H
#include <escher.h>
#include "even_odd_cell.h"
namespace Graph {
class FunctionTitleCell : public EvenOddCell {
public:
enum class Orientation {
HorizontalIndicator,
VerticalIndicator
};
FunctionTitleCell();
void setColor(KDColor color);
void setOrientation(Orientation orientation);
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