improve delays created by vicon drawing locks, reset_cache segv fix, gang track toolt...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / transition.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 TRANSITION_H
23 #define TRANSITION_H
24
25 class PasteTransition;
26
27 #include <stdio.h>
28 #include <stdint.h>
29
30 #include "edit.inc"
31 #include "filexml.inc"
32 #include "mwindow.inc"
33 #include "messages.inc"
34 #include "plugin.h"
35 #include "sharedlocation.h"
36
37 class TransitionMenuItem : public BC_MenuItem
38 {
39 public:
40         TransitionMenuItem(MWindow *mwindow, int audio, int video);
41         ~TransitionMenuItem();
42         int handle_event();
43         int audio;
44         int video;
45 //      PasteTransition *thread;
46 };
47
48 class PasteTransition : public Thread
49 {
50 public:
51         PasteTransition(MWindow *mwindow, int audio, int video);
52         ~PasteTransition();
53
54         void run();
55
56         MWindow *mwindow;
57         int audio, video;
58 };
59
60
61 class Transition : public Plugin
62 {
63 public:
64         Transition(EDL *edl, Edit *edit, const char *title, long unit_length);
65
66         Edit *edit;
67         void save_xml(FileXML *file);
68         void load_xml(FileXML *file);
69
70         Transition(Transition *that, Edit *edit);
71         ~Transition();
72         int is_transition() { return 1; }
73
74         KeyFrame* get_keyframe();
75         int reset_parameters();
76         int update_derived();
77         Transition& operator=(Transition &that);
78         Plugin& operator=(Plugin &that);
79         Edit& operator=(Edit &that);
80         int operator==(Transition &that);
81         int operator==(Plugin &that);
82         int operator==(Edit &that);
83         int identical(Transition *that);
84
85 // Only the show value from the attachment point is used.
86         int set_show_derived(int value) { return 0; }
87
88         int popup_transition(int x, int y);
89 // Update the widgets after loading
90         int update_display();
91 // Update edit after attaching
92         int update_edit(int is_loading);
93         const char* default_title();
94         void dump(FILE *fp);
95
96 private:
97 // Only used by operator= and copy constructor
98         void copy_from(Transition *that);
99 };
100
101 #endif