usb_direct fix for rev2 shuttle, playbackengine locks again, viewer cursor fix
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / splashgui.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "bcdisplayinfo.h"
23 #include "language.h"
24 #include "mwindow.inc"
25 #include "splashgui.h"
26 #include "vframe.h"
27
28 #include <unistd.h>
29
30
31
32 SplashGUI::SplashGUI(VFrame *bg, int x, int y)
33  : BC_Window(_(PROGRAM_NAME ": Loading"), x, y, bg->get_w(), bg->get_h(),
34                 -1, -1, 0, 0, 1, -1, "", 0)
35 {
36         this->bg = bg;
37 }
38
39 SplashGUI::~SplashGUI()
40 {
41         delete bg;
42 }
43
44 void SplashGUI::create_objects()
45 {
46         lock_window("SplashGUI::create_objects");
47         draw_vframe(bg, 0, 0);
48         flash();
49         show_window();
50         operation = new BC_Title(5,
51                         get_h() - get_text_height(MEDIUMFONT) - 5,
52                         _("Loading..."), MEDIUMFONT, GREEN);
53         add_subwindow(operation);
54         unlock_window();
55 }
56
57 void SplashGUI::update_status(const char *text)
58 {
59         lock_window("SplashGUI::update_status");
60         operation->update(text);
61         unlock_window();
62 }
63