Wt examples  4.0.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 bvba, Heverlee, 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_
int currentImage() const
Definition: ImagesWidget.h:29
static const int HURRAY
Definition: ImagesWidget.h:20
std::vector< WImage * > images_
Definition: ImagesWidget.h:32

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