Wt examples
3.3.0
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
build
buildd
witty-3.3.0
examples
hangman
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 bvba, Heverlee, 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>
14
15
#include "
Dictionary.h
"
16
17
class
Session
;
18
class
WordWidget
;
19
class
ImagesWidget
;
20
class
LettersWidget
;
21
22
class
HangmanWidget
:
public
Wt::WContainerWidget
23
{
24
public
:
25
HangmanWidget
(
const
std::string &name,
Wt::WContainerWidget
*parent = 0);
26
27
Wt::Signal<int>
&
scoreUpdated
() {
return
scoreUpdated_
; }
28
29
private
:
30
Wt::WText
*
title_
;
31
32
WordWidget
*
word_
;
33
ImagesWidget
*
images_
;
34
LettersWidget
*
letters_
;
35
36
Wt::WText
*
statusText_
;
37
Wt::WComboBox
*
language_
;
38
Wt::WPushButton
*
newGameButton_
;
39
40
Wt::Signal<int>
scoreUpdated_
;
41
42
std::string
name_
;
43
Dictionary
dictionary_
;
44
45
int
badGuesses_
;
46
47
void
registerGuess
(
char
c);
48
49
void
newGame
();
50
};
51
52
#endif //HANGMAN_WIDGET_H_
Generated on Fri May 31 2013 for
the C++ Web Toolkit (Wt)
by
1.8.3.1