tweak zoom/fullscr to remember cwdw scale after fullscr
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / pluginclient.h
index b59d71fd40376a48b9c4852f41a904ae83d32ca8..96f5540b140bdfc1afd97369b245947cbdb3cd53 100644 (file)
@@ -161,10 +161,93 @@ public:
        virtual int translation_event();
        virtual int close_event();
        virtual void done_event(int result) {}
+// A listener for PluginParam events
+       virtual void param_updated();
 
        PluginClient *client;
 };
 
+// A GUI helper
+class PluginFPot : public BC_FPot
+{
+public:
+    PluginFPot(PluginParam *param, int x, int y);
+    int handle_event();
+        PluginParam *param;
+};
+
+class PluginIPot : public BC_IPot
+{
+public:
+    PluginIPot(PluginParam *param, int x, int y);
+    int handle_event();
+        PluginParam *param;
+};
+
+class PluginQPot : public BC_QPot
+{
+public:
+    PluginQPot(PluginParam *param, int x, int y);
+    int handle_event();
+        PluginParam *param;
+};
+
+class PluginText : public BC_TextBox
+{
+public:
+    PluginText(PluginParam *param, int x, int y, int value);
+    PluginText(PluginParam *param, int x, int y, float value);
+    int handle_event();
+        PluginParam *param;
+};
+
+class PluginParam
+{
+public:
+    PluginParam(PluginClient *plugin,
+        PluginClientWindow *gui,
+        int x1,
+        int x2,
+        int x3,
+        int y,
+        int text_w,
+        int *output_i,
+        float *output_f, // floating point output
+        int *output_q, // frequency output
+        const char *title,
+        float min,
+        float max);
+    ~PluginParam();
+
+    void initialize();
+    void update(int skip_text, int skip_pot);
+// set the number of fractional digits
+    void set_precision(int digits);
+
+// 2 possible outputs
+    float *output_f;
+    PluginFPot *fpot;
+
+    int *output_i;
+    PluginIPot *ipot;
+
+    int *output_q;
+    PluginQPot *qpot;
+
+    char *title;
+    PluginText *text;
+    PluginClientWindow *gui;
+    PluginClient *plugin;
+    int x1;
+    int x2;
+    int x3;
+    int y;
+    int text_w;
+    float min;
+    float max;
+    int precision;
+};
+
 
 
 
@@ -321,6 +404,9 @@ public:
 // get current camera and projector position
        void get_camera(float *x, float *y, float *z, int64_t position);
        void get_projector(float *x, float *y, float *z, int64_t position);
+
+       void output_to_track(float ox, float oy, float &tx, float &ty);
+       void track_to_output(float tx, float ty, float &ox, float &oy);
 // When this plugin is adjusted, propogate parameters back to EDL and virtual
 // console.  This gets a keyframe from the EDL, with the position set to the
 // EDL tracking position.
@@ -333,7 +419,6 @@ public:
        int gui_open();
 
 
-
 // Length of source.  For effects it's the plugin length.  For transitions
 // it's the transition length.  Relative to the requested rate.
 // The only way to get smooth interpolation is to make all position queries
@@ -359,10 +444,8 @@ public:
 // the requested rate.
        int64_t get_source_position();
 
-// Get the EDL Session.  May return 0 if the server has no edl.
-       EDLSession* get_edlsession();
-
-
+// Get server edl
+       EDL *get_edl();
 // Get the direction of the most recent process_buffer
        int get_direction();