Wt examples  4.2.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 
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_
Wt
WordWidget::wordLetters_
std::vector< WText * > wordLetters_
Definition: WordWidget.h:28
WordWidget::displayedLetters_
unsigned displayedLetters_
Definition: WordWidget.h:31
Wt::WContainerWidget
WordWidget
Definition: WordWidget.h:15
WordWidget::word
std::wstring word() const
Definition: WordWidget.h:20
WordWidget::word_
std::wstring word_
Definition: WordWidget.h:29

Generated on Fri Mar 20 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.17