Files
Upsilon/apps/code/console_edit_cell.h
Léa Saviot c57f9cf8b1 [code] The Python console compiles and executes commands entered.
It stores and displays the result in the console store.
An empty line returned at the end of the execution is deleted.

Change-Id: Ic90e02e2d91d0a0033413da0588032d9450aefd0
2017-11-17 11:59:50 +01:00

38 lines
866 B
C++

#ifndef CODE_EDIT_CELL_H
#define CODE_EDIT_CELL_H
#include <escher/responder.h>
#include <escher/highlight_cell.h>
#include <escher/text_field.h>
#include <escher/text_field_delegate.h>
#include <escher/message_text_view.h>
#include "console_line.h"
namespace Code {
class ConsoleEditCell : public HighlightCell, public Responder {
public:
ConsoleEditCell(Responder * parentResponder = nullptr, TextFieldDelegate * delegate = nullptr);
// View
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
// Responder
void didBecomeFirstResponder() override;
// Edit cell
void setEditing(bool isEditing);
private:
char m_textBuffer[TextField::maxBufferSize()];
char m_draftTextBuffer[TextField::maxBufferSize()];
MessageTextView m_promptView;
TextField m_textField;
};
}
#endif