Ardour  8.12
session_import_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 Sakari Bergen <sakari.bergen@beatwaves.net>
3  * Copyright (C) 2009-2012 David Robillard <d@drobilla.net>
4  * Copyright (C) 2009-2017 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #ifndef __session_import_dialog_h__
23 #define __session_import_dialog_h__
24 
25 #include <string>
26 #include <list>
27 #include <memory>
28 #include <utility>
29 
30 
31 #include <gtkmm/box.h>
32 #include <gtkmm/button.h>
33 #include <gtkmm/entry.h>
35 #include <gtkmm/frame.h>
36 #include <gtkmm/scrolledwindow.h>
37 #include <gtkmm/treemodel.h>
38 #include <gtkmm/treestore.h>
39 #include <gtkmm/treeview.h>
40 
41 #include "pbd/xml++.h"
42 
43 #include "ardour_dialog.h"
44 namespace ARDOUR {
45  class ElementImportHandler;
46  class ElementImporter;
47  class Session;
48 }
49 
51 {
52 private:
53  typedef std::shared_ptr<ARDOUR::ElementImportHandler> HandlerPtr;
54  typedef std::list<HandlerPtr> HandlerList;
55 
56  typedef std::shared_ptr<ARDOUR::ElementImporter> ElementPtr;
57  typedef std::list<ElementPtr> ElementList;
58 
59 public:
61 
63 
64 private:
65 
66  void load_session (const std::string& filename);
67  void fill_list ();
68  void browse ();
69  void do_merge ();
70  void end_dialog ();
71  void update (std::string path);
73 
74  std::pair<bool, std::string> open_rename_dialog (std::string text, std::string name);
75  bool open_prompt_dialog (std::string text);
76 
77  // Data
80 
81  // GUI
86 
88  {
89  public:
94 
96  };
97 
99  Glib::RefPtr<Gtk::TreeStore> session_tree;
102 
105 
107 };
108 
109 #endif
void add(TreeModelColumnBase &column)
void path(Glib::ustring &path, Glib::ustring &path_reversed)
Compute a widget's path of the form "GtkWindow.MyLabel".
Gtk::ScrolledWindow session_scroll
std::list< HandlerPtr > HandlerList
Glib::RefPtr< Gtk::TreeStore > session_tree
bool open_prompt_dialog(std::string text)
void load_session(const std::string &filename)
virtual Gtk::FileChooserAction browse_action() const
void update(std::string path)
SessionBrowserColumns sb_cols
void show_info(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column)
std::list< ElementPtr > ElementList
PBD::ScopedConnectionList connections
std::shared_ptr< ARDOUR::ElementImportHandler > HandlerPtr
std::shared_ptr< ARDOUR::ElementImporter > ElementPtr
SessionImportDialog(ARDOUR::Session *target)
std::pair< bool, std::string > open_rename_dialog(std::string text, std::string name)
Definition: xml++.h:74
FileChooserAction
Definition: filechooser.h:56
@ FILE_CHOOSER_ACTION_OPEN
Definition: filechooser.h:57
GtkImageIconNameData name
Definition: gtkimage.h:6
Gtk::TreeModelColumn< ElementPtr > element
Gtk::TreeModelColumn< std::string > info
Gtk::TreeModelColumn< std::string > name