Wt examples  4.0.0
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 
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 
32 };
33 
34 #endif //WORD_WIDGET_H_
std::wstring word_
Definition: WordWidget.h:29
std::wstring word() const
Definition: WordWidget.h:20
unsigned displayedLetters_
Definition: WordWidget.h:31
std::vector< WText * > wordLetters_
Definition: WordWidget.h:28

Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11