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