[code] Create a PythonTextArea

This commit is contained in:
Romain Goyet
2018-06-01 17:25:57 +02:00
committed by EmilieNumworks
parent 9e4a1c7d54
commit 88e40266f6
6 changed files with 99 additions and 7 deletions

View File

@@ -2,13 +2,17 @@
#include <poincare.h>
#include <escher/app.h>
namespace Code {
/* EditorView */
constexpr KDText::FontSize editorFontSize = KDText::FontSize::Large;
EditorView::EditorView(Responder * parentResponder) :
Responder(parentResponder),
View(),
m_textArea(parentResponder),
m_gutterView(KDText::FontSize::Large)
m_textArea(parentResponder, editorFontSize),
m_gutterView(editorFontSize)
{
m_textArea.setScrollViewDelegate(this);
}
@@ -92,3 +96,5 @@ KDSize EditorView::GutterView::minimalSizeForOptimalDisplay() const {
int numberOfChars = 2; // TODO: Could be computed
return KDSize(2 * k_margin + numberOfChars * KDText::charSize(m_fontSize).width(), 0);
}
}