X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fscale.C;h=b963bb9304faaa1c80f310c1ba27993c6f4ae48b;hb=d60a59baa6cfe24c0fb153ed9e150a834ba29feb;hp=a61e31ffa0af2e1482ec54cd90871e49f1e0dada;hpb=0b78779e9e75131eee81d2e4689b98df0e91c092;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/scale.C b/cinelerra-5.1/cinelerra/scale.C index a61e31ff..b963bb93 100644 --- a/cinelerra-5.1/cinelerra/scale.C +++ b/cinelerra-5.1/cinelerra/scale.C @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ #include "bchash.h" @@ -34,12 +34,12 @@ Scale::Scale(MWindow *mwindow) : BC_MenuItem(_("Resize...")) -{ - this->mwindow = mwindow; +{ + this->mwindow = mwindow; thread = new ScaleThread(mwindow); } -Scale::~Scale() +Scale::~Scale() { delete thread; } @@ -51,8 +51,8 @@ int Scale::handle_event() ScaleThread::ScaleThread(MWindow *mwindow) : Thread() -{ - this->mwindow = mwindow; +{ + this->mwindow = mwindow; already_running = 0; } @@ -173,7 +173,7 @@ int ScaleThread::update_window(int offset_updated) // window->offsets[2]->update(offsets[2]); // window->offsets[3]->update(offsets[3]); // } - + update_aspect(window); return 0; } @@ -203,6 +203,7 @@ ScaleWindow::~ScaleWindow() void ScaleWindow::create_objects() { + lock_window("ScaleWindow::create_objects"); int x = 10, y = 10; add_subwindow(new BC_Title(x, y, _("New camera size:"))); add_subwindow(new BC_Title(x + 200, y, _("New projector size:"))); @@ -289,33 +290,34 @@ void ScaleWindow::create_objects() // ScalePosition *position; // x = 60; // y += 25; -// add_subwindow(position1 = new ScalePosition(x, y, thread, this, +// add_subwindow(position1 = new ScalePosition(x, y, thread, this, // &(thread->orig_dimension[0]), &(thread->dimension[0]), &(thread->offsets[0]))); // position1->draw(); // x += 200; -// add_subwindow(position2 = new ScalePosition(x, y, thread, this, +// add_subwindow(position2 = new ScalePosition(x, y, thread, this, // &(thread->orig_dimension[2]), &(thread->dimension[2]), &(thread->offsets[2]))); // position2->draw(); // y += 110; x = 10; - add_subwindow(new ScaleConstrain(x, y, thread)); + add_subwindow(new ScaleConstrain(x, y, thread)); x += 200; - add_subwindow(new ScaleData(x, y, thread)); + add_subwindow(new ScaleData(x, y, thread)); y += 30; x = 50; add_subwindow(new BC_OKButton(x, y)); x += 200; add_subwindow(new BC_CancelButton(x, y)); + unlock_window(); } ScaleSizeText::ScaleSizeText(int x, int y, ScaleThread *thread, int *output) : BC_TextBox(x, y, 100, 1, *output) -{ - this->thread = thread; - this->output = output; +{ + this->thread = thread; + this->output = output; } ScaleSizeText::~ScaleSizeText() {} int ScaleSizeText::handle_event()