duncan
Mom and Dad were wrong!
/home/malcolm/tmp/duncan/prototype/0/client/state.h
00001 #ifndef CLIENT_STATE_H_
00002 #define CLIENT_STATE_H_
00003 
00004 #include <tr1/memory>
00005 #include "input.h"
00006 
00007 namespace client {
00008 
00016 class State : public InputListener {
00017         protected:
00018                 virtual void key_pressed(unsigned int wh) {}
00019                 virtual void key_released(unsigned int wh) {}
00020         public:
00024                 enum Action {NOTHING, POP_ME, PUSH_CHILD};
00025 
00026                 virtual ~State() {}
00031                 virtual std::tr1::shared_ptr<State> child() { return std::tr1::shared_ptr<State>(); }
00032 
00036                 virtual void on_push() {}
00037 
00041                 virtual void on_pop() {}
00042 
00046                 virtual void on_active() {}
00047 
00051                 virtual void resize(unsigned int,unsigned int) {}
00052 
00057                 virtual Action update() { return NOTHING; }
00058 
00062                 virtual void draw() {}
00063 };
00064 
00065 } // namespace
00066 
00067 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations