mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 08:47:28 +01:00
33 lines
695 B
C++
33 lines
695 B
C++
#ifndef CODE_EXECUTOR_CONTROLLER_H
|
|
#define CODE_EXECUTOR_CONTROLLER_H
|
|
|
|
#include <escher.h>
|
|
#include "program.h"
|
|
|
|
namespace Code {
|
|
|
|
class ExecutorController : public ViewController {
|
|
public:
|
|
ExecutorController(Program * program);
|
|
View * view() override;
|
|
bool handleEvent(Ion::Events::Event event) override;
|
|
class ContentView : public View {
|
|
public:
|
|
ContentView(Program * program);
|
|
void drawRect(KDContext * ctx, KDRect rect) const override;
|
|
void print(const char * str) const;
|
|
private:
|
|
void runPython() const;
|
|
void clearScreen(KDContext * ctx) const;
|
|
Program * m_program;
|
|
mutable KDPoint m_printLocation;
|
|
};
|
|
private:
|
|
ContentView m_view;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|
|
|