00001 #ifndef _RR_PRESENTER_H_
00002 #define _RR_PRESENTER_H_
00003
00004
00005 #include <vrs/sharedobj.h>
00006
00007 #include <random_utils/TimeableObject.h>
00008
00009 namespace VRS
00010 {
00011 class BehaviorCallback;
00012 class Box;
00013 class Camera;
00014 class Canvas;
00015 class KeyEvent;
00016 class ResizeEvent;
00017 class Scaling;
00018 class SceneThing;
00019 class Texture2DGL;
00020 class Translation;
00021 }
00022
00023
00024 namespace random_racer
00025 {
00026
00027 class Presenter : public VRS::SharedObj,
00028 private random_utils::TimeableObject
00029 {
00030 VRS::SO<VRS::SceneThing> m_thing;
00031 VRS::SO<VRS::Camera> m_cam;
00032 VRS::SO<VRS::Box> m_box;
00033 VRS::SO<VRS::Translation> m_translation;
00034 VRS::SO<VRS::Scaling> m_scaling;
00035 VRS::SO<VRS::Texture2DGL> m_texture;
00036 VRS::SO<VRS::Texture2DGL> m_texture2;
00037 VRS::SO<VRS::BehaviorCallback> m_eventCallback;
00038 VRS::SO<VRS::Canvas> m_canvas;
00039
00040
00041 bool m_hide, m_start, m_show, m_switch, m_animation, m_full, m_isFull, m_first;
00042
00043 static const float c_maxScaling, c_hideTrans, c_startTrans;
00044
00045 unsigned int m_slideCount;
00046
00051 virtual void timerTick();
00052
00056 void resizeEvent(VRS::SO<VRS::ResizeEvent> p_event);
00057
00061 void keyEvent(VRS::SO<VRS::KeyEvent> p_event);
00062
00066 void handleEvents();
00067
00071 bool isVisible();
00072
00076 void toggleVisibility();
00077
00081 void startAnimation();
00082
00083 void fullscreen();
00084
00088 void switchTexture(unsigned int image);
00089
00090 public:
00094 Presenter(VRS::SO<VRS::Canvas> canvas);
00095
00099 virtual ~Presenter();
00100
00104 void startPresentation();
00105
00109 void show();
00110
00114 void hide();
00115
00119 void switchSlide();
00120 };
00121
00122 }
00123
00124
00125 #endif // _RR_PRESENTER_H_