Wt examples  4.3.0
ImagesWidget.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 IMAGES_WIDGET_H_
9 #define IMAGES_WIDGET_H_
10 
11 #include <vector>
12 
13 #include <Wt/WContainerWidget.h>
14 
15 using namespace Wt;
16 
18 {
19 public:
20  static const int HURRAY;
21 
22  ImagesWidget(int maxGuesses);
23 
24  /*
25  * 0 - maxGuesses: corresponds to 0 up to maxGuesses guesses
26  * HURRAY: when won
27  */
28  void showImage(int index);
29  int currentImage() const { return image_; }
30 
31 private:
32  std::vector<WImage *> images_;
33  int image_;
34 
35  WImage *image(int index) const;
36 };
37 
38 #endif // IMAGES_WIDGET_H_
Wt
Wt::WContainerWidget
ImagesWidget::image_
int image_
Definition: ImagesWidget.h:33
Wt::WImage
ImagesWidget::images_
std::vector< WImage * > images_
Definition: ImagesWidget.h:32
ImagesWidget
Definition: ImagesWidget.h:17
ImagesWidget::currentImage
int currentImage() const
Definition: ImagesWidget.h:29
ImagesWidget::HURRAY
static const int HURRAY
Definition: ImagesWidget.h:20

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