vtl: simple/localhost mode.
[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 #ifdef WITH_VIDEOTIMELINE
21
22 #ifndef __gtk_ardour_video_server_dialog_h__
23 #define __gtk_ardour_video_server_dialog_h__
24
25 #include <string>
26
27 #include <gtkmm.h>
28
29 #include "ardour/types.h"
30 #include "ardour/template_utils.h"
31 #include "ardour_dialog.h"
32
33 /** @class VideoServerDialog
34  *  @brief dialog box to collect video-server settings
35  */
36 class VideoServerDialog : public ArdourDialog
37 {
38   public:
39         VideoServerDialog (ARDOUR::Session*);
40         ~VideoServerDialog ();
41
42         std::string get_exec_path () { return path_entry.get_text(); }
43         std::string get_docroot ();
44         std::string get_listenaddr () { return listenaddr_combo.get_active_text();}
45         int get_listenport () { return listenport_spinner.get_value_as_int();}
46         int get_cachesize () { return cachesize_spinner.get_value_as_int();}
47         bool show_again () { return showagain_checkbox.get_active();}
48
49   private:
50         void on_show ();
51         void open_path_dialog ();
52         void open_docroot_dialog ();
53
54         Gtk::Label        path_label;
55         Gtk::Entry        path_entry;
56         Gtk::Button       path_browse_button;
57
58         Gtk::Label        docroot_label;
59         Gtk::Entry        docroot_entry;
60         Gtk::Button       docroot_browse_button;
61
62         Gtk::ComboBoxText listenaddr_combo;
63         Gtk::Adjustment   listenport_adjustment;
64         Gtk::SpinButton   listenport_spinner;
65         Gtk::Adjustment   cachesize_adjustment;
66         Gtk::SpinButton   cachesize_spinner;
67         Gtk::CheckButton  showagain_checkbox;
68 };
69
70 #endif /* __gtk_ardour_video_server_dialog_h__ */
71
72 #endif /* WITH_VIDEOTIMELINE */