18 new shapewipe transitions from rafa, rework savefile/confirm for nested edl edits
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cwindow.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 CWINDOW_H
23 #define CWINDOW_H
24
25 #include "auto.inc"
26 #include "autos.inc"
27 #include "cplayback.inc"
28 #include "ctracking.inc"
29 #include "cwindowgui.inc"
30 #include "edl.inc"
31 #include "floatauto.inc"
32 #include "mwindow.inc"
33 #include "remotecontrol.h"
34 #include "thread.h"
35 #include "track.inc"
36
37 class CWindow : public Thread
38 {
39 public:
40         CWindow(MWindow *mwindow);
41         ~CWindow();
42
43     void create_objects();
44 // Position is inclusive of the other 2
45         void update(int dir,
46                 int overlays,
47                 int tool_window,
48                 int operation = 0,
49                 int timebar = 0);
50         void run();
51         Track* calculate_affected_track();
52         Track* calculate_mask_track();
53 // Get keyframe for editing in the CWindow.
54 // create - if 0 forces automatic creation to be off
55 //          if 1 uses automatic creation option to create
56 // created - set to 1 if an auto was created
57 // redraw - redraw MWindow overlays if 1
58         Auto* calculate_affected_auto(Autos *autos,
59                 int create = 1,
60                 int *created = 0,
61                 int redraw = 1);
62 // Same as before.  Provide 0 to Auto arguments to have them ignored.
63         void calculate_affected_autos( Track *track,
64                 FloatAuto **x_auto, FloatAuto **y_auto, FloatAuto **z_auto,
65                 int use_camera, int create_x, int create_y, int create_z,
66                 int redraw=1);
67         void show_window();
68         void hide_window();
69         int update_position(double position);
70         void stop_playback(int wait);
71         void refresh_frame(int change_type, int dir=1);
72         void refresh_frame(int change_type, EDL *edl, int dir=1);
73
74         int destination;
75         int mask_track_id;
76         MWindow *mwindow;
77         CWindowGUI *gui;
78
79         CTracking *playback_cursor;
80         CPlayback *playback_engine;
81 };
82
83 class CWindowKeyEvHandler : public RemoteHandler
84 {
85 public:
86         CWindowKeyEvHandler(RemoteControl *remote_control);
87         ~CWindowKeyEvHandler();
88         int remote_key(int key);
89         int remote_process_key(RemoteControl *remote_control, int key);
90         int is_keytv() { return 1; }
91
92         int key, last_key;
93         RemoteControl *remote_control;
94         MWindow *mwindow;
95 };
96
97 #endif