Wt examples 4.7.2
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
13using namespace Wt;
14
15class WordWidget : public WContainerWidget
16{
17public:
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
27private:
28 std::vector<WText *> wordLetters_;
29 std::wstring word_;
30
32};
33
34#endif //WORD_WIDGET_H_
std::wstring word() const
Definition: WordWidget.h:20
bool guess(wchar_t c)
Definition: WordWidget.C:32
void init(const std::wstring &word)
Definition: WordWidget.C:19
unsigned displayedLetters_
Definition: WordWidget.h:31
bool won()
Definition: WordWidget.C:47
std::vector< WText * > wordLetters_
Definition: WordWidget.h:28
std::wstring word_
Definition: WordWidget.h:29

Generated on Fri May 13 2022 for the C++ Web Toolkit (Wt) by doxygen 1.9.4