#include "startup.h"
#include "theme_manager.h"
#include "time_axis_view_item.h"
+#include "time_info_box.h"
#include "timers.h"
#include "utils.h"
#include "video_server_dialog.h"
, auto_loop_controllable (new TransportControllable ("transport auto loop", *this, TransportControllable::AutoLoop))
, play_selection_controllable (new TransportControllable ("transport play selection", *this, TransportControllable::PlaySelection))
, rec_controllable (new TransportControllable ("transport rec-enable", *this, TransportControllable::RecordEnable))
+ , time_info_box (0)
, auto_return_button (ArdourButton::led_default_elements)
, follow_edits_button (ArdourButton::led_default_elements)
, auto_input_button (ArdourButton::led_default_elements)
delete primary_clock; primary_clock = 0;
delete secondary_clock; secondary_clock = 0;
delete _process_thread; _process_thread = 0;
+ delete time_info_box; time_info_box = 0;
delete meterbridge; meterbridge = 0;
delete luawindow; luawindow = 0;
delete editor; editor = 0;
#include "ardour_window.h"
#include "editing.h"
#include "enums.h"
+#include "mini_timeline.h"
#include "shuttle_control.h"
#include "visibility_group.h"
#include "window_manager.h"
class SessionDialog;
class SessionOptionEditorWindow;
class Splash;
-class MiniTimeline;
+class TimeInfoBox;
class Meterbridge;
class LuaWindow;
class MidiTracer;
MainClock* secondary_clock;
void focus_on_clock ();
AudioClock* big_clock;
- MiniTimeline* mini_timeline;
VideoTimeLine *video_timeline;
Gtk::Frame transport_frame;
Gtk::HBox transport_hbox;
+ void repack_transport_hbox ();
+
struct TransportControllable : public PBD::Controllable {
enum ToggleType {
Roll = 0,
void toggle_video_sync ();
ShuttleControl shuttle_box;
+ MiniTimeline mini_timeline;
+ TimeInfoBox *time_info_box;
ArdourButton auto_return_button;
ArdourButton follow_edits_button;
#include "mixer_ui.h"
#include "utils.h"
#include "theme_manager.h"
+#include "time_info_box.h"
#include "midi_tracer.h"
-#include "mini_timeline.h"
#include "global_port_matrix.h"
#include "location_ui.h"
#include "rc_option_editor.h"
return false;
}
+void
+ARDOUR_UI::repack_transport_hbox ()
+{
+ if (time_info_box) {
+ if (time_info_box->get_parent()) {
+ transport_hbox.remove (*time_info_box);
+ }
+ if (UIConfiguration::instance().get_show_toolbar_selclock ()) {
+ transport_hbox.pack_start (*time_info_box, false, false);
+ time_info_box->show();
+ }
+ }
+
+ if (mini_timeline.get_parent()) {
+ transport_hbox.remove (mini_timeline);
+ }
+ if (UIConfiguration::instance().get_show_mini_timeline ()) {
+ transport_hbox.pack_start (mini_timeline, true, true);
+ mini_timeline.show();
+ }
+
+ if (editor_meter) {
+ if (meter_box.get_parent()) {
+ transport_hbox.remove (meter_box);
+ transport_hbox.remove (editor_meter_peak_display);
+ }
+
+ if (UIConfiguration::instance().get_show_editor_meter()) {
+ transport_hbox.pack_end (editor_meter_peak_display, false, false);
+ transport_hbox.pack_end (meter_box, false, false);
+ meter_box.show();
+ editor_meter_peak_display.show();
+ }
+ }
+}
+
bool
ARDOUR_UI::transport_expose (GdkEventExpose* ev)
{
punch_button_size_group->add_widget (punch_in_button);
punch_button_size_group->add_widget (punch_out_button);
- mini_timeline = manage (new MiniTimeline);
-
/* and now the layout... */
/* top level packing */
transport_table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
++col;
- /* editor-meter is in transport_hbox */
- transport_hbox.set_spacing (PX_SCALE(1));
- transport_table.attach (transport_hbox, TCOL, 0, 2, SHRINK, EXPAND|FILL, 2, 0);
- ++col;
-
- transport_table.attach (*mini_timeline, TCOL, 0, 2, EXPAND|FILL, EXPAND|FILL, 1, 0);
+ /* editor-meter, mini-timeline and selection clock are options in the transport_hbox */
+ transport_hbox.set_spacing (3);
+ transport_table.attach (transport_hbox, TCOL, 0, 2, EXPAND|FILL, EXPAND|FILL, 2, 0);
++col;
/* lua script action buttons */
transport_table.attach (mixer_visibility_button, TCOL, 1, 2 , FILL, SHRINK, 2, 0);
++col;
+ repack_transport_hbox ();
/* desensitize */
feedback_alert_button.set_sensitive (false);
#include "splash.h"
#include "rc_option_editor.h"
#include "route_params_ui.h"
+#include "time_info_box.h"
#include "opts.h"
#include "utils.h"
mixer->add_to_notebook (_tabs, _("Mixer"));
editor->add_to_notebook (_tabs, _("Editor"));
+ time_info_box = new TimeInfoBox (false);
/* all other dialogs are created conditionally */
we_have_dependents ();
#include "splash.h"
#include "sfdb_ui.h"
#include "theme_manager.h"
+#include "time_info_box.h"
#include "timers.h"
#include "pbd/i18n.h"
AutomationWatch::instance().set_session (s);
shuttle_box.set_session (s);
+ mini_timeline.set_session (s);
+ time_info_box->set_session (s);
primary_clock->set_session (s);
secondary_clock->set_session (s);
big_clock->set_session (s);
- mini_timeline->set_session (s);
video_timeline->set_session (s);
/* sensitize menu bar options that are now valid */
editor_meter_max_peak = -INFINITY;
editor_meter_peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &ARDOUR_UI::editor_meter_peak_button_release), false);
- if (UIConfiguration::instance().get_show_editor_meter() && !ARDOUR::Profile->get_trx()) {
- transport_hbox.pack_start (meter_box, false, false);
- transport_hbox.pack_start (editor_meter_peak_display, false, false);
- meter_box.show();
- editor_meter_peak_display.show();
- }
+ repack_transport_hbox ();
}
update_title ();
}
} else if (p == "waveform-gradient-depth") {
ArdourCanvas::WaveView::set_global_gradient_depth (UIConfiguration::instance().get_waveform_gradient_depth());
+ } else if (p == "show-mini-timeline") {
+ repack_transport_hbox ();
+ } else if (p == "show-toolbar-selclock") {
+ repack_transport_hbox ();
} else if (p == "show-editor-meter") {
- bool show = UIConfiguration::instance().get_show_editor_meter();
-
- if (editor_meter) {
- if (meter_box.get_parent()) {
- transport_hbox.remove (meter_box);
- transport_hbox.remove (editor_meter_peak_display);
- }
-
- if (show) {
- transport_hbox.pack_start (meter_box, false, false);
- transport_hbox.pack_start (editor_meter_peak_display, false, false);
- meter_box.show();
- editor_meter_peak_display.show();
- }
- }
+ repack_transport_hbox ();
} else if (p == "waveform-scale") {
ArdourCanvas::WaveView::set_global_logscaled (UIConfiguration::instance().get_waveform_scale() == Logarithmic);
} else if (p == "widget-prelight") {
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_draggable_playhead)
));
- add_option (_("Editor"),
- new BoolOption (
- "show-editor-meter",
- _("Display master-meter in the toolbar"),
- sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_editor_meter),
- sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_editor_meter)
- ));
-
if (!Profile->get_mixbus()) {
add_option (_("Editor"),
new BoolOption (
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_default_narrow_ms)
));
- add_option (S_("Preferences|GUI"),
+ add_option (_("GUI/Toolbar"), new OptionEditorHeading (_("Main Transport Items")));
+
+ add_option (_("GUI/Toolbar"),
+ new BoolOption (
+ "show-toolbar-selclock",
+ _("Display Selection Clock in the Toolbar"),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_toolbar_selclock),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_toolbar_selclock)
+ ));
+
+ add_option (_("GUI/Toolbar"),
+ new BoolOption (
+ "show-mini-timeline",
+ _("Display Navigation Timeline in the Toolbar"),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_mini_timeline),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_mini_timeline)
+ ));
+
+ add_option (_("GUI/Toolbar"),
+ new BoolOption (
+ "show-editor-meter",
+ _("Display Master Level Meter in the Toolbar"),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_editor_meter),
+ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_editor_meter)
+ ));
+
+ add_option (_("GUI/Toolbar"),
new ColumVisibilityOption (
"action-table-columns", _("Action Script Button Visibility"), 4,
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_action_table_columns),
)
);
+
add_option (S_("Preferences|Metering"), new OptionEditorHeading (_("Metering")));
ComboOption<float>* mht = new ComboOption<float> (
UI_CONFIG_VARIABLE (float, meter_peak, "meter-peak", 0.0f)
UI_CONFIG_VARIABLE (bool, meter_style_led, "meter-style-led", false)
UI_CONFIG_VARIABLE (bool, show_editor_meter, "show-editor-meter", true)
+UI_CONFIG_VARIABLE (bool, show_toolbar_selclock, "show-toolbar-selclock", false)
+UI_CONFIG_VARIABLE (bool, show_mini_timeline, "show-mini-timeline", true)
UI_CONFIG_VARIABLE (double, waveform_clip_level, "waveform-clip-level", -0.0933967) /* units of dB */
UI_CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
UI_CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)