2 * Copyright (C) 2011-2015 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2015-2017 Robin Gareus <robin@gareus.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef __time_info_box_h__
21 #define __time_info_box_h__
25 #include <gtkmm/box.h>
26 #include <gtkmm/label.h>
27 #include <gtkmm/table.h>
29 #include "ardour/ardour.h"
30 #include "ardour/session_handle.h"
32 #include "gtkmm2ext/cairo_packer.h"
41 class TimeInfoBox : public CairoHPacker, public ARDOUR::SessionHandlePtr
44 TimeInfoBox (std::string state_node_name, bool with_punch);
47 void set_session (ARDOUR::Session*);
52 AudioClock* selection_start;
53 AudioClock* selection_end;
54 AudioClock* selection_length;
56 AudioClock* punch_start;
57 AudioClock* punch_end;
59 Gtk::Label selection_title;
60 Gtk::Label punch_title;
61 bool syncing_selection;
63 bool with_punch_clock;
65 void punch_changed (ARDOUR::Location*);
66 void punch_location_changed (ARDOUR::Location*);
67 void watch_punch (ARDOUR::Location*);
68 PBD::ScopedConnectionList punch_connections;
69 PBD::ScopedConnectionList editor_connections;
70 PBD::ScopedConnectionList region_property_connections;
72 void selection_changed ();
73 void region_selection_changed ();
75 void sync_selection_mode (AudioClock*);
76 void sync_punch_mode (AudioClock*);
78 bool clock_button_release_event (GdkEventButton* ev, AudioClock* src);
79 void track_mouse_mode ();
82 #endif /* __time_info_box_h__ */