Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

plugin.h

Go to the documentation of this file.
00001 #ifndef PLUGIN_H
00002 #define PLUGIN_H
00003 
00004 #include "guicast.h"
00005 #include "edit.h"
00006 #include "edl.inc"
00007 #include "filexml.inc"
00008 #include "keyframe.inc"
00009 #include "keyframes.inc"
00010 #include "module.inc"
00011 #include "plugin.inc"
00012 #include "pluginset.inc"
00013 #include "pluginpopup.inc"
00014 #include "pluginserver.inc"
00015 #include "renderengine.inc"
00016 #include "sharedlocation.h"
00017 #include "virtualnode.inc"
00018 
00019 class PluginOnToggle;
00020 
00021 
00022 
00023 // Plugin is inherited by Transition, Plugins
00024 class Plugin : public Edit
00025 {
00026 public:
00027 // Plugin which belongs to a transition.
00028         Plugin(EDL *edl, 
00029                 Track *track, 
00030                 char *title);
00031 // Called by  PluginSet::create_edit, PluginSet::insert_edit_after.
00032 // Plugin can't take a track because it would get the edits pointer from 
00033 // the track instead of the plugin set.
00034         Plugin(EDL *edl, 
00035                 PluginSet *plugin_set, 
00036                 char *title);
00037         virtual ~Plugin();
00038 
00039         virtual Plugin& operator=(Plugin& edit);
00040         virtual Edit& operator=(Edit& edit);
00041 
00042 // Called by Edits::equivalent_output to override the keyframe behavior and check
00043 // title.
00044         void equivalent_output(Edit *edit, int64_t *result);
00045 
00046 // Called by playable tracks to test for playable server.
00047 // Descends the plugin tree without creating a virtual console.
00048         int is_synthesis(RenderEngine *renderengine, 
00049                 int64_t position, 
00050                 int direction);
00051 
00052         virtual int operator==(Plugin& that);
00053         virtual int operator==(Edit& that);
00054 
00055         virtual void copy_from(Edit *edit);
00056 
00057 
00058 // Called by == operators, Edit::equivalent output
00059 // to test title and keyframe of transition.
00060         virtual int identical(Plugin *that);
00061 // Called by render_gui.  Only need the track, position, and pluginset
00062 // to determine a corresponding GUI.
00063         int identical_location(Plugin *that);
00064         virtual void synchronize_params(Edit *edit);
00065 // Used by Edits::insert_edits and Plugin::shift to shift plugin keyframes
00066         void shift_keyframes(int64_t position);
00067 
00068         void change_plugin(char *title, 
00069                 SharedLocation *shared_location, 
00070                 int plugin_type);
00071 // For synchronizing parameters
00072         void copy_keyframes(Plugin *plugin);
00073 // For copying to clipboard
00074         void copy_keyframes(int64_t start, 
00075                 int64_t end, 
00076                 FileXML *file, 
00077                 int default_only,
00078                 int autos_only);
00079 // For editing automation.  
00080 // Returns the point to restart background rendering at.
00081 // -1 means nothing changed.
00082         void clear_keyframes(int64_t start, int64_t end);
00083         void copy(int64_t start, int64_t end, FileXML *file);
00084         void paste(FileXML *file);
00085         void load(FileXML *file);
00086 // Shift in time
00087         void shift(int64_t difference);
00088         void dump();
00089 // Called by PluginClient sequence to get rendering parameters
00090         KeyFrame* get_prev_keyframe(int64_t position, int direction);
00091         KeyFrame* get_next_keyframe(int64_t position, int direction);
00092 // If this is a standalone plugin fill its location in the result.
00093 // If it's shared copy the shared location into the result
00094         void get_shared_location(SharedLocation *result);
00095 // Get keyframes for editing with automatic creation if enabled.
00096 // The direction is always assumed to be forward.
00097         virtual KeyFrame* get_keyframe();
00098         int silence();
00099 // Calculate title given plugin type.  Used by TrackCanvas::draw_plugins
00100         void calculate_title(char *string, int use_nudge);
00101 // Resolve objects pointed to by shared_location
00102         Track* get_shared_track();
00103 //      Plugin* get_shared_plugin();
00104 
00105 // Need to resample keyframes
00106         void resample(double old_rate, double new_rate);
00107 
00108 // The title of the plugin is stored and not the plugindb entry in case it doesn't exist in the db
00109 // Title of the plugin currently attached
00110         char title[BCTEXTLEN];           
00111         int plugin_type;
00112 // In and out aren't used anymore.
00113         int in, out;
00114         int show, on;
00115         PluginSet *plugin_set;
00116 
00117 // Data for the plugin is stored here.  Default keyframe always exists.
00118 // As for storing in PluginSet instead of Plugin:
00119 
00120 // Each plugin needs a default keyframe of its own.
00121 // The keyframes are meaningless except for the plugin they're stored in.
00122 // Default keyframe has position = 0.
00123 // Other keyframes have absolute position.
00124         KeyFrames *keyframes;
00125 
00126 // location of plugin if shared
00127         SharedLocation shared_location;
00128 };
00129 
00130 
00131 
00132 
00133 
00134 
00135 #endif

Generated on Sun Jan 8 13:38:58 2006 for Cinelerra-svn by  doxygen 1.4.4