remove <gtkmm/gtkmm.h> from all files, plus a small fix related to map/realize handling
[ardour.git] / gtk2_ardour / new_session_dialog.h
1 /*
2     Copyright (C) 2005 Paul Davis 
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18     $Id$
19 */
20
21 // -*- c++ -*-
22
23 #ifndef NEW_SESSION_DIALOG_H
24 #define NEW_SESSION_DIALOG_H
25
26 #include <string>
27 #include <gtkmm/dialog.h>
28 #include <glibmm/refptr.h>
29
30 namespace Gtk {
31         class Entry;
32         class FileChooserButton;
33         class SpinButton;
34         class CheckButton;
35         class RadioButton;
36 }
37
38 #include "glade_factory.h"
39
40 struct NewSessionDialogFactory : public GladeFactory
41 {
42         static GladeRef create();
43
44         static const char* top_level_widget_name();
45
46 private:
47
48         static const char* s_m_top_level_widget_name;
49         
50 };
51
52 class NewSessionDialog : public Gtk::Dialog
53 {
54 public:
55                 
56         NewSessionDialog(BaseObjectType* cobject,
57                          const Glib::RefPtr<Gnome::Glade::Xml>& xml);
58
59         void set_session_name(const Glib::ustring& name);
60
61         std::string session_name() const;
62         std::string session_folder() const;
63         
64         bool use_session_template() const;
65         std::string session_template_name() const;
66
67         // advanced.
68
69         bool create_master_bus() const;
70         int master_channel_count() const;
71
72         bool create_control_bus() const;
73         int control_channel_count() const;
74
75         bool connect_inputs() const;
76         bool limit_inputs_used_for_connection() const;
77         int input_limit_count() const;
78
79         bool connect_outputs() const;
80         bool limit_outputs_used_for_connection() const;
81         int output_limit_count() const;
82
83         bool connect_outs_to_master() const;
84         bool connect_outs_to_physical() const ;
85
86 protected:
87
88         void reset_name();
89         void reset_template();
90         
91         // reset everything to default values.
92         void reset();
93
94         // references to widgets we care about.
95
96         Gtk::Entry*  m_name;
97         Gtk::FileChooserButton* m_folder;
98         Gtk::FileChooserButton* m_template;
99         
100         Gtk::CheckButton* m_create_master_bus;
101         Gtk::SpinButton* m_master_bus_channel_count;
102         
103         Gtk::CheckButton* m_create_control_bus;
104         Gtk::SpinButton* m_control_bus_channel_count;
105
106         Gtk::CheckButton* m_connect_inputs;
107         Gtk::CheckButton* m_limit_input_ports;
108         Gtk::SpinButton* m_input_limit_count;
109
110         Gtk::CheckButton* m_connect_outputs;    
111         Gtk::CheckButton* m_limit_output_ports;
112         Gtk::SpinButton* m_output_limit_count;
113
114         Gtk::RadioButton* m_connect_outputs_to_master;
115         Gtk::RadioButton* m_connect_outputs_to_physical;
116         
117 };
118
119 #endif // NEW_SESSION_DIALOG_H