00001 #ifndef _RECORDER_UI_H_IS_INCLUDED_
00002 #define _RECORDER_UI_H_IS_INCLUDED_
00003
00004
00005 #include "disp/recorder.H"
00006 #include "glui/glui.h"
00007
00008
00009
00010
00011 class RecorderUI : public RecorderUIBase {
00012 public:
00013
00014 RecorderUI(Recorder* rec);
00015 virtual ~RecorderUI() {}
00016
00017
00018 enum button_id_t {
00019 RECORD_BUTTON_ID,
00020 PLAY_BUTTON_ID,
00021 PAUSE_BUTTON_ID,
00022 STOP_BUTTON_ID,
00023 FWD_BUTTON_ID,
00024 REV_BUTTON_ID,
00025 RENDER_ON_BUTTON_ID,
00026 RENDER_OFF_BUTTON_ID,
00027 NEW_PATH_BUTTON_ID,
00028 DEL_PATH_BUTTON_ID,
00029 OPEN_PATH_BUTTON_ID,
00030 SAVE_PATH_BUTTON_ID,
00031 PLAY_FRAMES_BUTTON_ID,
00032 NUM_BUTTONS
00033 };
00034
00035 enum color_edittext_id_t {
00036 NAME_EDITTEXT_ID,
00037 NUM_COLOR_EDITTEXT_IDS
00038 };
00039
00040
00041 static void button_cb(int id);
00042 static void set_fps_cb(int id);
00043 static void path_listbox_cb(int id);
00044 static void name_edittext_cb(int id);
00045 static void resync_cb(int id);
00046 static void set_framenum_cb(int id);
00047 static void set_render_state();
00048 static void set_sync();
00049
00050 void update();
00051
00052
00053 virtual void show();
00054 virtual void hide();
00055
00056 virtual void set_play_all_frames();
00057
00058 virtual void set_frame_num(int n) {
00059 if (_fnum_edittext)
00060 _fnum_edittext->set_int_val(n);
00061 }
00062
00063 virtual void sync_live() {
00064 if (_glui)
00065 _glui->sync_live() ;
00066 }
00067
00068 virtual int add_path_entry(int, char*);
00069 virtual int del_path_entry(int );
00070
00071 virtual void update_checks();
00072
00073 protected:
00074
00075
00076 GLUI* _glui;
00077
00078
00079 static Recorder* _rec;
00080 static RecorderUI* _instance;
00081
00082 static GLUI_Listbox* _path_listbox;
00083 static GLUI_EditText* _fnum_edittext;
00084 static GLUI_EditText* _name_edittext;
00085 static GLUI_Spinner* _fps_spin;
00086
00087 static GLUI_Checkbox* _check_rec;
00088 static GLUI_Checkbox* _check_play;
00089 static GLUI_Checkbox* _check_pause;
00090 static GLUI_Checkbox* _check_sync;
00091
00092 static GLUI_RadioGroup* _radio_render;
00093 static GLUI_RadioGroup* _radio_frames;
00094
00095 void init();
00096 };
00097
00098 #endif // _RECORDER_UI_H_IS_INCLUDED_
00099
00100