Ardour  8.12
ardour_dialog.h
Go to the documentation of this file.
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  */
41 {
42 public:
43  explicit ArdourDialog (const std::string& title, bool modal = false, bool use_separator = false);
44  ArdourDialog (Gtk::Window& parent, const std::string& title, bool modal = false, bool use_separator = false);
46 
50  void on_unmap ();
51  void on_show ();
52  virtual void on_response (int);
53  void set_ui_sensitive (bool);
54  void disallow_idle ();
55 
56 protected:
57  void pop_splash ();
58  void close_self ();
59 
60  bool _sensitive;
61 private:
64  void init ();
65  bool allow_idle;
66 
67  static sigc::signal<void> CloseAllDialogs;
68 };
69 
70 #endif // __ardour_dialog_h__
71 
void pop_splash()
void on_unmap()
This is a default handler for the signal signal_unmap().
virtual void on_response(int)
This is a default handler for the signal signal_response().
WM::ProxyTemporary * proxy
Definition: ardour_dialog.h:62
bool on_delete_event(GdkEventAny *)
This is a default handler for the signal signal_delete_event().
bool on_focus_out_event(GdkEventFocus *)
This is a default handler for the signal signal_focus_out_event().
ArdourDialog(Gtk::Window &parent, const std::string &title, bool modal=false, bool use_separator=false)
void on_show()
This is a default handler for the signal signal_show().
ArdourDialog(const std::string &title, bool modal=false, bool use_separator=false)
bool on_focus_in_event(GdkEventFocus *)
This is a default handler for the signal signal_focus_in_event().
static sigc::signal< void > CloseAllDialogs
Definition: ardour_dialog.h:67
void close_self()
void set_ui_sensitive(bool)
bool _splash_pushed
Definition: ardour_dialog.h:63
void disallow_idle()