anonymous contribution for improved Chromakey plugin to include sliders, textbox...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / resample / resample.C
index 29e6a2587fb690fc91e87ea620a4002184465664..90c7cccd5f5bc8337fb9ebb319dd9454db1608c6 100644 (file)
@@ -42,7 +42,7 @@ PluginClient* new_plugin(PluginServer *server)
 
 
 ResampleFraction::ResampleFraction(ResampleEffect *plugin, int x, int y)
- : BC_TextBox(x, y, 100, 1, (float)plugin->scale, 1, MEDIUMFONT, 6)
+ : BC_TextBox(x, y, xS(100), 1, (float)plugin->scale, 1, MEDIUMFONT, 6)
 {
        this->plugin = plugin;
 }
@@ -62,25 +62,30 @@ int ResampleFraction::handle_event()
 
 ResampleWindow::ResampleWindow(ResampleEffect *plugin, int x, int y)
  : BC_Window(_(PROGRAM_NAME ": Resample"),
-                               x - 160,
-                               y - 75,
-                               320,
-                               150,
-                               320,
-                               150,
+                               x - xS(160),
+                               y - yS(75),
+                               xS(320),
+                               yS(150),
+                               xS(320),
+                               yS(150),
                                0,
                                0,
                                1)
 {
        this->plugin = plugin;
+// *** CONTEXT_HELP ***
+       if(plugin) context_help_set_keyword(plugin->plugin_title());
+       else       context_help_set_keyword("Rendered Audio Effects");
 }
 
 void ResampleWindow::create_objects()
 {
-       int x = 10, y = 10;
+       int xs10 = xS(10);
+       int ys10 = yS(10), ys20 = yS(20);
+       int x = xs10, y = ys10;
        lock_window("ResampleWindow::create_objects");
        add_subwindow(new BC_Title(x, y, _("Scale factor:")));
-       y += 20;
+       y += ys20;
        add_subwindow(new ResampleFraction(plugin, x, y));
        add_subwindow(new BC_OKButton(this));
        add_subwindow(new BC_CancelButton(this));