HangmanGame.h 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // This may look like C code, but it's really -*- C++ -*-
  2. /*
  3. * Copyright (C) 2011 Emweb bvba, Heverlee, Belgium
  4. *
  5. * See the LICENSE file for terms of use.
  6. */
  7. #ifndef HANGMANGAME_H_
  8. #define HANGMANGAME_H_
  9. #include <Wt/WContainerWidget>
  10. #include "Session.h"
  11. namespace Wt {
  12. class WStackedWidget;
  13. class WAnchor;
  14. }
  15. class HangmanWidget;
  16. class HighScoresWidget;
  17. class Session;
  18. class HangmanGame : public Wt::WContainerWidget
  19. {
  20. public:
  21. HangmanGame(Wt::WContainerWidget *parent = 0);
  22. void handleInternalPath(const std::string &internalPath);
  23. private:
  24. Wt::WStackedWidget *mainStack_;
  25. HangmanWidget *game_;
  26. HighScoresWidget *scores_;
  27. Wt::WContainerWidget *links_;
  28. Wt::WAnchor *backToGameAnchor_;
  29. Wt::WAnchor *scoresAnchor_;
  30. Session session_;
  31. void onAuthEvent();
  32. void showGame();
  33. void showHighScores();
  34. };
  35. #endif //HANGMANGAME_H_