Files
Upsilon/apps/shared/sequence_title_cell.h
Arthur Camouseigt 3dca515441 [VariableBox] Added sequences to the variable box
It is now possible to call the value of a defined sequence anywhere.

Change-Id: I1990e93c50f9add175b7ea274e07004ba63289e5
2020-11-04 15:32:58 +01:00

37 lines
1.2 KiB
C++

#ifndef APPS_SHARED_SEQUENCE_TITLE_CELL_H
#define APPS_SHARED_SEQUENCE_TITLE_CELL_H
#include "../shared/function_title_cell.h"
#include <poincare_layouts.h>
namespace Shared {
class SequenceTitleCell : public Shared::FunctionTitleCell {
public:
SequenceTitleCell();
void setLayout(Poincare::Layout layout);
void setEven(bool even) override;
void setHighlighted(bool highlight) override;
void setColor(KDColor color) override;
void setOrientation(Orientation orientation) override;
const KDFont * font() const override {
return Poincare::CodePointLayoutNode::k_defaultFont;
}
Poincare::Layout layout() const override {
return m_titleTextView.layout();
}
void reloadCell() override;
private:
static constexpr float k_horizontalOrientationAlignment = 0.5f;
static constexpr float k_verticalOrientationHorizontalAlignment = 0.9f;
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews(bool force = false) override;
float verticalAlignmentGivenExpressionBaselineAndRowHeight(KDCoordinate expressionBaseline, KDCoordinate rowHeight) const override;
EvenOddExpressionCell m_titleTextView;
};
}
#endif