Wt examples 4.8.1
HangmanWidget.h
Go to the documentation of this file.
1// This may look like C code, but it's really -*- C++ -*-
2/*
3 * Copyright (C) 2011 Emweb bv, Herent, Belgium
4 *
5 * See the LICENSE file for terms of use.
6 */
7
8#ifndef HANGMAN_WIDGET_H_
9#define HANGMAN_WIDGET_H_
10
11#include <vector>
12
13#include <Wt/WContainerWidget.h>
14
15class Session;
16class WordWidget;
17class ImagesWidget;
18class LettersWidget;
19
20class HangmanWidget: public Wt::WContainerWidget
21{
22public:
23 HangmanWidget(const std::string &name);
24
25 Wt::Signal<int>& scoreUpdated() { return scoreUpdated_; }
26
27private:
28 Wt::WText *title_;
29
33
34 Wt::WText *statusText_;
35 Wt::WComboBox *language_;
36 Wt::WPushButton *newGameButton_;
37
38 Wt::Signal<int> scoreUpdated_;
39
40 std::string name_;
41
43
44 void registerGuess(char c);
45
46 void newGame();
47};
48
49#endif //HANGMAN_WIDGET_H_
std::string name_
Definition: HangmanWidget.h:40
void registerGuess(char c)
Definition: HangmanWidget.C:74
LettersWidget * letters_
Definition: HangmanWidget.h:32
Wt::WText * statusText_
Definition: HangmanWidget.h:34
Wt::WComboBox * language_
Definition: HangmanWidget.h:35
ImagesWidget * images_
Definition: HangmanWidget.h:31
Wt::Signal< int > & scoreUpdated()
Definition: HangmanWidget.h:25
Wt::WText * title_
Definition: HangmanWidget.h:28
Wt::Signal< int > scoreUpdated_
Definition: HangmanWidget.h:38
WordWidget * word_
Definition: HangmanWidget.h:30
Wt::WPushButton * newGameButton_
Definition: HangmanWidget.h:36

Generated on Fri Sep 23 2022 for the C++ Web Toolkit (Wt) by doxygen 1.9.5