2012-05-31 19:14:03 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2015-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
* Copyright (C) 2015 Colin Fletcher <colin.m.fletcher@googlemail.com>
|
|
|
|
*
|
|
|
|
* 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.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2012-05-31 19:14:03 -04:00
|
|
|
|
2015-12-07 17:08:19 -05:00
|
|
|
#ifndef __gtk_ardour_main_clock_h__
|
|
|
|
#define __gtk_ardour_main_clock_h__
|
|
|
|
|
2012-05-31 19:14:03 -04:00
|
|
|
#include "audio_clock.h"
|
|
|
|
|
2015-02-03 14:25:10 -05:00
|
|
|
/** A simple subclass of AudioClock that adds a few things to its context menu:
|
|
|
|
* `display delta to edit cursor' and edit/change tempo/meter
|
|
|
|
*/
|
2012-05-31 19:14:03 -04:00
|
|
|
class MainClock : public AudioClock
|
|
|
|
{
|
|
|
|
public:
|
2015-02-15 07:56:25 -05:00
|
|
|
MainClock (const std::string& clock_name, const std::string& widget_name, bool primary);
|
2020-10-19 14:37:54 -04:00
|
|
|
Temporal::timepos_t absolute_time () const;
|
2016-12-11 11:24:30 -05:00
|
|
|
void set_session (ARDOUR::Session *s);
|
2020-09-29 19:53:43 -04:00
|
|
|
void set (Temporal::timepos_t const &, bool force = false, Temporal::timecnt_t const & offset = Temporal::timecnt_t ());
|
2012-05-31 19:14:03 -04:00
|
|
|
|
|
|
|
private:
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2015-02-03 14:25:10 -05:00
|
|
|
// Editor *_editor;
|
|
|
|
|
2012-05-31 19:14:03 -04:00
|
|
|
void build_ops_menu ();
|
2017-11-22 16:10:37 -05:00
|
|
|
void set_display_delta_mode (ARDOUR::ClockDeltaMode);
|
2015-02-03 14:25:10 -05:00
|
|
|
void edit_current_tempo ();
|
|
|
|
void edit_current_meter ();
|
|
|
|
void insert_new_tempo ();
|
|
|
|
void insert_new_meter ();
|
2012-05-31 19:14:03 -04:00
|
|
|
bool _primary;
|
2017-11-22 16:10:37 -05:00
|
|
|
bool _suspend_delta_mode_signal;
|
2012-05-31 19:14:03 -04:00
|
|
|
};
|
2015-12-07 17:08:19 -05:00
|
|
|
|
|
|
|
#endif // __gtk_ardour_main_clock_h__
|