initial commit
[goodguy/history.git] / cinelerra-5.0 / 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",
34                 x,
35                 y,
36                 bg->get_w(),
37                 bg->get_h(),
38                 -1,
39                 -1,
40                 0,
41                 0,
42                 1,
43                 -1,
44                 "",
45                 0)
46 {
47         this->bg = bg;
48 }
49
50 SplashGUI::~SplashGUI()
51 {
52         delete bg;
53 }
54
55 void SplashGUI::create_objects()
56 {
57         draw_vframe(bg, 0, 0);
58         flash();
59         show_window();
60
61         add_subwindow(progress = new BC_ProgressBar(5, 
62                 get_h() - get_resources()->progress_images[0]->get_h() - 5,
63                 get_w() - 10,
64                 0,
65                 0));
66         add_subwindow(operation = 
67                 new BC_Title(5, 
68                         progress->get_y() - get_text_height(MEDIUMFONT) - 5,
69                         _("Loading...")));
70 }
71
72