prevent popup deactivation while button_down
[goodguy/history.git] / cinelerra-5.0 / 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
42 // Options not in EDL but not changed in preferences
43 class MainSession
44 {
45 public:
46         MainSession(MWindow *mwindow);
47         ~MainSession();
48
49         int load_defaults(BC_Hash *defaults);
50         int save_defaults(BC_Hash *defaults);
51         void save_x11_host(int play_config, const char *x11_host);
52         int set_default_x11_host(int win_config=-1);
53         void default_window_positions(int window_config=0);
54         void boundaries();
55
56
57
58
59
60 // For drag and drop events
61 // The entire track where the dropped asset is going to go
62         Track *track_highlighted;
63 // The edit after the point where the media is going to be dropped.
64         Edit *edit_highlighted;
65 // The plugin set where the plugin is going to be dropped.
66         PluginSet *pluginset_highlighted;
67 // The plugin after the point where the plugin is going to be dropped.
68         Plugin *plugin_highlighted;
69 // Viewer canvas highlighted
70         int vcanvas_highlighted;
71 // Compositor canvas highlighted
72         int ccanvas_highlighted;
73 // Current drag operation
74         int current_operation;
75 // Free drag enabled
76         int free_drag;
77 // Item being dragged
78         ArrayList <PluginServer*> *drag_pluginservers;
79         Plugin *drag_plugin;
80 // When trim should only affect the selected edits or plugins
81         Edits *trim_edits;
82         ArrayList<Indexable*> *drag_assets;
83         ArrayList<EDL*> *drag_clips;
84         Auto *drag_auto;
85         ArrayList<Auto*> *drag_auto_gang;
86
87 // Edit whose handle is being dragged
88         Edit *drag_edit;
89 // Edits who are being dragged
90         ArrayList<Edit*> *drag_edits;
91 // Button pressed during drag
92         int drag_button;
93 // Handle being dragged
94         int drag_handle;
95 // Current position of drag cursor
96         double drag_position;
97 // Starting position of drag cursor
98         double drag_start;
99 // Cursor position when button was pressed
100         int drag_origin_x, drag_origin_y;
101 // Value of keyframe when button was pressed
102         float drag_start_percentage;
103         long drag_start_position;
104 // Records for redrawing brender position in timebar
105         double brender_end;
106 // Position of cursor in CWindow output.  Used by ruler.
107         int cwindow_output_x, cwindow_output_y;
108
109 // Show controls in CWindow
110         int cwindow_controls;
111
112 // Clip number for automatic title generation
113         int clip_number;
114
115 // Audio session
116         int changes_made;
117
118 // filename of the current project for window titling and saving
119         char filename[BCTEXTLEN];
120
121         int batchrender_x, batchrender_y, batchrender_w, batchrender_h;
122
123 // Window positions
124         int window_config;
125         char a_x11_host[BCSTRLEN], b_x11_host[BCSTRLEN];
126 // level window
127         int lwindow_x, lwindow_y, lwindow_w, lwindow_h;
128 // main window
129         int mwindow_x, mwindow_y, mwindow_w, mwindow_h;
130 // viewer
131         int vwindow_x, vwindow_y, vwindow_w, vwindow_h;
132 // compositor
133         int cwindow_x, cwindow_y, cwindow_w, cwindow_h;
134         int ctool_x, ctool_y;
135 // asset window
136         int awindow_x, awindow_y, awindow_w, awindow_h;
137         int gwindow_x, gwindow_y;
138 // record monitor
139         int rmonitor_x, rmonitor_y, rmonitor_w, rmonitor_h;
140 // record status
141         int rwindow_x, rwindow_y, rwindow_w, rwindow_h;
142 // channelinfo
143         int cswindow_x, cswindow_y, cswindow_w, cswindow_h;
144 // subtitle
145         int swindow_x, swindow_y, swindow_w, swindow_h;
146 // error window
147         int ewindow_w, ewindow_h;
148 // Channel edit window
149         int channels_x, channels_y;
150 // Picture edit window
151         int picture_x, picture_y;
152 // Recording scope window
153         int scope_x, scope_y, scope_w, scope_h;
154 // Recording histogram window
155         int histogram_x, histogram_y, histogram_w, histogram_h;
156 // Recording scopes enabled
157         int record_scope;
158 // Recording scope parameters
159         int use_hist;
160         int use_wave;
161         int use_vector;
162         int use_hist_parade;
163         int use_wave_parade;
164
165
166         int afolders_w;
167         int show_vwindow, show_awindow, show_cwindow, show_gwindow, show_lwindow;
168         int plugindialog_w, plugindialog_h;
169         int presetdialog_w, presetdialog_h;
170         int keyframedialog_w, keyframedialog_h;
171         int keyframedialog_column1;
172         int keyframedialog_column2;
173         int keyframedialog_all;
174         int menueffect_w, menueffect_h;
175         int transitiondialog_w, transitiondialog_h;
176
177         int cwindow_fullscreen;
178         int rwindow_fullscreen;
179         int vwindow_fullscreen;
180
181
182         double actual_frame_rate;
183
184 // Tip of the day
185         int current_tip;
186
187         MWindow *mwindow;
188 };
189
190 #endif