Files
Upsilon/apps/code/sandbox_controller.h
Émilie Feral fb3f6ab6f3 [apps/code][python] ConsoleController doesn't keep any pointer/boolean to know
if the sandbox/matplotlib view controller is displayed. Its state won't be
always right; instead, use the StackViewController depth.

This fixes the following bug: when popping the sandbox/matplotlib view
controller, the first responder token was not given to the console
controller!
2020-04-01 10:18:09 +02:00

32 lines
843 B
C++

#ifndef CODE_SANDBOX_CONTROLLER_H
#define CODE_SANDBOX_CONTROLLER_H
#include <escher/responder.h>
#include <escher/solid_color_view.h>
#include <escher/stack_view_controller.h>
#include <escher/view_controller.h>
#include <python/port/port.h>
namespace Code {
class SandboxController : public ViewController {
public:
SandboxController(Responder * parentResponder);
StackViewController * stackViewController();
void reset();
// ViewController
View * view() override { return &m_solidColorView; }
void viewWillAppear() override;
void viewDidDisappear() override;
bool handleEvent(Ion::Events::Event event) override;
ViewController::DisplayParameter displayParameter() override { return ViewController::DisplayParameter::WantsMaximumSpace; }
private:
void redrawWindow();
SolidColorView m_solidColorView;
};
}
#endif