asset drag/drop to viewers, bluebanana bug, listbox fontlist highlight
[goodguy/history.git] / cinelerra-5.1 / cinelerra / exportedl.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2006 Andraz Tori
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 #ifndef EXPORTEDL_H
23 #define EXPORTEDL_H
24
25
26 #include "asset.inc"
27 #include "bitspopup.h"
28 #include "browsebutton.h"
29 #include "cache.inc"
30 #include "compresspopup.h"
31 #include "condition.inc"
32 #include "edit.inc"
33 #include "errorbox.inc"
34 #include "file.inc"
35 #include "guicast.h"
36 #include "mutex.inc"
37 #include "mwindow.inc"
38
39 #define EDLTYPE_CMX3600 1
40
41 class ExportEDLPathText;
42 class ExportEDLWindowTrackList;
43 class ExportEDLWindow;
44
45 class ExportEDLAsset
46 {
47 public:
48         ExportEDLAsset(MWindow *mwindow, EDL *edl);
49         ~ExportEDLAsset();
50         // EDL being exported
51         EDL *edl;
52         // path to file
53         char path[BCTEXTLEN];
54         // type of EDL
55         int edl_type;
56
57         // We are currently exporting a track at once
58         int track_number;
59
60
61         void export_it();
62         MWindow *mwindow;
63
64         int load_defaults();
65         int save_defaults();
66 private:
67         int edit_to_timecodes(Edit *edit, char *sourceinpoint, char *sourceoutpoint, char *destinpoint, char *destoutpoint, char *reel_name);
68         void double_to_CMX3600(double seconds, double frame_rate, char *str);
69
70 };
71
72 class ExportEDLItem : public BC_MenuItem
73 {
74 public:
75         ExportEDLItem(MWindow *mwindow);
76         int handle_event();
77         MWindow *mwindow;
78 };
79
80
81
82 class ExportEDL : public Thread
83 {
84 public:
85         ExportEDL(MWindow *mwindow);
86         ~ExportEDL();
87
88         void start_interactive();
89         void run();
90
91
92 // Force filename to have a 0 padded number if rendering to a list.
93
94         MWindow *mwindow;
95 //      Mutex *package_lock, *counter_lock;
96 // Copy of mwindow preferences
97 //      Preferences *preferences;
98 // Total selection to render in seconds
99         double total_start, total_end;
100
101 // Current open RenderWindow
102         ExportEDLWindow *exportedl_window;
103         ExportEDLAsset *exportasset;
104
105 };
106
107
108 class ExportEDLWindow : public BC_Window
109 {
110 public:
111         ExportEDLWindow(MWindow *mwindow, ExportEDL *exportedl, ExportEDLAsset *exportasset);
112         ~ExportEDLWindow();
113
114         void create_objects();
115
116         ExportEDLAsset *exportasset;
117
118         BrowseButton *path_button;
119         ExportEDLPathText *path_textbox;
120         BC_RecentList *path_recent;
121         ExportEDLWindowTrackList *track_list;
122
123         ArrayList<BC_ListBoxItem*> items_tracks[2];
124
125         MWindow *mwindow;
126 };
127
128
129
130
131
132 class ExportEDLPathText : public BC_TextBox
133 {
134 public:
135         ExportEDLPathText(int x, int y, ExportEDLWindow *window);
136         ~ExportEDLPathText();
137         int handle_event();
138
139         ExportEDLWindow *window;
140 };
141
142 class ExportEDLWindowTrackList : public BC_ListBox
143 {
144 public:
145         ExportEDLWindowTrackList(ExportEDLWindow *window,
146                 int x,
147                 int y,
148                 int w,
149                 int h,
150                 ArrayList<BC_ListBoxItem*> *track_list);
151
152         int handle_event();
153         ExportEDLWindow *window;
154 };
155
156
157
158
159
160
161
162
163
164 #endif