version update, docs Features5 msg/txt, shuttle tweaks for build
[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
68
69
70         void save_xml(FileXML *file);
71         void load_xml(FileXML *file);
72
73
74
75
76         Transition(Transition *that, Edit *edit);
77         ~Transition();
78
79         KeyFrame* get_keyframe();
80         int reset_parameters();
81         int update_derived();
82         Transition& operator=(Transition &that);
83         Plugin& operator=(Plugin &that);
84         Edit& operator=(Edit &that);
85         int operator==(Transition &that);
86         int operator==(Plugin &that);
87         int operator==(Edit &that);
88         int identical(Transition *that);
89
90 // Only the show value from the attachment point is used.
91         int set_show_derived(int value) { return 0; }
92
93         int popup_transition(int x, int y);
94 // Update the widgets after loading
95         int update_display();
96 // Update edit after attaching
97         int update_edit(int is_loading);
98         const char* default_title();
99         void dump(FILE *fp);
100
101 private:
102 // Only used by operator= and copy constructor
103         void copy_from(Transition *that);
104 };
105
106 #endif