2011-06-03 18:18:47 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2011 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __time_info_box_h__
|
|
|
|
#define __time_info_box_h__
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/label.h>
|
2011-06-08 15:48:57 -04:00
|
|
|
#include <gtkmm/table.h>
|
2011-06-03 18:18:47 -04:00
|
|
|
|
|
|
|
#include "ardour/ardour.h"
|
|
|
|
#include "ardour/session_handle.h"
|
|
|
|
|
2011-11-10 10:25:01 -05:00
|
|
|
#include "ardour_button.h"
|
|
|
|
|
2011-06-03 18:18:47 -04:00
|
|
|
namespace ARDOUR {
|
|
|
|
class Session;
|
|
|
|
class Location;
|
|
|
|
}
|
|
|
|
|
|
|
|
class AudioClock;
|
|
|
|
|
2011-06-08 19:03:06 -04:00
|
|
|
class TimeInfoBox : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
2011-06-03 18:18:47 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
TimeInfoBox ();
|
|
|
|
~TimeInfoBox ();
|
|
|
|
|
|
|
|
void set_session (ARDOUR::Session*);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool on_expose_event (GdkEventExpose*);
|
|
|
|
|
|
|
|
private:
|
2011-06-08 19:03:06 -04:00
|
|
|
Gtk::Table left;
|
|
|
|
Gtk::Table right;
|
|
|
|
|
2011-06-03 18:18:47 -04:00
|
|
|
AudioClock* selection_start;
|
|
|
|
AudioClock* selection_end;
|
|
|
|
AudioClock* selection_length;
|
|
|
|
|
|
|
|
AudioClock* punch_start;
|
|
|
|
AudioClock* punch_end;
|
|
|
|
|
|
|
|
Gtk::Label selection_title;
|
|
|
|
Gtk::Label punch_title;
|
2011-06-07 13:40:05 -04:00
|
|
|
bool syncing_selection;
|
|
|
|
bool syncing_punch;
|
2011-06-03 18:18:47 -04:00
|
|
|
|
|
|
|
void punch_changed (ARDOUR::Location*);
|
|
|
|
void punch_location_changed (ARDOUR::Location*);
|
|
|
|
void watch_punch (ARDOUR::Location*);
|
|
|
|
PBD::ScopedConnectionList punch_connections;
|
2011-06-07 19:07:08 -04:00
|
|
|
PBD::ScopedConnectionList editor_connections;
|
|
|
|
|
2011-11-10 10:25:01 -05:00
|
|
|
ArdourButton punch_in_button;
|
|
|
|
ArdourButton punch_out_button;
|
2011-06-08 15:48:57 -04:00
|
|
|
|
2011-06-03 18:18:47 -04:00
|
|
|
void selection_changed ();
|
2011-06-07 13:40:05 -04:00
|
|
|
|
|
|
|
void sync_selection_mode (AudioClock*);
|
|
|
|
void sync_punch_mode (AudioClock*);
|
2011-06-07 14:20:22 -04:00
|
|
|
|
|
|
|
bool clock_button_release_event (GdkEventButton* ev, AudioClock* src);
|
2011-06-07 19:07:08 -04:00
|
|
|
void track_mouse_mode ();
|
2011-06-03 18:18:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __time_info_box_h__ */
|