Wt examples
4.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
public-git
wt
examples
hangman
WordWidget.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 WORD_WIDGET_H_
9
#define WORD_WIDGET_H_
10
11
#include <Wt/WContainerWidget.h>
12
13
using namespace
Wt
;
14
15
class
WordWidget
:
public
WContainerWidget
16
{
17
public
:
18
WordWidget
();
19
20
std::wstring
word
()
const
{
return
word_; }
21
22
void
init(
const
std::wstring &word);
23
bool
guess(
wchar_t
c);
24
25
bool
won();
26
27
private
:
28
std::vector<WText *>
wordLetters_
;
29
std::wstring
word_
;
30
31
unsigned
displayedLetters_
;
32
};
33
34
#endif //WORD_WIDGET_H_
WordWidget
Definition:
WordWidget.h:15
WordWidget::word_
std::wstring word_
Definition:
WordWidget.h:29
WordWidget::word
std::wstring word() const
Definition:
WordWidget.h:20
WordWidget::displayedLetters_
unsigned displayedLetters_
Definition:
WordWidget.h:31
Wt
WordWidget::wordLetters_
std::vector< WText * > wordLetters_
Definition:
WordWidget.h:28
Wt::WContainerWidget
Generated on Mon Sep 4 2017 for
the C++ Web Toolkit (Wt)
by
1.8.11