Files
Upsilon/escher/include/escher/view_controller.h
Romain Goyet 53cf3e2ead [Escher] Responder can get a pointer to the parent App
We assume the root parent is the App. This works well because each view
controller is a Responder.

Change-Id: I5d90053949a4ffbdb78746cc85430a15138e48e7
2016-08-12 10:12:22 +02:00

26 lines
500 B
C++

#ifndef ESCHER_VIEW_CONTROLLER_H
#define ESCHER_VIEW_CONTROLLER_H
extern "C" {
#include <stdint.h>
#include <kandinsky.h>
}
/* ViewControllers are reponsible for
* - Building the view hierarchy
* - Handling user input
*/
#include <escher/view.h>
#include <escher/responder.h>
class ViewController : public Responder {
public:
ViewController(Responder * parentResponder);
virtual const char * title() const;
virtual void handleKeyEvent(int key);
virtual View * view() = 0;
};
#endif