X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fmandelcuda%2Fmandelbrotwindow.C;h=f1b0550214864cab7f2f1caaf2fc7fe16c12d447;hb=1529091cdf16df199a901aabe6e8fa1813a933af;hp=c4b1168774616d9b58848f21dbb84062439151ca;hpb=b1649fe7b38cfb4bbec58b19fb8dda2daa0ce520;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C b/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C index c4b11687..f1b05502 100644 --- a/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C +++ b/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C @@ -33,7 +33,7 @@ #include "theme.h" MandelbrotWindow::MandelbrotWindow(Mandelbrot *plugin) - : PluginClientWindow(plugin, 180, 130, 180, 130, 0) + : PluginClientWindow(plugin, xS(180), yS(130), xS(180), yS(130), 0) { this->plugin = plugin; press_x = press_y = 0; @@ -47,7 +47,7 @@ MandelbrotWindow::~MandelbrotWindow() void MandelbrotWindow::create_objects() { - int x = 10, y = 10, pad = 5; + int x = xS(10), y = yS(10), pad = xS(5); BC_Title *title; add_subwindow(title = new BC_Title(x,y, _("Mandelbrot:"), MEDIUMFONT, YELLOW)); y += title->get_h() + pad; @@ -162,10 +162,9 @@ MandelbrotDrag::MandelbrotDrag(MandelbrotWindow *gui, int x, int y) int MandelbrotDrag::handle_event() { CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui; - int value = get_value(); - if( value ) { + if( get_value() ) { if( !gui->grab(cwindow_gui) ) { - update(value = 0); + update(*value = 0); flicker(10,50); } } @@ -173,6 +172,13 @@ int MandelbrotDrag::handle_event() gui->ungrab(cwindow_gui); return 1; } +int MandelbrotDrag::handle_ungrab() +{ + CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui; + int ret = gui->ungrab(cwindow_gui); + if( ret ) update(*value = 0); + return ret; +} MandelbrotIsJulia::MandelbrotIsJulia(MandelbrotWindow *gui, int x, int y) : BC_CheckBox(x, y, gui->plugin->config.is_julia, _("Julia"))