Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

recordgui.h

Go to the documentation of this file.
00001 #ifndef RECORDGUI_H
00002 #define RECORDGUI_H
00003 
00004 
00005 class RecordGUIBatches;
00006 class RecordBatch;
00007 class RecordStartType;
00008 class RecordStart;
00009 class RecordPath;
00010 class BrowseButton;
00011 class RecordDuration;
00012 class RecordSource;
00013 class RecordMode;
00014 class RecordNews;
00015 class RecordGUISave;
00016 class RecordGUIStartOver;
00017 class RecordGUICancel;
00018 class RecordGUIMonitorVideo;
00019 class RecordGUIMonitorAudio;
00020 class RecordGUINewBatch;
00021 class RecordGUIDeleteBatch;
00022 class RecordGUIStartBatches;
00023 class RecordGUIStopbatches;
00024 class RecordGUIActivateBatch;
00025 class RecordStatusThread;
00026 
00027 class RecordGUIDCOffset;
00028 class RecordGUIFillFrames;
00029 class RecordGUILabel;
00030 class RecordGUILoop;
00031 class RecordGUILoopHr;
00032 class RecordGUILoopMin;
00033 class RecordGUILoopSec;
00034 class RecordGUIModeMenu;
00035 class RecordGUIMode;
00036 class RecordGUIOK;
00037 class RecordGUIReset;
00038 class RecordStartoverThread;
00039 class RecordCancelThread;
00040 
00041 #include "browsebutton.inc"
00042 #include "condition.inc"
00043 #include "guicast.h"
00044 #include "loadmode.inc"
00045 #include "maxchannels.h"
00046 #include "mutex.inc"
00047 #include "mwindow.inc"
00048 #include "question.inc"
00049 #include "recordgui.inc"
00050 #include "record.inc"
00051 #include "recordmonitor.inc"
00052 #include "recordtransport.inc"
00053 #include "timeentry.h"
00054 
00055 #define BATCH_COLUMNS 7
00056 
00057 class RecordGUI : public BC_Window
00058 {
00059 public:
00060         RecordGUI(MWindow *mwindow, Record *record);
00061         ~RecordGUI();
00062 
00063         void load_defaults();
00064         void save_defaults();
00065         int create_objects();
00066         void flash_batch();
00067         void update_batches();
00068         void update_sources();
00069 // Update the batch channel table when edited
00070         void update_batch_sources();
00071 // Update the batch editing tools
00072         void update_batch_tools();
00073         int resize_event(int w, int h);
00074         int translation_event();
00075 
00076         ArrayList<BC_ListBoxItem*> batches[BATCH_COLUMNS];
00077 // Menu items
00078         ArrayList<BC_ListBoxItem*> modes;
00079 // Batch numbers
00080         ArrayList<BC_ListBoxItem*> batch_numbers;
00081 // Temp source pulldowns to create menu.
00082 // Real source list is from ChannelPicker
00083         ArrayList<BC_ListBoxItem*> sources;
00084 
00085         BC_Title *current_operation;
00086         BC_Title *position_title;
00087         BC_Title *prev_label_title;
00088         BC_Title *frames_dropped, *samples_clipped;
00089         MWindow *mwindow;
00090         Record *record;
00091         RecordGUIBatches *batch_list;
00092 //      RecordBatch *batch_number;
00093         RecordPath *batch_path;
00094         RecordStatusThread *status_thread;
00095         TimeEntry *batch_start;
00096         TimeEntry *batch_duration;
00097         RecordStartType *start_type;
00098         RecordTransport *record_transport;
00099         BrowseButton *batch_browse;
00100         RecordSource *batch_source;
00101         RecordMode *batch_mode;
00102         RecordGUINewBatch *new_batch;
00103         RecordGUIDeleteBatch *delete_batch;
00104         RecordGUIStartBatches *start_batches;
00105         RecordGUIStopbatches *stop_batches;
00106         RecordGUIActivateBatch *activate_batch;
00107         RecordGUILabel *label_button;
00108         RecordGUIFillFrames *fill_frames;
00109         RecordGUIMonitorVideo *monitor_video;
00110         RecordGUIMonitorAudio *monitor_audio;
00111         RecordStartoverThread *startover_thread;
00112         RecordCancelThread *cancel_thread;
00113         static char *batch_titles[BATCH_COLUMNS];
00114         int column_widths[BATCH_COLUMNS];
00115         LoadMode *load_mode;
00116         int flash_color;
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 //      RecordTransport *record_transport;
00136         RecordGUIModeMenu *rec_mode_menu;
00137         RecordGUILoopHr *loop_hr;
00138         RecordGUILoopMin *loop_min;
00139         RecordGUILoopSec *loop_sec;
00140         RecordGUIReset *reset;
00141 //      RecordGUIStartOver *startover_button;
00142         RecordGUIDCOffset *dc_offset_button;
00143         RecordGUIDCOffsetText *dc_offset_text[MAXCHANNELS];
00144         RecordMonitor *monitor_video_window;
00145         BC_Meter *meter[MAXCHANNELS];
00146         long total_dropped_frames;
00147         long total_clipped_samples;
00148 
00149 
00150 
00151         char* get_path();
00152         int get_record_mode();
00153         int set_record_mode(int value);
00154         int get_output_bits();
00155         int get_dither();
00156         int get_duplex_status();
00157         int set_duplex_status(int value);
00158         int get_loop_status();
00159         int get_sample_rate();
00160         int get_enable_duplex();
00161         long get_playback_buffer();
00162 
00163 
00164 
00165         int set_loop_status(int value);
00166         int update_duration_boxes(); // Redraw the loop duration textboxes for a script.
00167 
00168         int keypress_event();
00169         int delete_all_labels();
00170         int calibrate_dc_offset();
00171         int calibrate_dc_offset(long new_value, int channel);
00172         int update_dropped_frames(long new_dropped);
00173         int update_clipped_samples(long new_clipped);
00174         int set_translation(int x, int y, float z);
00175 
00176         void update_labels(double new_position);
00177         int update_position(double new_position);
00178         int update_prev_label(long new_position);
00179 //      int update_next_label(long new_position);
00180 
00181         int update_title(BC_Title *title, double position);
00182 
00183         int goto_prev_label();
00184 //      int goto_next_label();
00185         int toggle_label();
00186 };
00187 
00188 class RecordGUIBatches : public BC_ListBox
00189 {
00190 public:
00191         RecordGUIBatches(Record *record, RecordGUI *gui, int x, int y, int w, int h);
00192         int handle_event();
00193         int selection_changed();
00194         int column_resize_event();
00195         int drag_start_event();
00196         int drag_motion_event();
00197         int drag_stop_event();
00198         
00199         int dragging_item;
00200         Record *record;
00201         RecordGUI *gui;
00202 };
00203 
00204 class RecordGUISave : public BC_Button
00205 {
00206 public:
00207         RecordGUISave(Record *record, RecordGUI *record_gui);
00208         int handle_event();
00209         int keypress_event();
00210         RecordGUI *gui;
00211         Record *record;
00212 };
00213 
00214 
00215 class RecordGUICancel : public BC_Button
00216 {
00217 public:
00218         RecordGUICancel(Record *record, RecordGUI *record_gui);
00219         int handle_event();
00220         int keypress_event();
00221         RecordGUI *gui;
00222         Record *record;
00223 };
00224 
00225 class RecordGUIStartBatches : public BC_GenericButton
00226 {
00227 public:
00228         RecordGUIStartBatches(MWindow *mwindow, Record *record, int x, int y);
00229         int handle_event();
00230         MWindow *mwindow;
00231         Record *record;
00232 };
00233 
00234 
00235 class RecordGUIStopbatches : public BC_GenericButton
00236 {
00237 public:
00238         RecordGUIStopbatches(MWindow *mwindow, Record *record, int x, int y);
00239         int handle_event();
00240         MWindow *mwindow;
00241         Record *record;
00242 };
00243 
00244 class RecordGUIActivateBatch : public BC_GenericButton
00245 {
00246 public:
00247         RecordGUIActivateBatch(MWindow *mwindow, Record *record, int x, int y);
00248         int handle_event();
00249         MWindow *mwindow;
00250         Record *record;
00251 };
00252 
00253 
00254 class RecordGUIStartOver : public BC_GenericButton
00255 {
00256 public:
00257         RecordGUIStartOver(Record *record, RecordGUI *record_gui, int x, int y);
00258         ~RecordGUIStartOver();
00259 
00260         int handle_event();
00261 
00262         RecordGUI *gui;
00263         Record *record;
00264 };
00265 
00266 class RecordCancelThread : public Thread
00267 {
00268 public:
00269         RecordCancelThread(Record *record, RecordGUI *record_gui);
00270         ~RecordCancelThread();
00271         void run();
00272 
00273         RecordGUI *gui;
00274         Record *record;
00275         QuestionWindow *window;
00276 };
00277 
00278 class RecordStartoverThread : public Thread
00279 {
00280 public:
00281         RecordStartoverThread(Record *record, RecordGUI *record_gui);
00282         ~RecordStartoverThread();
00283         void run();
00284 
00285         RecordGUI *gui;
00286         Record *record;
00287         QuestionWindow *window;
00288 };
00289 
00290 class RecordBatch : public BC_PopupTextBox
00291 {
00292 public:
00293         RecordBatch(MWindow *mwindow, Record *record, RecordGUI *gui, int x, int y);
00294         int handle_event();
00295         MWindow *mwindow;
00296         Record *record;
00297         RecordGUI *gui;
00298 };
00299 
00300 class RecordStartType : public BC_CheckBox
00301 {
00302 public:
00303         RecordStartType(MWindow *mwindow, Record *record, int x, int y);
00304         int handle_event();
00305         MWindow *mwindow;
00306         Record *record;
00307 };
00308 
00309 class RecordPath : public BC_TextBox
00310 {
00311 public:
00312         RecordPath(MWindow *mwindow, Record *record, int x, int y);
00313         int handle_event();
00314         MWindow *mwindow;
00315         Record *record;
00316 };
00317 
00318 class RecordStart : public TimeEntry
00319 {
00320 public:
00321         RecordStart(MWindow *mwindow, Record *record, int x, int y);
00322         int handle_event();
00323         MWindow *mwindow;
00324         Record *record;
00325 };
00326 
00327 class RecordDuration : public TimeEntry
00328 {
00329 public:
00330         RecordDuration(MWindow *mwindow, Record *record, int x, int y);
00331         int handle_event();
00332         MWindow *mwindow;
00333         Record *record;
00334 };
00335 
00336 class RecordSource : public BC_PopupTextBox
00337 {
00338 public:
00339         RecordSource(MWindow *mwindow, Record *record, RecordGUI *gui, int x, int y);
00340         int handle_event();
00341         MWindow *mwindow;
00342         Record *record;
00343         RecordGUI *gui;
00344 };
00345 
00346 class RecordMode : public BC_PopupTextBox
00347 {
00348 public:
00349         RecordMode(MWindow *mwindow, Record *record, RecordGUI *gui, int x, int y);
00350         int handle_event();
00351         MWindow *mwindow;
00352         Record *record;
00353         RecordGUI *gui;
00354 };
00355 
00356 class RecordNews : public BC_TextBox
00357 {
00358 public:
00359         RecordNews(MWindow *mwindow, Record *record, int x, int y);
00360         int handle_event();
00361         MWindow *mwindow;
00362         Record *record;
00363 };
00364 
00365 class RecordGUIFillFrames : public BC_CheckBox
00366 {
00367 public:
00368         RecordGUIFillFrames(MWindow *mwindow, Record *record, int x, int y);
00369         int handle_event();
00370         MWindow *mwindow;
00371         Record *record;
00372 };
00373 
00374 class RecordGUIMonitorVideo : public BC_CheckBox
00375 {
00376 public:
00377         RecordGUIMonitorVideo(MWindow *mwindow, Record *record, int x, int y);
00378         int handle_event();
00379         MWindow *mwindow;
00380         Record *record;
00381 };
00382 
00383 class RecordGUIMonitorAudio : public BC_CheckBox
00384 {
00385 public:
00386         RecordGUIMonitorAudio(MWindow *mwindow, Record *record, int x, int y);
00387         int handle_event();
00388         MWindow *mwindow;
00389         Record *record;
00390 };
00391 
00392 class RecordGUINewBatch : public BC_GenericButton
00393 {
00394 public:
00395         RecordGUINewBatch(MWindow *mwindow, Record *record, int x, int y);
00396         int handle_event();
00397         MWindow *mwindow;
00398         Record *record;
00399 };
00400 
00401 
00402 class RecordGUIDeleteBatch : public BC_GenericButton
00403 {
00404 public:
00405         RecordGUIDeleteBatch(MWindow *mwindow, Record *record, int x, int y);
00406         int handle_event();
00407         MWindow *mwindow;
00408         Record *record;
00409 };
00410 
00411 class RecordGUILabel : public BC_GenericButton
00412 {
00413 public:
00414         RecordGUILabel(MWindow *mwindow, Record *record, int x, int y);
00415         ~RecordGUILabel();
00416 
00417         int handle_event();
00418         int keypress_event();
00419         MWindow *mwindow;
00420         Record *record;
00421 };
00422 
00423 // Stop GUI blocking the recording when X11 is busy
00424 class RecordStatusThread : public Thread
00425 {
00426 public:
00427         RecordStatusThread(MWindow *mwindow, RecordGUI *gui);
00428         ~RecordStatusThread();
00429 
00430         void update_dropped_frames(long value);
00431         void update_position(double new_position);
00432         void update_clipped_samples(long new_clipped_samples);
00433         void run();
00434 
00435         MWindow *mwindow;
00436         RecordGUI *gui;
00437         long new_dropped_frames;
00438         double new_position;
00439         long new_clipped_samples;
00440         int done;
00441         Condition *input_lock;
00442 };
00443 
00444 
00445 
00446 
00447 
00448 
00449 
00450 
00451 
00452 
00453 
00454 
00455 
00456 
00457 
00458 class RecordGUIOK : public BC_OKButton
00459 {
00460 public:
00461         RecordGUIOK(MWindow *mwindow, int y);
00462         ~RecordGUIOK();
00463 
00464         int handle_event();
00465 };
00466 
00467 
00468 class RecordGUIModeMenu : public BC_PopupMenu
00469 {
00470 public:
00471         RecordGUIModeMenu(int x, int y, int w, char *text);
00472         ~RecordGUIModeMenu();
00473 
00474         int handle_event();
00475         int add_items();
00476 
00477         RecordGUIMode *linear;
00478         RecordGUIMode *timed;
00479         RecordGUIMode *loop;
00480 };
00481 
00482 class RecordGUIMode : public BC_MenuItem
00483 {
00484 public:
00485         RecordGUIMode(char *text);
00486         ~RecordGUIMode();
00487 
00488         int handle_event();
00489 };
00490 
00491 
00492 
00493 
00494 
00495 
00496 
00497 
00498 class RecordGUIDCOffset : public BC_Button
00499 {
00500 public:
00501         RecordGUIDCOffset(MWindow *mwindow, int y);
00502         ~RecordGUIDCOffset();
00503 
00504         int handle_event();
00505         int keypress_event();
00506 };
00507 
00508 class RecordGUIDCOffsetText : public BC_TextBox
00509 {
00510 public:
00511         RecordGUIDCOffsetText(char *text, int y, int number);
00512         ~RecordGUIDCOffsetText();
00513 
00514         int handle_event();
00515         int number;
00516 };
00517 
00518 class RecordGUIReset : public BC_Button
00519 {
00520 public:
00521         RecordGUIReset(MWindow *mwindow, RecordGUI *gui, int y);
00522         ~RecordGUIReset();
00523 
00524         int handle_event();
00525         RecordGUI *gui;
00526 };
00527 
00528 class RecordGUIResetTranslation : public BC_Button
00529 {
00530 public:
00531         RecordGUIResetTranslation(MWindow *mwindow, RecordGUI *gui, int y);
00532         ~RecordGUIResetTranslation();
00533 
00534         int handle_event();
00535         RecordGUI *gui;
00536 };
00537 
00538 
00539 
00540 
00541 
00542 
00543 
00544 #endif

Generated on Sun Jan 8 13:38:59 2006 for Cinelerra-svn by  doxygen 1.4.4