mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 23:30:37 +01:00
29 lines
1011 B
C++
29 lines
1011 B
C++
#ifndef EXPRESSION_EDITOR_EXPRESSION_EDITOR_VIEW_H
|
|
#define EXPRESSION_EDITOR_EXPRESSION_EDITOR_VIEW_H
|
|
|
|
#include <escher.h>
|
|
#include "expression_and_layout.h"
|
|
#include "scrollable_expression_view_with_cursor.h"
|
|
|
|
namespace ExpressionEditor {
|
|
|
|
class ExpressionEditorView : public SolidColorView {
|
|
public:
|
|
ExpressionEditorView(Responder * parentResponder, Poincare::ExpressionLayout * expressionLayout, Poincare::ExpressionLayoutCursor * cursor);
|
|
void cursorPositionChanged();
|
|
void setText(const char * text);
|
|
int numberOfSubviews() const override { return 2; }
|
|
ScrollableExpressionViewWithCursor * scrollableExpressionViewWithCursor() { return &m_scrollableExpressionViewWithCursor; }
|
|
View * subviewAtIndex(int index) override;
|
|
void layoutSubviews() override;
|
|
KDSize minimalSizeForOptimalDisplay() const override;
|
|
private:
|
|
constexpr static KDCoordinate k_margin = 10;
|
|
ScrollableExpressionViewWithCursor m_scrollableExpressionViewWithCursor;
|
|
BufferTextView m_serializerTextView;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|