Wt examples
3.2.2
|
00001 // This may look like C code, but it's really -*- C++ -*- 00002 /* 00003 * Copyright (C) 2011 Emweb bvba, Heverlee, Belgium 00004 * 00005 * See the LICENSE file for terms of use. 00006 */ 00007 00008 #ifndef HANGMANGAME_H_ 00009 #define HANGMANGAME_H_ 00010 00011 #include <Wt/WContainerWidget> 00012 00013 #include "Session.h" 00014 00015 namespace Wt { 00016 class WStackedWidget; 00017 class WAnchor; 00018 } 00019 00020 class HangmanWidget; 00021 class HighScoresWidget; 00022 class Session; 00023 00024 class HangmanGame : public Wt::WContainerWidget 00025 { 00026 public: 00027 HangmanGame(Wt::WContainerWidget *parent = 0); 00028 00029 void handleInternalPath(const std::string &internalPath); 00030 00031 private: 00032 Wt::WStackedWidget *mainStack_; 00033 HangmanWidget *game_; 00034 HighScoresWidget *scores_; 00035 Wt::WContainerWidget *links_; 00036 Wt::WAnchor *backToGameAnchor_; 00037 Wt::WAnchor *scoresAnchor_; 00038 00039 Session session_; 00040 00041 void onAuthEvent(); 00042 void showGame(); 00043 void showHighScores(); 00044 }; 00045 00046 #endif //HANGMANGAME_H_