Wt examples  3.2.0
/home/koen/project/wt/public-git/wt/examples/hangman/ImagesWidget.h
Go to the documentation of this file.
00001 // This may look like C code, but it's really -*- C++ -*-
00002 /* 
00003  * Copyright (C) 2011 Emweb bvba, Heverlee, Belgium
00004  *
00005  * See the LICENSE file for terms of use.
00006  */
00007 
00008 #ifndef IMAGES_WIDGET_H_
00009 #define IMAGES_WIDGET_H_
00010 
00011 #include <vector>
00012 
00013 #include <Wt/WContainerWidget>
00014 
00015 namespace Wt {
00016   class WImage;
00017 }
00018 
00019 class ImagesWidget : public Wt::WContainerWidget
00020 {
00021 public:
00022   ImagesWidget(Wt::WContainerWidget *parent = 0);
00023 
00024   int badGuesses() const { return badGuesses_; }
00025 
00026   void reset();
00027   void badGuess();
00028   void hurray();
00029   bool gameOver();
00030 
00031 private:
00032   std::vector<Wt::WImage *>      hangmanImages_;
00033   Wt::WImage                    *hurrayImage_;
00034 
00035   int                            badGuesses_;
00036   const static int               maxGuesses_;
00037 };
00038 
00039 #endif //IMAGES_WIDGET_H_

Generated on Tue Nov 29 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1