mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 03:29:58 +02:00
[poincare] Clean EmptyLayout
Change-Id: I880a66c79c440912ff6bbcc86c6f22d3bdb8a5ad
This commit is contained in:
@@ -45,15 +45,9 @@ ExpressionLayoutCursor EmptyLayout::cursorRightOf(ExpressionLayoutCursor cursor,
|
||||
return ExpressionLayoutCursor();
|
||||
}
|
||||
|
||||
ExpressionLayoutCursor EmptyLayout::cursorAbove(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited) {
|
||||
return cursorVerticalOf(VerticalDirection::Up, cursor, shouldRecomputeLayout, equivalentPositionVisited);
|
||||
}
|
||||
|
||||
ExpressionLayoutCursor EmptyLayout::cursorUnder(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited) {
|
||||
return cursorVerticalOf(VerticalDirection::Down, cursor, shouldRecomputeLayout, equivalentPositionVisited);
|
||||
}
|
||||
|
||||
ExpressionLayoutCursor EmptyLayout::cursorVerticalOf(VerticalDirection direction, ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited) {
|
||||
/* The two cursor positions around an EmptyLayout are equivalent, so both
|
||||
* should be checked. */
|
||||
assert(cursor.pointedExpressionLayout() == this);
|
||||
ExpressionLayoutCursor cursorResult = direction == VerticalDirection::Up ?
|
||||
ExpressionLayout::cursorAbove(cursor, shouldRecomputeLayout, equivalentPositionVisited) :
|
||||
|
||||
@@ -17,8 +17,6 @@ public:
|
||||
void deleteBeforeCursor(ExpressionLayoutCursor * cursor) override;
|
||||
ExpressionLayoutCursor cursorLeftOf(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout) override;
|
||||
ExpressionLayoutCursor cursorRightOf(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout) override;
|
||||
ExpressionLayoutCursor cursorAbove(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited = false) override;
|
||||
ExpressionLayoutCursor cursorUnder(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited = false) override;
|
||||
int writeTextInBuffer(char * buffer, int bufferSize, int numberOfSignificantDigits = PrintFloat::k_numberOfStoredSignificantDigits) const override;
|
||||
bool isEmpty() const override { return true; }
|
||||
Color color() const { return m_color; }
|
||||
@@ -40,7 +38,7 @@ private:
|
||||
constexpr static KDCoordinate k_marginWidth = 1;
|
||||
constexpr static KDCoordinate k_marginHeight = 3;
|
||||
constexpr static KDCoordinate k_lineThickness = 1;
|
||||
ExpressionLayoutCursor cursorVerticalOf(VerticalDirection direction, ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited);
|
||||
ExpressionLayoutCursor cursorVerticalOf(VerticalDirection direction, ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited) override;
|
||||
bool m_isVisible;
|
||||
Color m_color;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user