2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2005-2006 Taybin Rutkin <taybin@taybin.com>
|
|
|
|
* Copyright (C) 2005-2013 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2008-2011 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2017 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2024-09-25 20:38:59 -04:00
|
|
|
#pragma once
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
#include <gtkmm/window.h>
|
2005-09-26 11:00:36 -04:00
|
|
|
#include <gtkmm/dialog.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
#include "ardour/session_handle.h"
|
|
|
|
|
2013-05-07 22:09:16 -04:00
|
|
|
namespace WM {
|
|
|
|
class ProxyTemporary;
|
|
|
|
}
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/*
|
|
|
|
* This virtual parent class is so that each dialog box uses the
|
2009-12-17 13:24:23 -05:00
|
|
|
* same mechanism to declare its closing. It shares a common
|
|
|
|
* method of connecting and disconnecting from a Session with
|
|
|
|
* all other objects that have a handle on a Session.
|
2005-09-25 14:42:24 -04:00
|
|
|
*/
|
2009-12-17 13:24:23 -05:00
|
|
|
class ArdourDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2017-04-01 09:50:48 -04:00
|
|
|
public:
|
2022-05-08 11:55:00 -04:00
|
|
|
explicit ArdourDialog (const std::string& title, bool modal = false, bool use_separator = false);
|
|
|
|
ArdourDialog (Gtk::Window& parent, const std::string& title, bool modal = false, bool use_separator = false);
|
2005-09-25 14:42:24 -04:00
|
|
|
~ArdourDialog();
|
|
|
|
|
2015-04-01 11:41:49 -04:00
|
|
|
bool on_focus_in_event (GdkEventFocus*);
|
|
|
|
bool on_focus_out_event (GdkEventFocus*);
|
2017-04-01 09:50:48 -04:00
|
|
|
bool on_delete_event (GdkEventAny*);
|
2005-09-26 10:33:53 -04:00
|
|
|
void on_unmap ();
|
2008-02-02 12:22:04 -05:00
|
|
|
void on_show ();
|
2017-04-06 18:29:02 -04:00
|
|
|
virtual void on_response (int);
|
2020-01-24 17:54:51 -05:00
|
|
|
void set_ui_sensitive (bool);
|
2022-12-12 12:15:55 -05:00
|
|
|
void disallow_idle ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2017-04-20 17:16:09 -04:00
|
|
|
protected:
|
|
|
|
void pop_splash ();
|
2017-07-03 08:03:10 -04:00
|
|
|
void close_self ();
|
2017-04-20 17:16:09 -04:00
|
|
|
|
2020-01-24 17:54:51 -05:00
|
|
|
bool _sensitive;
|
2017-04-01 09:50:48 -04:00
|
|
|
private:
|
|
|
|
WM::ProxyTemporary* proxy;
|
|
|
|
bool _splash_pushed;
|
2008-09-17 04:44:51 -04:00
|
|
|
void init ();
|
2022-12-12 12:15:55 -05:00
|
|
|
bool allow_idle;
|
2008-12-12 09:43:24 -05:00
|
|
|
|
|
|
|
static sigc::signal<void> CloseAllDialogs;
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
2006-07-19 12:47:04 -04:00
|
|
|
|