RafaMar + programmer friend Help button in Batch Render addition
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mainsession.h
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 #ifndef MAINSESSION_H
23 #define MAINSESSION_H
24
25 #include "asset.inc"
26 #include "assets.inc"
27 #include "auto.inc"
28 #include "bchash.inc"
29 #include "edit.inc"
30 #include "edits.inc"
31 #include "edl.inc"
32 #include "guicast.h"
33 #include "indexable.inc"
34 #include "mainsession.inc"
35 #include "maxchannels.h"
36 #include "mwindow.inc"
37 #include "plugin.inc"
38 #include "pluginset.inc"
39 #include "pluginserver.inc"
40 #include "track.inc"
41 #include "transition.inc"
42 #include "vwindowgui.inc"
43
44 // Options not in EDL but not changed in preferences
45 class MainSession
46 {
47 public:
48         MainSession(MWindow *mwindow);
49         ~MainSession();
50
51         int load_defaults(BC_Hash *defaults);
52         int save_defaults(BC_Hash *defaults);
53         void save_x11_host(int play_config, const char *x11_host);
54         int set_default_x11_host(int win_config=-1);
55         void default_window_positions(int window_config=0);
56         void boundaries();
57         Track *drag_handle_track();
58         void update_clip_number();
59         int load_file(const char *path);
60         int save_file(const char *path);
61
62 // For drag and drop events
63 // The entire track where the dropped asset is going to go
64         Track *track_highlighted;
65 // The edit after the point where the media is going to be dropped.
66         Edit *edit_highlighted;
67 // The plugin set where the plugin is going to be dropped.
68         PluginSet *pluginset_highlighted;
69 // The plugin after the point where the plugin is going to be dropped.
70         Plugin *plugin_highlighted;
71 // Current drag operation
72         int current_operation;
73
74 // Item being dragged
75         ArrayList <PluginServer*> *drag_pluginservers;
76         Plugin *drag_plugin;
77         Transition *drag_transition;
78 // When trim should only affect the selected edits or plugins
79         Edits *trim_edits;
80         ArrayList<Indexable*> *drag_assets;
81         ArrayList<EDL*> *drag_clips;
82         Auto *drag_auto;
83         ArrayList<Auto*> *drag_auto_gang;
84
85 // Edit whose handle is being dragged
86         Edit *drag_edit;
87 // Selected edits clip of grouped drag
88         EDL *drag_group;
89 // drag edit of selected edits
90         Edit *drag_group_edit;
91 // cursor position in selected edits at start of drag
92         double drag_group_position;
93 // top track of selected edits
94         Track *drag_group_first_track;
95 // Edits who are being dragged
96         ArrayList<Edit*> *drag_edits;
97 // Button pressed during drag
98         int drag_button;
99 // Handle being dragged
100         int drag_handle;
101 // Current position of drag cursor
102         double drag_position;
103 // Starting position of drag cursor
104         double drag_start;
105 // Cursor position when button was pressed
106         int drag_origin_x, drag_origin_y;
107 // Value of keyframe when button was pressed
108         float drag_start_percentage;
109         long drag_start_position;
110 // Amount of data rendered, for drawing status in timebar
111         double brender_end;
112 // Position of cursor in CWindow output.  Used by ruler.
113         int cwindow_output_x, cwindow_output_y;
114
115 // Show controls in CWindow
116         int cwindow_controls;
117
118 // Clip number for automatic title generation
119         int clip_number;
120 // Next group id index
121         int group_number;
122
123 // Audio session
124         int changes_made;
125
126 // filename of the current project for window titling and saving
127         char filename[BCTEXTLEN];
128
129 // title bar background blend
130         float title_bar_alpha;
131
132         int batchrender_x, batchrender_y, batchrender_w, batchrender_h;
133
134 // Window positions
135         int window_config;
136         char a_x11_host[BCSTRLEN], b_x11_host[BCSTRLEN];
137 // level window
138         int lwindow_x, lwindow_y, lwindow_w, lwindow_h;
139 // main window
140         int mwindow_x, mwindow_y, mwindow_w, mwindow_h;
141 // viewer
142         int vwindow_x, vwindow_y, vwindow_w, vwindow_h;
143 // compositor
144         int cwindow_x, cwindow_y, cwindow_w, cwindow_h;
145         int ctool_x, ctool_y;
146 // asset window
147         int awindow_x, awindow_y, awindow_w, awindow_h;
148         int gwindow_x, gwindow_y;
149 // record monitor
150         int rmonitor_x, rmonitor_y, rmonitor_w, rmonitor_h;
151 // record status
152         int rwindow_x, rwindow_y, rwindow_w, rwindow_h;
153 // channelinfo
154         int cswindow_x, cswindow_y, cswindow_w, cswindow_h;
155 // subtitle
156         int swindow_x, swindow_y, swindow_w, swindow_h;
157 // mixer tile region
158         int tile_mixers_x, tile_mixers_y, tile_mixers_w, tile_mixers_h;
159 // binfolder filter window
160         int bwindow_w, bwindow_h;
161 // error window
162         int ewindow_w, ewindow_h;
163 // Channel edit window
164         int channels_x, channels_y;
165 // Picture edit window
166         int picture_x, picture_y;
167 // Recording scope window
168         int scope_x, scope_y, scope_w, scope_h;
169 // Recording histogram window
170         int histogram_x, histogram_y, histogram_w, histogram_h;
171 // Recording scopes enabled
172         int record_scope;
173 // Recording scope parameters
174         int use_hist;
175         int use_wave;
176         int use_vector;
177         int use_hist_parade;
178         int use_wave_parade;
179         int use_wave_gain;
180         int use_vect_gain;
181         int use_smooth;
182         int use_refresh;
183         int use_release;
184         int use_graticule;
185
186         int afolders_w;
187         int show_vwindow, show_awindow, show_cwindow, show_gwindow, show_lwindow;
188         int plugindialog_w, plugindialog_h;
189 //      int presetdialog_w, presetdialog_h;
190         int keyframedialog_w, keyframedialog_h;
191         int keyframedialog_column1;
192         int keyframedialog_column2;
193         int keyframedialog_all;
194         int menueffect_w, menueffect_h;
195         int transitiondialog_w, transitiondialog_h;
196
197         int selected_zwindow;
198
199         double actual_frame_rate;
200
201 // Tip of the day
202         int current_tip;
203
204         MWindow *mwindow;
205 };
206
207 #endif