Debian Codegraph @

foned/MovieWindow.cpp

raw
1 /* MovieWindow.cpp
2 *
3 * Copyright (C) 2011-2020,2022 Paul Boersma
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "MovieWindow.h"
20
21 Thing_implement (MovieWindow, FunctionEditor, 0);
22
23 autoMovieWindow MovieWindow_create (conststring32 title, Movie movie) {
24 try {
25 autoMovieWindow me = Thing_new (MovieWindow);
26 my videoArea() = MovieArea_create (true, nullptr, me.get());
27 if (movie -> d_sound) {
28 my soundArea() = SoundArea_create (false, nullptr, me.get());
29 my soundAnalysisArea() = SoundAnalysisArea_create (false, nullptr, me.get());
30 }
31 FunctionEditor_init (me.get(), title, movie);
32 return me;
33 } catch (MelderError) {
34 Melder_throw (U"Movie window not created.");
35 }
36 }
37
38 /* End of file MovieWindow.cpp */