00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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