Enable Menu > Quit to work again after startup on macOS
[ardour.git] / gtk2_ardour / new_user_wizard.h
1 /*
2  * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
4  * Copyright (C) 2009-2016 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2015-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 __gtk2_ardour_startup_h__
23 #define __gtk2_ardour_startup_h__
24
25 #include <string>
26
27 #include <gtkmm/assistant.h>
28 #include <gtkmm/label.h>
29 #include <gtkmm/expander.h>
30 #include <gtkmm/box.h>
31 #include <gtkmm/radiobutton.h>
32 #include <gtkmm/filechooserbutton.h>
33 #include <gtkmm/comboboxtext.h>
34
35 #include "ardour/utils.h"
36
37 class EngineControl;
38
39 class NewUserWizard : public Gtk::Assistant
40 {
41 public:
42         NewUserWizard ();
43         ~NewUserWizard ();
44
45         static bool required ();
46
47         /* It's not a dialog so we have to fake this to make it behave like a
48          * dialog. This allows the StartupFSM to treat everything similarly.
49          */
50
51         sigc::signal1<void,int>& signal_response() { return _signal_response; }
52
53 private:
54         bool config_modified;
55         bool new_user;
56
57         void on_apply ();
58         void on_cancel ();
59         bool on_delete_event (GdkEventAny*);
60         void discover_plugins ();
61
62         Glib::RefPtr<Gdk::Pixbuf> icon_pixbuf;
63
64         void setup_prerelease_page ();
65         void setup_new_user_page ();
66         Glib::RefPtr<Gdk::Pixbuf> splash_pixbuf;
67
68         void setup_first_time_config_page ();
69         void config_changed ();
70
71         /* Welcome */
72         Gtk::ComboBoxText ui_font_scale;
73         void rescale_ui ();
74         void guess_default_ui_scale ();
75
76         /* first page */
77         Gtk::FileChooserButton* default_dir_chooser;
78         void default_dir_changed();
79         void setup_first_page ();
80         Gtk::FileChooserButton new_folder_chooser;
81
82         /* monitoring choices */
83
84         Gtk::VBox mon_vbox;
85         Gtk::Label monitor_label;
86         Gtk::RadioButton monitor_via_hardware_button;
87         Gtk::RadioButton monitor_via_ardour_button;
88         void setup_monitoring_choice_page ();
89
90         /* monitor section choices */
91
92         Gtk::VBox mon_sec_vbox;
93         Gtk::Label monitor_section_label;
94         Gtk::RadioButton use_monitor_section_button;
95         Gtk::RadioButton no_monitor_section_button;
96         void setup_monitor_section_choice_page ();
97
98         /* final page */
99
100         void setup_final_page ();
101         Gtk::Button plugin_disco_button;
102
103         /* always there */
104
105         Glib::RefPtr<Pango::Layout> layout;
106
107         /* page indices */
108
109         gint audio_page_index;
110         gint new_user_page_index;
111         gint default_folder_page_index;
112         gint monitoring_page_index;
113         gint monitor_section_page_index;
114         gint final_page_index;
115
116         void move_along_now ();
117
118         sigc::signal1<void,int> _signal_response;
119 };
120
121 #endif /* __gtk2_ardour_startup_h__ */