00001 #ifndef LOPER_CHESSWINDOW
00002 #define LOPER_CHESSWINDOW
00003
00015 #include <standard.hpp>
00016 #include <vector>
00017
00018 #include <FL/Fl_Gl_Window.H>
00019 #include <FL/glut.h>
00020 #include "ChessboardPicture.hpp"
00021
00022
00027 class ChessWindow :
00028 public Fl_Gl_Window
00029 {
00030 public:
00031 ChessWindow(int X, int Y, int W, int H, std::vector< ChessboardPicture > *chessPicturePtr, const char *L)
00032 : Fl_Gl_Window(X, Y, W, H, L), chessPictures(chessPicturePtr) { currentImageIndex = 0; bDrawOriginal = false; }
00033
00034 void setImageIndex (int index) { currentImageIndex = index; redraw();}
00035 int getImageIndex() const { return currentImageIndex; }
00036
00037 void setImageView (bool bViewOriginal );
00038 unsigned char getCurrentThreshold() const;
00039 void setCurrentThreshold(unsigned char c);
00040 ~ChessWindow(void);
00041
00042 private:
00043 void draw();
00044 int handle(int);
00045 unsigned int currentImageIndex;
00046 bool bDrawOriginal;
00047
00048 std::vector< ChessboardPicture > *chessPictures;
00049 };
00050
00051
00052 #endif // LOPER_CHESSWINDOW