Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
22 
23 #include <gtkmm/box.h>
24 #include <gtkmm/button.h>
25 #include <gtkmm/checkbutton.h>
26 #include <gtkmm/combobox.h>
27 #include <gtkmm/comboboxtext.h>
28 #include <gtkmm/entry.h>
29 #include <gtkmm/label.h>
30 #include <gtkmm/liststore.h>
31 #include <gtkmm/sizegroup.h>
32 #include <gtkmm/spinbutton.h>
33 #include <gtkmm/treemodel.h>
34 
35 #include "ardour/export_filename.h"
37 #include "ardour/session_handle.h"
38 
40 {
41 public:
42  typedef std::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;
43 
46 
48  void set_example_filename (std::string filename);
49  void require_timespan (bool);
50 
51  /* Compatibility with other elements */
52 
53  sigc::signal<void> CriticalSelectionChanged;
54 
55 private:
56  void load_state ();
57 
58  void update_label ();
59  void update_folder ();
60  void check_folder ();
61 
64 
69 
71  void open_folder ();
72 
73  std::shared_ptr<ARDOUR::ExportFilename> filename;
74 
75  Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
76 
78 
80 
83 
86 
89 
91 
97 
98  /* Date combo */
99 
101 
103  public:
106 
108  {
109  add (format);
110  add (label);
111  }
112  };
114  Glib::RefPtr<Gtk::ListStore> date_format_list;
116 
117  /* Time combo */
118 
120 
122  public:
125 
127  {
128  add (format);
129  add (label);
130  }
131  };
133  Glib::RefPtr<Gtk::ListStore> time_format_list;
135 
136  /* timespan logic */
139 };
140 
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