RafaMar + programmer friend Help button in Batch Render addition
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / recordwindow.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "formattools.h"
23 #include "language.h"
24 #include "mwindow.h"
25 #include "mwindowgui.h"
26 #include "record.h"
27 #include "recordwindow.h"
28 #include "videodevice.inc"
29
30 RecordWindow::RecordWindow(MWindow *mwindow, Record *record, int x, int y)
31  : BC_Window(_(PROGRAM_NAME ": Record"), x, y,
32         RECORD_WINDOW_WIDTH, RECORD_WINDOW_HEIGHT,
33         (int)BC_INFINITY, (int)BC_INFINITY, 0, 0, 1)
34 {
35         this->mwindow = mwindow;
36         this->record = record;
37 }
38
39 RecordWindow::~RecordWindow()
40 {
41         delete format_tools;
42 //      delete loadmode;
43 }
44
45 void RecordWindow::create_objects()
46 {
47         int x = xS(5), y = yS(5);
48         lock_window("RecordWindow::create_objects");
49         add_subwindow(new BC_Title(x, y, _("Select a file to record to:")));
50
51         y = yS(25);
52         format_tools = new FormatTools(mwindow, this, record->default_asset);
53         format_tools->create_objects(x, y, 1, 1, 1, 1, 1, 1,
54                                         /* record->fixed_compression */ 0,
55                                         1, 0, 0);
56
57 // Not the same as creating a new file at each label.
58 // Load mode is now located in the RecordGUI
59 //      x = xS(10);
60 //      loadmode = new LoadMode(this, x, y, &record->load_mode, 1);
61 //      loadmode->create_objects();
62
63         add_subwindow(new BC_OKButton(this));
64         add_subwindow(new BC_CancelButton(this));
65         show_window();
66         unlock_window();
67 }
68
69
70 RecordToTracks::RecordToTracks(Record *record, int default_)
71  : BC_CheckBox(xS(200), yS(270), default_)
72 {
73         this->record = record;
74 }
75 RecordToTracks::~RecordToTracks()
76 {
77 }
78
79 int RecordToTracks::handle_event()
80 {
81         record->to_tracks = get_value();
82         return 1;
83 }
84