fix mistaken "do not roll" conclusion in TransportFSM::compute_should_roll()
[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
39         static Splash* instance();
40         static void drop();
41         static bool exists ();
42
43         void display ();
44         void pop_back_for (Gtk::Window&);
45         void pop_front ();
46
47         bool expose (GdkEventExpose*);
48         bool on_button_release_event (GdkEventButton*);
49         void on_realize ();
50         bool on_map_event (GdkEventAny*);
51         void message (const std::string& msg);
52         void hide ();
53
54 private:
55         Splash ();
56         static Splash* the_splash;
57
58         Glib::RefPtr<Gdk::Pixbuf> pixbuf;
59         Gtk::DrawingArea darea;
60         Glib::RefPtr<Pango::Layout> layout;
61
62         void boot_message (std::string);
63         PBD::ScopedConnection msg_connection;
64
65         sigc::connection idle_connection;
66         volatile bool expose_done;
67         bool expose_is_the_one;
68         bool idle_after_expose ();
69 };
70
71 #endif /* __ardour_gtk_splash_h__ */