X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fscale.C;h=b963bb9304faaa1c80f310c1ba27993c6f4ae48b;hb=c279e21fc2394a7908bbd1ba8c79b116fe9fb14a;hp=15fbbce5539878515081c5a8e521e2645c1ebbd9;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/scale.C b/cinelerra-5.1/cinelerra/scale.C index 15fbbce5..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:"))); @@ -273,7 +274,7 @@ void ScaleWindow::create_objects() sprintf(string, "%.0f", thread->aspect_w); add_subwindow(aspect_w = new ScaleAspectW(x, y, thread, &(thread->aspect_w), string)); x += 55; - add_subwindow(new BC_Title(x, y, _(":"))); + add_subwindow(new BC_Title(x, y, ":")); x += 10; sprintf(string, "%.0f", thread->aspect_h); add_subwindow(aspect_h = new ScaleAspectH(x, y, thread, &(thread->aspect_h), string)); @@ -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()