Skip updating options for hidden file-dialog
[ardour.git] / gtk2_ardour / video_server_dialog.h
1 /*
2     Copyright (C) 2010 Paul Davis
3     Author: Robin Gareus <robin@gareus.org>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 */
20 #ifndef __gtk_ardour_video_server_dialog_h__
21 #define __gtk_ardour_video_server_dialog_h__
22
23 #include <string>
24
25 #include <gtkmm/adjustment.h>
26 #include <gtkmm/button.h>
27 #include <gtkmm/checkbutton.h>
28 #include <gtkmm/comboboxtext.h>
29 #include <gtkmm/entry.h>
30 #include <gtkmm/label.h>
31 #include <gtkmm/spinbutton.h>
32
33 #include "ardour/types.h"
34 #include "ardour/template_utils.h"
35 #include "ardour_dialog.h"
36
37 /** @class VideoServerDialog
38  *  @brief dialog box to collect video-server settings
39  */
40 class VideoServerDialog : public ArdourDialog
41 {
42 public:
43         VideoServerDialog (ARDOUR::Session*);
44         ~VideoServerDialog ();
45
46         std::string get_exec_path () { return path_entry.get_text(); }
47         std::string get_docroot ();
48         std::string get_listenaddr () { return listenaddr_combo.get_active_text();}
49         int get_listenport () { return listenport_spinner.get_value_as_int();}
50         int get_cachesize () { return cachesize_spinner.get_value_as_int();}
51         bool show_again () { return showagain_checkbox.get_active();}
52
53 private:
54         void on_show ();
55         void open_path_dialog ();
56         void open_docroot_dialog ();
57
58         Gtk::Label        path_label;
59         Gtk::Entry        path_entry;
60         Gtk::Button       path_browse_button;
61
62         Gtk::Label        docroot_label;
63         Gtk::Entry        docroot_entry;
64         Gtk::Button       docroot_browse_button;
65
66         Gtk::ComboBoxText listenaddr_combo;
67         Gtk::Adjustment   listenport_adjustment;
68         Gtk::SpinButton   listenport_spinner;
69         Gtk::Adjustment   cachesize_adjustment;
70         Gtk::SpinButton   cachesize_spinner;
71         Gtk::CheckButton  showagain_checkbox;
72 };
73
74 #endif /* __gtk_ardour_video_server_dialog_h__ */