Wt examples
4.7.1
C:
M
mingw-w64-wt
src
wt-4.7.1
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 bv, Herent, 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:16
WordWidget::WordWidget
WordWidget()
Definition:
WordWidget.C:13
WordWidget::word
std::wstring word() const
Definition:
WordWidget.h:20
WordWidget::guess
bool guess(wchar_t c)
Definition:
WordWidget.C:32
WordWidget::init
void init(const std::wstring &word)
Definition:
WordWidget.C:19
WordWidget::displayedLetters_
unsigned displayedLetters_
Definition:
WordWidget.h:31
WordWidget::won
bool won()
Definition:
WordWidget.C:47
WordWidget::wordLetters_
std::vector< WText * > wordLetters_
Definition:
WordWidget.h:28
WordWidget::word_
std::wstring word_
Definition:
WordWidget.h:29
Wt
Definition:
AddresseeEdit.h:16
Generated on Fri May 6 2022 for
the C++ Web Toolkit (Wt)
by
1.9.4