Files
Upsilon/apps/shared/function_title_cell.h
Émilie Feral ad61215cca [apps/shared] Move apps/graph/function_title_cell to shared folder to be
used by sequence

Change-Id: I2dad6b5d2a3e2a0b7d11ab9e212cb3cca315940f
2017-02-13 17:15:07 +01:00

32 lines
813 B
C++

#ifndef SEQUENCE_FUNCTION_TITLE_CELL_H
#define SEQUENCE_FUNCTION_TITLE_CELL_H
#include <escher.h>
namespace Shared {
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