X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fquestion.C;fp=cinelerra-5.0%2Fcinelerra%2Fquestion.C;h=0000000000000000000000000000000000000000;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hp=b0f2ac78d1bc41a4f5773b43384755ac47905770;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/question.C b/cinelerra-5.0/cinelerra/question.C deleted file mode 100644 index b0f2ac78..00000000 --- a/cinelerra-5.0/cinelerra/question.C +++ /dev/null @@ -1,97 +0,0 @@ - -/* - * 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 "bcsignals.h" -#include "language.h" -#include "mwindow.h" -#include "mwindowgui.h" -#include "question.h" -#include "theme.h" - - -#define WIDTH 375 -#define HEIGHT 160 - -QuestionWindow::QuestionWindow(MWindow *mwindow) - : BC_Window(_(PROGRAM_NAME ": Question"), - mwindow->gui->get_abs_cursor_x(1) - WIDTH / 2, - mwindow->gui->get_abs_cursor_y(1) - HEIGHT / 2, - WIDTH, - HEIGHT) -{ - this->mwindow = mwindow; -} - -QuestionWindow::~QuestionWindow() -{ -} - -void QuestionWindow::create_objects(const char *string, int use_cancel) -{ - lock_window("QuestionWindow::create_objects"); - int x = 10, y = 10; - add_subwindow(new BC_Title(10, 10, string)); - y += 30; - add_subwindow(new QuestionYesButton(mwindow, this, x, y)); - x += get_w() / 2; - add_subwindow(new QuestionNoButton(mwindow, this, x, y)); - x = get_w() - 100; - if(use_cancel) add_subwindow(new BC_CancelButton(x, y)); - unlock_window(); -} - -QuestionYesButton::QuestionYesButton(MWindow *mwindow, QuestionWindow *window, int x, int y) - : BC_GenericButton(x, y, _("Yes")) -{ - this->window = window; - set_underline(0); -} - -int QuestionYesButton::handle_event() -{ - set_done(2); - return 1; -} - -int QuestionYesButton::keypress_event() -{ - if(get_keypress() == 'y') { handle_event(); return 1; } - return 0; -} - -QuestionNoButton::QuestionNoButton(MWindow *mwindow, QuestionWindow *window, int x, int y) - : BC_GenericButton(x, y, _("No")) -{ - this->window = window; - set_underline(0); -} - -int QuestionNoButton::handle_event() -{ - set_done(0); - return 1; -} - -int QuestionNoButton::keypress_event() -{ - if(get_keypress() == 'n') { handle_event(); return 1; } - return 0; -}