Wt examples 3.3.12
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>
14
16{
17public:
18 static const int HURRAY;
19
20 ImagesWidget(int maxGuesses, Wt::WContainerWidget *parent = 0);
21
22 /*
23 * 0 - maxGuesses: corresponds to 0 up to maxGuesses guesses
24 * HURRAY: when won
25 */
26 void showImage(int index);
27 int currentImage() const { return image_; }
28
29private:
30 std::vector<Wt::WImage *> images_;
31 int image_;
32
33 Wt::WImage *image(int index) const;
34};
35
36#endif // IMAGES_WIDGET_H_
int currentImage() const
std::vector< Wt::WImage * > images_
void showImage(int index)
static const int HURRAY
Wt::WImage * image(int index) const
WWidget * parent() const

Generated on Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8