ctrl_toggle preference, dblclk select single group/edit, update shortcuts
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / pluginset.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 PLUGINSET_H
23 #define PLUGINSET_H
24
25 #include <stdio.h>
26 #include <stdint.h>
27
28 #include "edits.h"
29 #include "edl.inc"
30 #include "keyframe.inc"
31 #include "module.inc"
32 #include "plugin.inc"
33 #include "pluginautos.inc"
34 #include "sharedlocation.inc"
35 #include "track.inc"
36
37 class PluginSet : public Edits
38 {
39 public:
40         PluginSet(EDL *edl, Track *track);
41         virtual ~PluginSet();
42
43         virtual void synchronize_params(PluginSet *plugin_set);
44         virtual PluginSet& operator=(PluginSet& plugins);
45         virtual Plugin* create_plugin() { return 0; };
46 // Returns the point to restart background rendering at.
47 // -1 means nothing changed.
48         void clear_keyframes(int64_t start, int64_t end);
49 // Clear edits only for a handle modification
50         void clear_recursive(int64_t start, int64_t end);
51         void shift_keyframes_recursive(int64_t position, int64_t length);
52         void shift_effects_recursive(int64_t position, int64_t length, int edit_autos);
53         void clear(int64_t start, int64_t end, int edit_autos);
54         void copy_from(PluginSet *src);
55         void copy(int64_t start, int64_t end, FileXML *file);
56         void copy_keyframes(int64_t start, int64_t end, FileXML *file,
57                 int use_default, int active_only);
58         void paste_keyframes(int64_t start, int64_t length, FileXML *file,
59                 int use_default, int active_only);
60 // Return the nearest boundary of any kind in the plugin edits
61         int64_t plugin_change_duration(int64_t input_position,
62                 int64_t input_length,
63                 int reverse);
64         KeyFrame *nearest_keyframe(int64_t pos, int dir);
65         void shift_effects(int64_t start, int64_t length, int edit_autos);
66         Edit* insert_edit_after(Edit *previous_edit);
67         Edit* create_edit();
68 // For testing output equivalency when a new pluginset is added.
69         Plugin* get_first_plugin();
70 // The plugin set number in the track
71         int get_number();
72         void save(FileXML *file);
73         void load(FileXML *file, uint32_t load_flags);
74         int optimize();
75         void dump(FILE *fp=stdout);
76
77 // Insert a new plugin
78         Plugin* insert_plugin(const char *title,
79                 int64_t unit_position,
80                 int64_t unit_length,
81                 int plugin_type,
82                 SharedLocation *shared_location,
83                 KeyFrame *default_keyframe,
84                 int do_optimize);
85
86         PluginAutos *automation;
87         int record;
88 };
89
90
91 #endif