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:
|
2022-11-18 06:08:18 -05:00
|
|
|
MainClock (const std::string& clock_name, const std::string& widget_name);
|
2016-12-11 11:24:30 -05:00
|
|
|
void set_session (ARDOUR::Session *s);
|
2022-11-06 13:12:20 -05:00
|
|
|
void set_display_delta_mode (ARDOUR::ClockDeltaMode m);
|
2022-10-07 18:12:27 -04:00
|
|
|
void set (Temporal::timepos_t const &, bool force = false);
|
2022-11-18 06:08:18 -05:00
|
|
|
sigc::signal<bool, ARDOUR::ClockDeltaMode> change_display_delta_mode_signal;
|
2012-05-31 19:14:03 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
void build_ops_menu ();
|
2022-11-19 18:48:29 -05:00
|
|
|
void change_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 ();
|
2017-11-22 16:10:37 -05:00
|
|
|
bool _suspend_delta_mode_signal;
|
2022-11-06 13:12:20 -05:00
|
|
|
std::string _widget_name;
|
|
|
|
ARDOUR::ClockDeltaMode _delta_mode;
|
2012-05-31 19:14:03 -04:00
|
|
|
};
|
2015-12-07 17:08:19 -05:00
|
|
|
|
|
|
|
#endif // __gtk_ardour_main_clock_h__
|