mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 12:10:03 +02:00
We assume the root parent is the App. This works well because each view controller is a Responder. Change-Id: I5d90053949a4ffbdb78746cc85430a15138e48e7
26 lines
500 B
C++
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
|