Reenable the correct sort column and type when redisplaying regions
[ardour.git] / gtk2_ardour / ardour_dialog.h
1 /*
2  * Copyright (C) 2005-2006 Taybin Rutkin <taybin@taybin.com>
3  * Copyright (C) 2005-2013 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2008-2011 David Robillard <d@drobilla.net>
5  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef __ardour_dialog_h__
23 #define __ardour_dialog_h__
24
25 #include <gtkmm/window.h>
26 #include <gtkmm/dialog.h>
27
28 #include "ardour/session_handle.h"
29
30 namespace WM {
31         class ProxyTemporary;
32 }
33
34 /*
35  * This virtual parent class is so that each dialog box uses the
36  * same mechanism to declare its closing. It shares a common
37  * method of connecting and disconnecting from a Session with
38  * all other objects that have a handle on a Session.
39  */
40 class ArdourDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr
41 {
42 public:
43         ArdourDialog (std::string title, bool modal = false, bool use_separator = false);
44         ArdourDialog (Gtk::Window& parent, std::string title, bool modal = false, bool use_separator = false);
45         ~ArdourDialog();
46
47         bool on_focus_in_event (GdkEventFocus*);
48         bool on_focus_out_event (GdkEventFocus*);
49         bool on_delete_event (GdkEventAny*);
50         void on_unmap ();
51         void on_show ();
52         virtual void on_response (int);
53
54 protected:
55         void pop_splash ();
56         void close_self ();
57
58 private:
59         WM::ProxyTemporary* proxy;
60         bool _splash_pushed;
61         void init ();
62
63         static sigc::signal<void> CloseAllDialogs;
64 };
65
66 #endif // __ardour_dialog_h__
67