Merge CV, ver=5.1; ops/methods from HV, and interface from CV where possible
[goodguy/history.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 "floatauto.inc"
31 #include "mwindow.inc"
32 #include "remotecontrol.h"
33 #include "thread.h"
34 #include "track.inc"
35
36 class CWindow : public Thread
37 {
38 public:
39         CWindow(MWindow *mwindow);
40         ~CWindow();
41         
42     void create_objects();
43 // Position is inclusive of the other 2
44         void update(int position, 
45                 int overlays, 
46                 int tool_window, 
47                 int operation = 0,
48                 int timebar = 0);
49         void run();
50         Track* calculate_affected_track();
51 // Get keyframe for editing in the CWindow.
52 // create - if 0 forces automatic creation to be off
53 //          if 1 uses automatic creation option to create
54 // created - set to 1 if an auto was created
55 // redraw - redraw MWindow overlays if 1
56         Auto* calculate_affected_auto(Autos *autos, 
57                 int create = 1,
58                 int *created = 0,
59                 int redraw = 1);
60 // Same as before.  Provide 0 to Auto arguments to have them ignored.
61         void calculate_affected_autos(FloatAuto **x_auto,
62                 FloatAuto **y_auto,
63                 FloatAuto **z_auto,
64                 Track *track,
65                 int use_camera,
66                 int create_x,
67                 int create_y,
68                 int create_z);
69         void show_window();
70         void hide_window();
71         int update_position(double position);
72
73         int destination;
74         MWindow *mwindow;
75         CWindowGUI *gui;
76         
77         CTracking *playback_cursor;
78         CPlayback *playback_engine;
79 };
80
81 class CWindowRemoteHandler : public RemoteHandler
82 {
83         int last_key;
84 public:
85         int remote_process_key(RemoteControl *remote_control, int key);
86
87         CWindowRemoteHandler(RemoteControl *remote_control);
88         ~CWindowRemoteHandler();
89 };
90
91 #endif