Ardour  8.12
location_ui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2018 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
4  * Copyright (C) 2008-2011 David Robillard <d@drobilla.net>
5  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2015-2017 Robin Gareus <robin@gareus.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef __ardour_location_ui_h__
24 #define __ardour_location_ui_h__
25 
26 #include <gtkmm/box.h>
27 #include <gtkmm/checkbutton.h>
28 #include <gtkmm/button.h>
29 #include <gtkmm/table.h>
30 #include <gtkmm/entry.h>
31 #include <gtkmm/label.h>
32 #include <gtkmm/scrolledwindow.h>
33 
34 #include "pbd/signals.h"
35 
36 #include "ardour/location.h"
37 #include "ardour/session_handle.h"
38 
39 #include "widgets/ardour_button.h"
40 #include "widgets/pane.h"
41 
42 #include "ardour_window.h"
43 #include "audio_clock.h"
44 
45 namespace ARDOUR {
46  class Location;
47 }
48 
49 class ClockGroup;
50 
52 {
53 public:
54  LocationEditRow (ARDOUR::Session *sess=0, ARDOUR::Location *loc=0, int32_t num=-1);
55  virtual ~LocationEditRow();
56 
59 
61 
62  void set_number (int);
63  void focus_name();
66 
67  sigc::signal<void,ARDOUR::Location*> remove_requested;
68  sigc::signal<void> redraw_ranges;
69 
70 protected:
71 
72  enum LocationPart {
75  LocLength
76  };
77 
79 
81 
86 
91 
96 
102 
104 
108 
109 
119 
121  int number;
122 
127 
130 
133 
134  void cd_toggled ();
136  void hide_toggled ();
137  void lock_toggled ();
139 
140  void scms_toggled ();
142 
143  void end_changed ();
144  void start_changed ();
145  void name_changed ();
147  void flags_changed ();
148  void lock_changed ();
149 
152 
154 };
155 
157 {
158 public:
159  LocationUI (std::string state_node_name = "LocationUI");
161 
163 
166 
168 
169  XMLNode & get_state () const;
170  int set_state (const XMLNode&);
171 
172 private:
178 
180 
184 
186 
191 
196 
197  /* When any location changes it start
198  or end points, it sends a signal that is caught
199  by one of these functions
200  */
201 
203 
205 
207 
209 
211 
215 
218 
220  bool _mode_set;
221 
222  std::string _state_node_name;
223 };
224 
226 {
227 public:
230 
231  void on_map ();
233 
234  LocationUI& ui() { return _ui; }
235 
236 protected:
240 };
241 
242 #endif // __ardour_location_ui_h__
std::list< Location * > LocationList
Definition: location.h:252
Gtk::Label preemph_label
Definition: location_ui.h:117
Gtk::Label isrc_label
Definition: location_ui.h:107
Gtk::Label name_label
Definition: location_ui.h:83
Gtk::Entry composer_entry
Definition: location_ui.h:113
Gtk::HBox cd_track_details_hbox
Definition: location_ui.h:105
void section_toggled()
ArdourWidgets::ArdourButton locate_to_start_button
Definition: location_ui.h:90
sigc::signal< void > redraw_ranges
Definition: location_ui.h:68
void start_changed()
void show_cd_track_details()
Gtk::Label performer_label
Definition: location_ui.h:110
void clock_changed(LocationPart part)
ARDOUR::Location * location
Definition: location_ui.h:78
Gtk::Label date_label
Definition: location_ui.h:85
void preemph_toggled()
void to_playhead_button_pressed(LocationPart part)
ArdourWidgets::ArdourButton start_to_playhead_button
Definition: location_ui.h:89
Gtk::HBox start_hbox
Definition: location_ui.h:87
void set_location(ARDOUR::Location *)
sigc::signal< void, ARDOUR::Location * > remove_requested
Definition: location_ui.h:67
Gtk::Table item_table
Definition: location_ui.h:80
Gtk::CheckButton cd_check_button
Definition: location_ui.h:98
void composer_entry_changed()
AudioClock start_clock
Definition: location_ui.h:88
void remove_button_pressed()
Gtk::CheckButton lock_check_button
Definition: location_ui.h:101
LocationEditRow(ARDOUR::Session *sess=0, ARDOUR::Location *loc=0, int32_t num=-1)
Gtk::Label number_label
Definition: location_ui.h:84
AudioClock end_clock
Definition: location_ui.h:93
Gtk::Label scms_label
Definition: location_ui.h:115
void set_clock_group(ClockGroup &)
virtual ~LocationEditRow()
void set_number(int)
Gtk::Entry isrc_entry
Definition: location_ui.h:106
void name_entry_changed()
Gtk::CheckButton scms_check_button
Definition: location_ui.h:114
Gtk::Entry performer_entry
Definition: location_ui.h:111
Gtk::CheckButton hide_check_button
Definition: location_ui.h:100
PBD::ScopedConnectionList connections
Definition: location_ui.h:153
Gtk::Entry name_entry
Definition: location_ui.h:82
bool locate_to_clock(GdkEventButton *, AudioClock *)
void flags_changed()
ArdourWidgets::ArdourButton remove_button
Definition: location_ui.h:103
ArdourWidgets::ArdourButton locate_to_end_button
Definition: location_ui.h:95
guint32 i_am_the_modifier
Definition: location_ui.h:120
void performer_entry_changed()
void location_changed()
void locate_button_pressed(LocationPart part)
ClockGroup * _clock_group
Definition: location_ui.h:118
Gtk::CheckButton preemph_check_button
Definition: location_ui.h:116
void isrc_entry_changed()
Gtk::Label composer_label
Definition: location_ui.h:112
AudioClock length_clock
Definition: location_ui.h:97
ARDOUR::Location * get_location()
Definition: location_ui.h:58
void unset_clock_group()
Definition: location_ui.h:65
void set_session(ARDOUR::Session *)
ArdourWidgets::ArdourButton end_to_playhead_button
Definition: location_ui.h:94
Gtk::CheckButton section_check_button
Definition: location_ui.h:99
Gtk::HBox end_hbox
Definition: location_ui.h:92
void set_clock_editable_status()
LocationUI & ui()
Definition: location_ui.h:234
void set_session(ARDOUR::Session *)
LocationUI _ui
Definition: location_ui.h:237
bool on_delete_event(GdkEventAny *)
This is a default handler for the signal signal_delete_event().
void on_map()
This is a default handler for the signal signal_map().
void session_going_away()
Gtk::Button add_range_button
Definition: location_ui.h:193
Gtk::VBox range_frame_box
Definition: location_ui.h:192
XMLNode & get_state() const
void refresh_location_list()
void session_going_away()
std::string _state_node_name
Definition: location_ui.h:222
void map_locations(const ARDOUR::Locations::LocationList &)
Gtk::ScrolledWindow range_rows_scroller
Definition: location_ui.h:194
void add_new_location()
Gtk::VBox loc_frame_box
Definition: location_ui.h:187
Gtk::Button add_location_button
Definition: location_ui.h:188
void start_changed(ARDOUR::Location *)
void add_new_range()
LocationEditRow loop_edit_row
Definition: location_ui.h:181
Gtk::VBox location_rows
Definition: location_ui.h:190
ArdourWidgets::VPane loc_range_panes
Definition: location_ui.h:185
Gtk::VBox loop_punch_box
Definition: location_ui.h:183
LocationUI(std::string state_node_name="LocationUI")
void location_removed(ARDOUR::Location *)
bool _mode_set
Definition: location_ui.h:220
void location_added(ARDOUR::Location *)
AudioClock::Mode _mode
Definition: location_ui.h:219
AudioClock::Mode clock_mode_from_session_instant_xml()
void set_session(ARDOUR::Session *)
void location_remove_requested(ARDOUR::Location *)
ARDOUR::Location * newest_location
Definition: location_ui.h:177
LocationEditRow punch_edit_row
Definition: location_ui.h:182
ClockGroup * _clock_group
Definition: location_ui.h:216
int set_state(const XMLNode &)
guint32 i_am_the_modifier
Definition: location_ui.h:210
void location_redraw_ranges()
Gtk::ScrolledWindow location_rows_scroller
Definition: location_ui.h:189
Gtk::VBox range_rows
Definition: location_ui.h:195
gint do_location_remove(ARDOUR::Location *)
Definition: xml++.h:114