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 LoginWidget; 00023 class Session; 00024 00025 class HangmanGame : public Wt::WContainerWidget 00026 { 00027 public: 00028 HangmanGame(Wt::WContainerWidget *parent = 0); 00029 00030 void handleInternalPath(const std::string &internalPath); 00031 00032 private: 00033 Wt::WStackedWidget *mainStack_; 00034 LoginWidget *login_; 00035 HangmanWidget *game_; 00036 HighScoresWidget *scores_; 00037 Wt::WAnchor *backToGameAnchor_; 00038 Wt::WAnchor *scoresAnchor_; 00039 00040 Session session_; 00041 00042 void onLogin(); 00043 void showLogin(); 00044 void showGame(); 00045 void showHighScores(); 00046 }; 00047 00048 #endif //HANGMANGAME_H_
1.7.2