initial commit
[goodguy/history.git] / cinelerra-5.0 / 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
31
32
33
34
35 RecordWindow::RecordWindow(MWindow *mwindow, Record *record, int x, int y)
36  : BC_Window(PROGRAM_NAME ": Record", 
37         x,
38         y,
39         RECORD_WINDOW_WIDTH, 
40         RECORD_WINDOW_HEIGHT,
41         (int)BC_INFINITY,
42         (int)BC_INFINITY,
43         0,
44         0,
45         1)
46 {
47         this->mwindow = mwindow;
48         this->record = record;
49 }
50
51 RecordWindow::~RecordWindow()
52 {
53         delete format_tools;
54 //      delete loadmode;
55 }
56
57
58
59 void RecordWindow::create_objects()
60 {
61 //printf("RecordWindow::create_objects 1\n");
62         add_subwindow(new BC_Title(5, 5, _("Select a file to record to:")));
63
64 //printf("RecordWindow::create_objects 1\n");
65         int x = 5, y = 25;
66         format_tools = new FormatTools(mwindow,
67                                         this, 
68                                         record->default_asset);
69 //printf("RecordWindow::create_objects 1\n");
70         format_tools->create_objects(x, 
71                                         y, 
72                                         1, 
73                                         1, 
74                                         1, 
75                                         1, 
76                                         1, 
77                                         1,
78                                         /* record->fixed_compression */ 0,
79                                         1,
80                                         0,
81                                         0);
82 //printf("RecordWindow::create_objects 1\n");
83
84 // Not the same as creating a new file at each label.
85 // Load mode is now located in the RecordGUI
86         x = 10;
87 //      loadmode = new LoadMode(this, x, y, &record->load_mode, 1);
88 //      loadmode->create_objects();
89
90         add_subwindow(new BC_OKButton(this));
91 //printf("RecordWindow::create_objects 1\n");
92         add_subwindow(new BC_CancelButton(this));
93 //printf("RecordWindow::create_objects 1\n");
94         show_window();
95 }
96
97
98
99
100
101
102
103 RecordToTracks::RecordToTracks(Record *record, int default_)
104  : BC_CheckBox(200, 270, default_) { this->record = record; }
105 RecordToTracks::~RecordToTracks() 
106 {}
107 int RecordToTracks::handle_event()
108 {
109         record->to_tracks = get_value();
110 }
111