Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
23 
24 #include <gtkmm/window.h>
25 #include <gtkmm/dialog.h>
26 
27 #include "ardour/session_handle.h"
28 
29 namespace WM {
30  class ProxyTemporary;
31 }
32 
33 /*
34  * This virtual parent class is so that each dialog box uses the
35  * same mechanism to declare its closing. It shares a common
36  * method of connecting and disconnecting from a Session with
37  * all other objects that have a handle on a Session.
38  */
40 {
41 public:
42  explicit ArdourDialog (const std::string& title, bool modal = false, bool use_separator = false);
43  ArdourDialog (Gtk::Window& parent, const std::string& title, bool modal = false, bool use_separator = false);
45 
49  void on_unmap ();
50  void on_show ();
51  virtual void on_response (int);
52  void set_ui_sensitive (bool);
53  void disallow_idle ();
54 
55 protected:
56  void pop_splash ();
57  void close_self ();
58 
59  bool _sensitive;
60 private:
63  void init ();
64  bool allow_idle;
65 
66  static sigc::signal<void> CloseAllDialogs;
67 };
68 
69 
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:61
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:66
void close_self()
void set_ui_sensitive(bool)
bool _splash_pushed
Definition: ardour_dialog.h:62
void disallow_idle()