Ardour  8.12
export_filename_selector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2011 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
4  * Copyright (C) 2016-2017 Robin Gareus <robin@gareus.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __export_filename_selector_h__
22 #define __export_filename_selector_h__
23 
24 #include <gtkmm/box.h>
25 #include <gtkmm/button.h>
26 #include <gtkmm/checkbutton.h>
27 #include <gtkmm/combobox.h>
28 #include <gtkmm/comboboxtext.h>
29 #include <gtkmm/entry.h>
30 #include <gtkmm/label.h>
31 #include <gtkmm/liststore.h>
32 #include <gtkmm/sizegroup.h>
33 #include <gtkmm/spinbutton.h>
34 #include <gtkmm/treemodel.h>
35 
36 #include "ardour/export_filename.h"
38 #include "ardour/session_handle.h"
39 
41 {
42 public:
43  typedef std::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;
44 
47 
49  void set_example_filename (std::string filename);
50  void require_timespan (bool);
51 
52  /* Compatibility with other elements */
53 
54  sigc::signal<void> CriticalSelectionChanged;
55 
56 private:
57  void load_state ();
58 
59  void update_label ();
60  void update_folder ();
61  void check_folder ();
62 
65 
70 
72  void open_folder ();
73 
74  std::shared_ptr<ARDOUR::ExportFilename> filename;
75 
76  Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
77 
79 
81 
84 
87 
90 
92 
98 
99  /* Date combo */
100 
102 
104  public:
107 
109  {
110  add (format);
111  add (label);
112  }
113  };
115  Glib::RefPtr<Gtk::ListStore> date_format_list;
117 
118  /* Time combo */
119 
121 
123  public:
126 
128  {
129  add (format);
130  add (label);
131  }
132  };
134  Glib::RefPtr<Gtk::ListStore> time_format_list;
136 
137  /* timespan logic */
140 };
141 
142 #endif /* __export_filename_selector_h__ */
std::shared_ptr< FilenameState > FilenameStatePtr
Glib::RefPtr< Gtk::ListStore > date_format_list
ARDOUR::ExportFilename::TimeFormat TimeFormat
ARDOUR::ExportFilename::DateFormat DateFormat
Gtk::ComboBoxText session_snap_name
std::shared_ptr< ARDOUR::ExportFilename > filename
void set_state(ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session *session_)
Glib::RefPtr< Gtk::SizeGroup > label_sizegroup
Glib::RefPtr< Gtk::ListStore > time_format_list
sigc::signal< void > CriticalSelectionChanged
void require_timespan(bool)
void set_example_filename(std::string filename)
std::shared_ptr< ARDOUR::ExportFilename > FilenamePtr
void update_timespan_sensitivity()
void add(TreeModelColumnBase &column)
Gtk::TreeModelColumn< DateFormat > format
Gtk::TreeModelColumn< std::string > label
Gtk::TreeModelColumn< std::string > label
Gtk::TreeModelColumn< TimeFormat > format