Slideshow.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef slideshow_h_
  2. #define slideshow_h_
  3. #include "screen.h"
  4. //////////////////////////////////////////////////////////////////////////////
  5. //
  6. // Slideshow Screen
  7. //
  8. //////////////////////////////////////////////////////////////////////////////
  9. class Slideshow :
  10. public Screen,
  11. public IEventSink,
  12. public IKeyboardInput
  13. {
  14. private:
  15. TRef<IObjectList> m_pSlideList;
  16. TRef<Image> m_pImage;
  17. TRef<WrapImage> m_pWrapImage;
  18. bool m_bNextSlide;
  19. TRef<ISoundInstance> m_pSoundInstance;
  20. TRef<IKeyboardInput> m_pkeyboardInputOldFocus;
  21. TRef<IEventSink> m_pEventSink;
  22. bool m_bInTimer;
  23. class PickImage : public Image
  24. {
  25. private:
  26. Slideshow* m_pSlideshow;
  27. public:
  28. PickImage (Slideshow* pSlideshow) :
  29. m_pSlideshow(pSlideshow)
  30. {
  31. }
  32. MouseResult HitTest (IInputProvider* pProvider, const Point& point)
  33. {
  34. return MouseResultHit();
  35. }
  36. MouseResult Button (IInputProvider* pProvider, const Point& point, int button, bool bCaptured, bool bInside, bool bDown)
  37. {
  38. if (bDown)
  39. m_pSlideshow->Picked();
  40. return MouseResult();
  41. }
  42. };
  43. void CleanUpTimers (void);
  44. void StopSound (void);
  45. static bool m_bIsInSlideShow;
  46. public:
  47. /* void */ Slideshow (Modeler* pmodeler, const ZString& strNamespace);
  48. /* void */ ~Slideshow (void);
  49. void NextSlide (void);
  50. virtual Image* GetImage (void);
  51. virtual void OnFrame (void);
  52. virtual void Dismiss (void);
  53. virtual bool OnEvent (IEventSource* pevent);
  54. virtual void Picked (void);
  55. virtual bool OnKey (IInputProvider* pprovider, const KeyState& ks, bool& fForceTranslate);
  56. static bool IsInSlideShow (void);
  57. };
  58. #endif