Ardour  8.7-15-gadf511264b
trigger_clip_picker.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __gtk_ardour_trigger_clip_picker_h__
20 #define __gtk_ardour_trigger_clip_picker_h__
21 
22 #include <set>
23 #include <string>
24 
25 #include <gtkmm/box.h>
27 #include <gtkmm/scale.h>
28 #include <gtkmm/scrolledwindow.h>
29 #include <gtkmm/table.h>
30 #include <gtkmm/treemodel.h>
31 #include <gtkmm/treestore.h>
32 #include <gtkmm/treeview.h>
33 
34 #include "ardour/types.h"
35 #include "ardour/session_handle.h"
36 
38 #include "widgets/ardour_button.h"
39 #include "widgets/ardour_knob.h"
40 
41 #include "instrument_selector.h"
42 
43 class PluginUIWindow;
44 
46 {
47 public:
50 
52 
55  }
56 
57 private:
58  void list_dir (std::string const&, Gtk::TreeNodeChildren const* pc = NULL);
59  void open_dir ();
60  void open_downloader ();
61  void edit_path ();
62  bool refill_dropdown ();
63  void parameter_changed (std::string const&);
64  void clip_added (std::string const&, void*);
65  void row_selected ();
66  void cursor_changed ();
70  void drag_data_get (Glib::RefPtr<Gdk::DragContext> const&, Gtk::SelectionData&, guint, guint);
71  void drag_begin (Glib::RefPtr<Gdk::DragContext> const&);
72  void drag_end (Glib::RefPtr<Gdk::DragContext> const&);
73  bool drag_motion (Glib::RefPtr<Gdk::DragContext> const&, int, int, guint);
74  void drag_data_received (Glib::RefPtr<Gdk::DragContext> const&, int, int, Gtk::SelectionData const&, guint, guint);
75  bool maybe_add_dir (std::string const&);
77  void audition (std::string const&);
78  void audition_active (bool);
85  void stop_audition ();
87  void refresh_library ();
88  void open_library ();
94  void reset_audition_marks (bool force = false);
95 
98 
101  {
102  add (name);
103  add (path);
104  add (read);
105  add (file);
106  add (color);
107  add (auditioned);
108  }
115  };
116 
118  Glib::RefPtr<Gtk::TreeStore> _model;
132 
133  /* MIDI props */
137 
139 
140  std::string _current_path;
141  std::string _clip_library_dir;
144 
145  std::set<std::string> _root_paths;
146 
147  bool _seeking;
149 
154  sigc::connection _idle_connection;
155 };
156 
157 #endif
void add(TreeModelColumnBase &column)
ARDOUR::PluginInfoPtr selected_instrument() const
void parameter_changed(std::string const &)
ArdourWidgets::ArdourButton _play_btn
Glib::RefPtr< Gtk::TreeStore > _model
std::string _clip_library_dir
Gtk::CheckButton _autoplay_btn
void reset_audition_marks(bool force=false)
void row_collapsed(Gtk::TreeModel::iterator const &, Gtk::TreeModel::Path const &)
void audition_processors_changed()
void audition_processor_idle()
ArdourWidgets::ArdourButton _open_library_btn
void audition_progress(ARDOUR::samplecnt_t, ARDOUR::samplecnt_t)
void mark_auditioned(Gtk::TreeModel::iterator)
ArdourWidgets::ArdourButton _stop_btn
void list_dir(std::string const &, Gtk::TreeNodeChildren const *pc=NULL)
PluginUIWindow * _audition_plugnui
void audition_selected()
void drag_data_get(Glib::RefPtr< Gdk::DragContext > const &, Gtk::SelectionData &, guint, guint)
Gtk::FileChooserDialog _fcd
void drag_end(Glib::RefPtr< Gdk::DragContext > const &)
InstrumentSelector _auditioner_combo
ARDOUR::PluginInfoPtr instrument_plugin() const
PBD::ScopedConnectionList _auditioner_connections
void audition_processor_going_away()
void row_activated(Gtk::TreeModel::Path const &, Gtk::TreeViewColumn *)
bool audition_processor_viz(bool)
bool seek_button_release(GdkEventButton *)
void audition(std::string const &)
sigc::connection _idle_connection
void clip_added(std::string const &, void *)
void audition_active(bool)
void auditioner_combo_changed()
void set_session(ARDOUR::Session *)
ArdourWidgets::ArdourKnob _gain_control
PBD::ScopedConnection _clip_added_connection
bool drag_motion(Glib::RefPtr< Gdk::DragContext > const &, int, int, guint)
ArdourWidgets::ArdourButton _show_plugin_btn
bool maybe_add_dir(std::string const &)
PBD::ScopedConnection _config_connection
ArdourWidgets::ArdourButton _refresh_btn
void drag_data_received(Glib::RefPtr< Gdk::DragContext > const &, int, int, Gtk::SelectionData const &, guint, guint)
std::set< std::string > _root_paths
Gtk::ScrolledWindow _scroller
ArdourWidgets::ArdourDropdown _clip_dir_menu
void drag_begin(Glib::RefPtr< Gdk::DragContext > const &)
bool test_expand(Gtk::TreeModel::iterator const &, Gtk::TreeModel::Path const &)
void audition_show_plugin_ui()
PBD::ScopedConnectionList _processor_connections
bool seek_button_press(GdkEventButton *)
Temporal::samplecnt_t samplecnt_t
std::shared_ptr< PluginInfo > PluginInfoPtr
Definition: plugin.h:66
Gtk::TreeModelColumn< bool > file
Gtk::TreeModelColumn< bool > read
Gtk::TreeModelColumn< Gdk::Color > color
Gtk::TreeModelColumn< bool > auditioned
Gtk::TreeModelColumn< std::string > path
Gtk::TreeModelColumn< std::string > name