Files
Upsilon/apps/shared/function_title_cell.h
Émilie Feral f76b603c67 [apps/sequence] Create a class sequence title cell
Change-Id: I2a891e6a47ec742cedfa6780ee1a50eb3df24085
2017-02-13 17:15:08 +01:00

34 lines
884 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 setEven(bool even) override;
void setHighlighted(bool highlight) override;
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
protected:
constexpr static KDCoordinate k_colorIndicatorThickness = 2;
EvenOddBufferTextCell m_bufferTextView;
private:
KDColor m_functionColor;
Orientation m_orientation;
};
}
#endif