imgviewer.h

Go to the documentation of this file.
00001 
00006 /*
00007  * Copyright (C) 2006  Lab. Visgraf/IMPA and AnimaMundi
00008  * 
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License
00011  * as published by the Free Software Foundation; either version 2
00012  * of the License, or (at your option) any later version.
00013  * 
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  * 
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00022  * 
00023 */
00024 
00025 
00026 #ifndef IMGVIEWER_H
00027 #define IMGVIEWER_H
00028 
00029 #include <stdio.h>
00030 #include <time.h>
00031 
00032 #include "FL/Fl.H"
00033 #include "FL/Fl_Widget.H"
00034 #include "FL/Fl_Output.H"
00035 #include "FL/fl_draw.H"
00036 #include "FL/Fl_Button.H"
00037 #include "FL/Fl_Gl_Window.H"
00038 #include "FL/Fl_Double_Window.H"
00039 #include <FL/gl.h>
00040 
00041 #include "defaults.h"
00042 #include "lang_ui.h"
00043 
00044 #include "frame.h"
00045 #include "imglist.h"
00046 
00047 //extern "C" {
00048 #include "video.h"
00049 //}
00050 
00051 
00052 typedef void (*setLabelModeViewerFunc)(bool, bool);
00053 
00054 enum PlayMode{_MUAN_FULL, _MUAN_PLAYER};
00055 
00056 class ImageViewer : public Fl_Gl_Window {
00057    Boolean video_on;
00058    double aspect_ratio;
00059    void init_GL();
00060    void draw();
00061    void resize(int X, int Y, int W, int H);
00062    void calcule_aspect_ratio();
00063 
00064   public:
00065    PlayMode imgvmode;
00066    Boolean flick_on, is_playing, is_looping, is_saving;
00067    double flick_delay;
00068    ImgList *imgl;
00069    Image *img;
00070    Frame *frm;
00071    
00072    ImageViewer (int x, int y, int w, int h);
00073    bool initialize ();
00074    void changeConnectMode (int mode);
00075 
00076    void play ();
00077    void stop ();
00078    void flick ( void );
00079    void insert_frame ( int delay, int frame_duration );
00080    void goToFrame ( int frameNumber );
00081    void playInRange (int begin, int end);   
00082    void setModeViewer (Boolean _camera_on, Boolean _mem_alert, 
00083                        setLabelModeViewerFunc setLabel = NULL);
00084    Boolean get_video_on (void) { return video_on;}
00085 
00086 
00087 };
00088 
00089 
00090 #endif

Generated on Tue Jan 22 17:07:29 2008 for MUAN by  doxygen 1.4.7