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