00001 /* this is a -*-C++-*- file 00002 * Copyright (C) 2005 Wim Dumon 00003 * 00004 * See the LICENSE file for terms of use. 00005 */ 00006 00007 #ifndef HANGMANGAME_H_ 00008 #define HANGMANGAME_H_ 00009 00010 #include <WTable> 00011 00012 namespace Wt { 00013 class WStackedWidget; 00014 class WText; 00015 } 00016 00017 using namespace Wt; 00018 00019 #include "Dictionary.h" 00020 00021 class HangmanWidget; 00022 class HighScoresWidget; 00023 class LoginWidget; 00024 00025 class HangmanGame : public WTable 00026 { 00027 public: 00028 HangmanGame(WContainerWidget *parent); 00029 00030 private slots: 00031 void play(std::wstring user, Dictionary dictionary); 00032 void showGame(); 00033 void showHighScores(); 00034 00035 private: 00036 WStackedWidget *MainStack; 00037 LoginWidget *Login; 00038 HangmanWidget *Game; 00039 HighScoresWidget *Scores; 00040 WText *BackToGameText; 00041 WText *ScoresText; 00042 00043 // Show the initial screen 00044 void doLogin(); 00045 }; 00046 00047 #endif