Files
Upsilon/apps/expression_editor/expression_editor_view.h
Léa Saviot 332cfb013f [ExpressionEditor] TextView to see serialization results.
Just for development purposes.

Change-Id: I8700818a8d5705e2c610bd448fbcc2deea6b9971
2018-01-15 11:58:04 +01:00

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