#include <HangmanGame.h>
Definition at line 24 of file HangmanGame.h.
§ HangmanGame()
HangmanGame::HangmanGame |
( |
Wt::WContainerWidget * |
parent = 0 | ) |
|
Definition at line 21 of file HangmanGame.C.
22 WContainerWidget(parent),
28 Auth::AuthModel *authModel =
new Auth::AuthModel(
Session::auth(),
33 Auth::AuthWidget *authWidget =
new Auth::AuthWidget(
session_.
login());
34 authWidget->setModel(authModel);
35 authWidget->setRegistrationEnabled(
true);
37 WText *title =
new WText(
"<h1>A Witty game: Hangman</h1>");
40 addWidget(authWidget);
46 links_ =
new WContainerWidget();
47 links_->setStyleClass(
"links");
55 scoresAnchor_->setLink(WLink(WLink::InternalPath,
"/highscores"));
57 WApplication::instance()->internalPathChanged()
60 authWidget->processEnvironment();
Wt::WAnchor * backToGameAnchor_
Wt::Auth::AbstractUserDatabase & users()
Wt::WStackedWidget * mainStack_
static const Wt::Auth::AuthService & auth()
static const std::vector< const Wt::Auth::OAuthService * > & oAuth()
Wt::Auth::Login & login()
Wt::WAnchor * scoresAnchor_
Wt::WContainerWidget * links_
HighScoresWidget * scores_
static const Wt::Auth::AbstractPasswordService & passwordAuth()
void handleInternalPath(const std::string &internalPath)
§ handleInternalPath()
void HangmanGame::handleInternalPath |
( |
const std::string & |
internalPath | ) |
|
Definition at line 76 of file HangmanGame.C.
79 if (internalPath ==
"/play")
81 else if (internalPath ==
"/highscores")
84 WApplication::instance()->setInternalPath(
"/play",
true);
Wt::Auth::Login & login()
§ onAuthEvent()
void HangmanGame::onAuthEvent |
( |
| ) |
|
|
private |
Definition at line 63 of file HangmanGame.C.
Wt::WStackedWidget * mainStack_
Wt::Auth::Login & login()
Wt::WContainerWidget * links_
HighScoresWidget * scores_
void handleInternalPath(const std::string &internalPath)
§ showGame()
void HangmanGame::showGame |
( |
| ) |
|
|
private |
Definition at line 100 of file HangmanGame.C.
Wt::WAnchor * backToGameAnchor_
std::string userName() const
Wt::WStackedWidget * mainStack_
Wt::WAnchor * scoresAnchor_
§ showHighScores()
void HangmanGame::showHighScores |
( |
| ) |
|
|
private |
Definition at line 88 of file HangmanGame.C.
Wt::WAnchor * backToGameAnchor_
Wt::WStackedWidget * mainStack_
Wt::WAnchor * scoresAnchor_
HighScoresWidget * scores_
§ backToGameAnchor_
Wt::WAnchor* HangmanGame::backToGameAnchor_ |
|
private |
§ game_
§ links_
Wt::WContainerWidget* HangmanGame::links_ |
|
private |
§ mainStack_
Wt::WStackedWidget* HangmanGame::mainStack_ |
|
private |
§ scores_
§ scoresAnchor_
Wt::WAnchor* HangmanGame::scoresAnchor_ |
|
private |
§ session_
The documentation for this class was generated from the following files:
- /build/witty-8LS0oe/witty-3.3.6+dfsg/examples/hangman/HangmanGame.h
- /build/witty-8LS0oe/witty-3.3.6+dfsg/examples/hangman/HangmanGame.C