mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[code] Create a PythonTextArea
This commit is contained in:
committed by
EmilieNumworks
parent
9e4a1c7d54
commit
88e40266f6
28
apps/code/python_text_area.h
Normal file
28
apps/code/python_text_area.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef CODE_PYTHON_TEXT_AREA_H
|
||||
#define CODE_PYTHON_TEXT_AREA_H
|
||||
|
||||
#include <escher/text_area.h>
|
||||
|
||||
namespace Code {
|
||||
|
||||
class PythonTextArea : public TextArea {
|
||||
public:
|
||||
PythonTextArea(Responder * parentResponder, KDText::FontSize fontSize) :
|
||||
TextArea(parentResponder, &m_contentView, fontSize),
|
||||
m_contentView(fontSize)
|
||||
{
|
||||
}
|
||||
protected:
|
||||
class ContentView : public TextArea::ContentView {
|
||||
public:
|
||||
ContentView(KDText::FontSize fontSize);
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
};
|
||||
private:
|
||||
const ContentView * nonEditableContentView() const override { return &m_contentView; }
|
||||
ContentView m_contentView;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user