remove empty methods and signal connections
[ardour.git] / gtk2_ardour / splash.h
1 /*
2  * Copyright (C) 2008-2009 David Robillard <d@drobilla.net>
3  * Copyright (C) 2009-2013 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
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 along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 #ifndef __ardour_gtk_splash_h__
22 #define __ardour_gtk_splash_h__
23
24 #include <gtkmm/window.h>
25 #include <gtkmm/drawingarea.h>
26 #include <gtkmm/box.h>
27 #include <gtkmm/label.h>
28 #include <gdkmm/pixbuf.h>
29
30 #include "pbd/signals.h"
31
32 class ARDOUR_UI;
33
34 class Splash : public Gtk::Window
35 {
36 public:
37         Splash ();
38         ~Splash ();
39
40         static Splash* instance() { return the_splash; }
41
42         void display ();
43         void pop_back_for (Gtk::Window&);
44         void pop_front ();
45
46         bool expose (GdkEventExpose*);
47         bool on_button_release_event (GdkEventButton*);
48         void on_realize ();
49         bool on_map_event (GdkEventAny*);
50         void message (const std::string& msg);
51         void hide ();
52
53 private:
54         static Splash* the_splash;
55
56         Glib::RefPtr<Gdk::Pixbuf> pixbuf;
57         Gtk::DrawingArea darea;
58         Glib::RefPtr<Pango::Layout> layout;
59
60         void boot_message (std::string);
61         PBD::ScopedConnection msg_connection;
62
63         sigc::connection idle_connection;
64         volatile bool expose_done;
65         bool expose_is_the_one;
66         bool idle_after_expose ();
67 };
68
69 #endif /* __ardour_gtk_splash_h__ */