random_racer/src/CenterScreenDisplay.h

Go to the documentation of this file.
00001 #ifndef _RR_CENTERSCREENDISPLAY_H_
00002 #define _RR_CENTERSCREENDISPLAY_H_
00003 
00004 #include <string>
00005 
00006 #include <vrs/sharedobj.h>
00007 
00008 #include <random_utils/TimeableObject.h>
00009 
00010 namespace VRS
00011 {
00012 class BehaviorCallback;
00013 class Camera;
00014 class Canvas;
00015 class Font;
00016 class SceneThing;
00017 class ShapeMaterialGL;
00018 class Text;
00019 } // namespace VRS
00020 
00021 
00022 namespace random_racer
00023 {
00024 
00030 class CenterScreenDisplay : public VRS::SharedObj,
00031                             private random_utils::TimeableObject
00032 {
00033     VRS::SO<VRS::SceneThing>        m_thing;
00034     VRS::SO<VRS::Font>              m_font;
00035     VRS::SO<VRS::BehaviorCallback>  m_eventCallback;
00036     VRS::SO<VRS::Camera>            m_cam;
00037     VRS::SO<VRS::ShapeMaterialGL>   m_material;
00038     VRS::SO<VRS::Text>              m_line1, m_line2;
00039     bool                            m_newTimer;
00040 
00041     static const float              c_pixelsPerChar;
00042 
00047     virtual void timerTick();
00048 
00053     void handleResizeEvents();
00054 
00055 public:
00059     CenterScreenDisplay(VRS::SO<VRS::Canvas> canvas);
00060 
00064     virtual ~CenterScreenDisplay();
00065 
00069     void showText(
00070         unsigned int msecs,
00071         const std::string& line1,
00072         const std::string& line2 = std::string());
00073 };
00074 
00075 } // namespace random_racer
00076 
00077 
00078 #endif // _RR_CENTERSCREENDISPLAY_H_

Generated on Fri May 11 21:01:57 2007 for Random Racer by  doxygen 1.5.1