We don't need this functionality anymore as we build on 15 years experience plus the new tabbed structure
<menu name='View' action = 'View'>
<menuitem action='ToggleMaximalEditor'/>
<menuitem action='ToggleMaximalMixer'/>
- <menuitem action='KeepTearoffs'/>
- <menuitem action='reattach-all-tearoffs'/>
<separator/>
class ProcessThread;
}
-namespace Gtkmm2ext {
- class TearOff;
-}
-
namespace Gtk {
class ProgressBar;
}
XMLNode* mixer_settings () const;
XMLNode* keyboard_settings () const;
XMLNode* tearoff_settings (const char*) const;
-
+
void save_ardour_state ();
gboolean configure_handler (GdkEventConfigure* conf);
bool check_audioengine(Gtk::Window&);
- void update_tearoff_visibility ();
-
void setup_profile ();
void setup_tooltips ();
std::list<MidiTracer*> _midi_tracer_windows;
- void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
- void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
- void reattach_all_tearoffs ();
-
/* Transport Control */
- Gtkmm2ext::TearOff* transport_tearoff;
Gtk::Frame transport_frame;
- Gtk::HBox transport_tearoff_hbox;
Gtk::HBox transport_hbox;
Gtk::Fixed transport_base;
Gtk::Fixed transport_button_base;
#include "gtkmm2ext/cairocell.h"
#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/click_box.h"
-#include "gtkmm2ext/tearoff.h"
#include "gtkmm2ext/window_title.h"
#include "ardour/profile.h"
{
RefPtr<Action> act;
- transport_tearoff_hbox.set_border_width (PX_SCALE(3));
- transport_tearoff_hbox.set_spacing (PX_SCALE(3));
-
- transport_tearoff = manage (new TearOff (transport_tearoff_hbox));
- transport_tearoff->set_name ("TransportBase");
- transport_tearoff->tearoff_window().signal_key_press_event().connect (sigc::bind (sigc::ptr_fun (relay_key_press), &transport_tearoff->tearoff_window()), false);
-
- if (Profile->get_sae() || Profile->get_mixbus()) {
- transport_tearoff->set_can_be_torn_off (false);
- }
-
- transport_hbox.pack_start (*transport_tearoff, true, false);
+ transport_hbox.set_border_width (PX_SCALE(3));
+ transport_hbox.set_spacing (PX_SCALE(3));
transport_base.set_name ("TransportBase");
transport_base.add (transport_hbox);
transport_frame.set_name ("BaseFrame");
transport_frame.add (transport_base);
- transport_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast<Box*>(&top_packer),
- static_cast<Widget*>(&transport_frame)));
- transport_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
- static_cast<Widget*> (&transport_frame), 1));
- transport_tearoff->Hidden.connect (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast<Box*>(&top_packer),
- static_cast<Widget*>(&transport_frame)));
- transport_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
- static_cast<Widget*> (&transport_frame), 1));
-
auto_return_button.set_text(_("Auto Return"));
follow_edits_button.set_text(_("Follow Edits"));
time_info_box = manage (new TimeInfoBox);
- if (ARDOUR::Profile->get_trx()) {
- transport_tearoff_hbox.pack_start (*time_info_box, false, false);
- }
-
- transport_tearoff_hbox.pack_start (*transport_vbox, false, false);
+ transport_hbox.pack_start (*transport_vbox, false, true);
/* transport related toggle controls */
}
if (!ARDOUR::Profile->get_trx()) {
- transport_tearoff_hbox.pack_start (*auto_box, false, false);
+ transport_hbox.pack_start (*auto_box, false, false);
}
- transport_tearoff_hbox.pack_start (*clock_box, true, true);
+ transport_hbox.pack_start (*clock_box, true, true);
if (ARDOUR::Profile->get_trx()) {
- transport_tearoff_hbox.pack_start (*auto_box, false, false);
+ transport_hbox.pack_start (*auto_box, false, false);
}
if (!ARDOUR::Profile->get_trx()) {
- transport_tearoff_hbox.pack_start (*time_info_box, false, false);
+ transport_hbox.pack_start (*time_info_box, false, false);
}
if (!ARDOUR::Profile->get_trx()) {
- transport_tearoff_hbox.pack_start (alert_box, false, false);
- transport_tearoff_hbox.pack_start (meter_box, false, false);
- transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false);
+ transport_hbox.pack_start (alert_box, false, false);
+ transport_hbox.pack_start (meter_box, false, false);
+ transport_hbox.pack_start (editor_meter_peak_display, false, false);
}
if (Profile->get_sae()) {
Image* img = manage (new Image ((::get_icon (X_("sae")))));
- transport_tearoff_hbox.pack_end (*img, false, false);
+ transport_hbox.pack_end (*img, false, false);
}
/* desensitize */
set_transport_sensitivity (false);
-
- XMLNode* tnode = tearoff_settings ("transport");
- if (tnode) {
- transport_tearoff->set_state (*tnode);
- }
}
#undef PX_SCALE
-void
-ARDOUR_UI::detach_tearoff (Box* b, Widget* w)
-{
- b->remove (*w);
-}
-
-void
-ARDOUR_UI::reattach_tearoff (Box* b, Widget* w, int32_t n)
-{
- b->pack_start (*w);
- b->reorder_child (*w, n);
-}
-
-void
-ARDOUR_UI::reattach_all_tearoffs ()
-{
- if (transport_tearoff) transport_tearoff->put_it_back();
- if (editor) editor->reattach_all_tearoffs ();
-}
-
void
ARDOUR_UI::soloing_changed (bool onoff)
{
UIConfiguration::instance().reset_dpi ();
}
-void
-ARDOUR_UI::update_tearoff_visibility ()
-{
- if (editor) {
- editor->update_tearoff_visibility ();
- }
-}
-
void
ARDOUR_UI::maximise_editing_space ()
{
update_format ();
if (meter_box.get_parent()) {
- transport_tearoff_hbox.remove (meter_box);
- transport_tearoff_hbox.remove (editor_meter_peak_display);
+ transport_hbox.remove (meter_box);
+ transport_hbox.remove (editor_meter_peak_display);
}
if (editor_meter) {
}
if (meter_box.get_parent()) {
- transport_tearoff_hbox.remove (meter_box);
- transport_tearoff_hbox.remove (editor_meter_peak_display);
+ transport_hbox.remove (meter_box);
+ transport_hbox.remove (editor_meter_peak_display);
}
if (_session &&
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_tearoff_hbox.pack_start (meter_box, false, false);
- transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false);
+ 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();
}
#include <glibmm/miscutils.h>
#include <gtk/gtk.h>
+#include "gtkmm2ext/cairo_packer.h"
+#include "gtkmm2ext/tearoff.h"
#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/window_title.h"
-#include "gtkmm2ext/tearoff.h"
-#include "gtkmm2ext/cairo_packer.h"
#include "pbd/file_utils.h"
#include "pbd/fpu.h"
ActionManager::register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("Maximise Editor Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editing_space));
ActionManager::register_toggle_action (common_actions, X_("ToggleMaximalMixer"), _("Maximise Mixer Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_space));
- act = ActionManager::register_toggle_action (common_actions, X_("KeepTearoffs"), _("Show Toolbars"), mem_fun (*this, &ARDOUR_UI::toggle_keep_tearoffs));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
ActionManager::register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));
- ActionManager::register_action (common_actions, X_("reattach-all-tearoffs"), _("Reattach All Tearoffs"), sigc::mem_fun (*this, &ARDOUR_UI::reattach_all_tearoffs));
-
act = ActionManager::register_action (common_actions, X_("NewMIDITracer"), _("MIDI Tracer"), sigc::mem_fun(*this, &ARDOUR_UI::new_midi_tracer_window));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::register_action (common_actions, X_("chat"), _("Chat"), sigc::mem_fun(*this, &ARDOUR_UI::launch_chat));
WM::Manager::instance().add_state (*window_node);
- /* tearoffs */
-
XMLNode* tearoff_node = new XMLNode (X_("Tearoffs"));
- if (transport_tearoff) {
- XMLNode* t = new XMLNode (X_("transport"));
- transport_tearoff->add_state (*t);
- tearoff_node->add_child_nocopy (*t);
- }
-
if (mixer->monitor_section()) {
XMLNode* t = new XMLNode (X_("monitor-section"));
mixer->monitor_section()->tearoff().add_state (*t);
tearoff_node->add_child_nocopy (*t);
}
- if (editor->mouse_mode_tearoff()) {
- XMLNode* t = new XMLNode (X_("mouse-mode"));
- editor->mouse_mode_tearoff ()->add_state (*t);
- tearoff_node->add_child_nocopy (*t);
- }
-
window_node->add_child_nocopy (*tearoff_node);
XMLNode& enode (editor->get_state());
using namespace ARDOUR;
using namespace PBD;
-void
-ARDOUR_UI::toggle_keep_tearoffs ()
-{
- ActionManager::toggle_config_state ("Common", "KeepTearoffs", &UIConfiguration::set_keep_tearoffs, &UIConfiguration::get_keep_tearoffs);
-
- ARDOUR_UI::update_tearoff_visibility();
-}
-
void
ARDOUR_UI::toggle_external_sync()
{
ActionManager::map_some_state ("options", "SendMMC", &RCConfiguration::get_send_mmc);
- } else if (p == "keep-tearoffs") {
- ActionManager::map_some_state ("Common", "KeepTearoffs", &UIConfiguration::get_keep_tearoffs);
} else if (p == "mmc-control") {
ActionManager::map_some_state ("options", "UseMMC", &RCConfiguration::get_mmc_control);
} else if (p == "midi-feedback") {
if (editor_meter) {
if (meter_box.get_parent()) {
- transport_tearoff_hbox.remove (meter_box);
- transport_tearoff_hbox.remove (editor_meter_peak_display);
+ transport_hbox.remove (meter_box);
+ transport_hbox.remove (editor_meter_peak_display);
}
if (show) {
- transport_tearoff_hbox.pack_start (meter_box, false, false);
- transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false);
+ 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();
}
#include "gtkmm2ext/bindings.h"
#include "gtkmm2ext/grouped_buttons.h"
#include "gtkmm2ext/gtk_ui.h"
-#include "gtkmm2ext/tearoff.h"
#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/window_title.h"
#include "gtkmm2ext/choice.h"
, bbt_beat_subdivision (4)
, _visible_track_count (-1)
, toolbar_selection_clock_table (2,3)
- , _mouse_mode_tearoff (0)
, automation_mode_button (_("mode"))
- , _zoom_tearoff (0)
- , _tools_tearoff (0)
, _toolbar_viewport (*manage (new Gtk::Adjustment (0, 0, 1e10)), *manage (new Gtk::Adjustment (0, 0, 1e10)))
, selection (new Selection (this))
, cut_buffer (new Selection (this))
if (!ARDOUR::Profile->get_trx()) {
mode_box->pack_start (edit_mode_selector, false, false);
}
+
mode_box->pack_start (*mouse_mode_box, false, false);
-
- _mouse_mode_tearoff = manage (new TearOff (*mode_box));
- _mouse_mode_tearoff->set_name ("MouseModeBase");
- _mouse_mode_tearoff->tearoff_window().signal_key_press_event().connect (sigc::bind (sigc::ptr_fun (relay_key_press), &_mouse_mode_tearoff->tearoff_window()), false);
-
- if (Profile->get_sae() || Profile->get_mixbus() ) {
- _mouse_mode_tearoff->set_can_be_torn_off (false);
- }
-
- _mouse_mode_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
- &_mouse_mode_tearoff->tearoff_window()));
- _mouse_mode_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
- &_mouse_mode_tearoff->tearoff_window(), 1));
- _mouse_mode_tearoff->Hidden.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
- &_mouse_mode_tearoff->tearoff_window()));
- _mouse_mode_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
- &_mouse_mode_tearoff->tearoff_window(), 1));
-
+
/* Zoom */
_zoom_box.set_spacing (2);
_zoom_box.pack_start (tav_expand_button);
}
- if (!ARDOUR::Profile->get_trx()) {
- _zoom_tearoff = manage (new TearOff (_zoom_box));
-
- _zoom_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
- &_zoom_tearoff->tearoff_window()));
- _zoom_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
- &_zoom_tearoff->tearoff_window(), 0));
- _zoom_tearoff->Hidden.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
- &_zoom_tearoff->tearoff_window()));
- _zoom_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
- &_zoom_tearoff->tearoff_window(), 0));
- }
-
- if (Profile->get_sae() || Profile->get_mixbus() ) {
- _zoom_tearoff->set_can_be_torn_off (false);
- }
-
snap_box.set_spacing (2);
snap_box.set_border_width (2);
HBox* hbox = manage (new HBox);
hbox->set_spacing(2);
- _tools_tearoff = manage (new TearOff (*hbox));
- _tools_tearoff->set_name ("MouseModeBase");
- _tools_tearoff->tearoff_window().signal_key_press_event().connect (sigc::bind (sigc::ptr_fun (relay_key_press), &_tools_tearoff->tearoff_window()), false);
-
- if (Profile->get_sae() || Profile->get_mixbus()) {
- _tools_tearoff->set_can_be_torn_off (false);
- }
-
- _tools_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
- &_tools_tearoff->tearoff_window()));
- _tools_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
- &_tools_tearoff->tearoff_window(), 0));
- _tools_tearoff->Hidden.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
- &_tools_tearoff->tearoff_window()));
- _tools_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
- &_tools_tearoff->tearoff_window(), 0));
-
toolbar_hbox.set_spacing (2);
toolbar_hbox.set_border_width (1);
- toolbar_hbox.pack_start (*_mouse_mode_tearoff, false, false);
+ toolbar_hbox.pack_start (*mode_box, false, false);
if (!ARDOUR::Profile->get_trx()) {
- toolbar_hbox.pack_start (*_zoom_tearoff, false, false);
- toolbar_hbox.pack_start (*_tools_tearoff, false, false);
+ toolbar_hbox.pack_start (_zoom_box, false, false);
+ toolbar_hbox.pack_start (*hbox, false, false);
}
if (!ARDOUR::Profile->get_trx()) {
hbox->pack_start (snap_box, false, false);
hbox->pack_start (*nudge_box, false, false);
}
- hbox->pack_start (panic_box, false, false);
hbox->show_all ();
}
}
-void
-Editor::detach_tearoff (Box* /*b*/, Window* /*w*/)
-{
- if ((_tools_tearoff->torn_off() || !_tools_tearoff->visible()) &&
- (_mouse_mode_tearoff->torn_off() || !_mouse_mode_tearoff->visible()) &&
- (_zoom_tearoff && (_zoom_tearoff->torn_off() || !_zoom_tearoff->visible()))) {
- top_hbox.remove (toolbar_frame);
- }
-}
-
-void
-Editor::reattach_tearoff (Box* /*b*/, Window* /*w*/, int32_t /*n*/)
-{
- if (toolbar_frame.get_parent() == 0) {
- top_hbox.pack_end (toolbar_frame);
- }
-}
-
void
Editor::set_show_measures (bool yn)
{
_snapshots->redisplay ();
}
-void
-Editor::update_tearoff_visibility()
-{
- bool visible = UIConfiguration::instance().get_keep_tearoffs();
- _mouse_mode_tearoff->set_visible (visible);
- _tools_tearoff->set_visible (visible);
- if (_zoom_tearoff) {
- _zoom_tearoff->set_visible (visible);
- }
-}
-
-void
-Editor::reattach_all_tearoffs ()
-{
- if (_mouse_mode_tearoff) _mouse_mode_tearoff->put_it_back ();
- if (_tools_tearoff) _tools_tearoff->put_it_back ();
- if (_zoom_tearoff) _zoom_tearoff->put_it_back ();
-}
-
void
Editor::maximise_editing_space ()
{
#include "selection_memento.h"
namespace Gtkmm2ext {
- class TearOff;
class Bindings;
}
void maximise_editing_space();
void restore_editing_space();
- void update_tearoff_visibility();
- void reattach_all_tearoffs ();
-
double get_y_origin () const;
void reset_x_origin (framepos_t);
void reset_x_origin_to_follow_playhead ();
TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
- Gtkmm2ext::TearOff* mouse_mode_tearoff () const { return _mouse_mode_tearoff; }
- Gtkmm2ext::TearOff* tools_tearoff () const { return _tools_tearoff; }
-
void snap_to (framepos_t& first,
ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
bool for_mark = false,
Gtk::Table toolbar_selection_clock_table;
Gtk::Label toolbar_selection_cursor_label;
- Gtkmm2ext::TearOff* _mouse_mode_tearoff;
ArdourButton mouse_select_button;
ArdourButton mouse_draw_button;
ArdourButton mouse_move_button;
Glib::RefPtr<Gtk::RadioAction> zoom_focus_action (Editing::ZoomFocus);
Gtk::HBox _zoom_box;
- Gtkmm2ext::TearOff* _zoom_tearoff;
void zoom_adjustment_changed();
void setup_toolbar ();
void setup_tooltips ();
- Gtkmm2ext::TearOff* _tools_tearoff;
Gtk::HBox toolbar_hbox;
Gtk::EventBox toolbar_base;
Gtk::Frame toolbar_frame;
Gtk::Viewport _toolbar_viewport;
- /* midi toolbar */
-
- Gtk::HBox panic_box;
-
void setup_midi_toolbar ();
/* selection process */
void cms_new (boost::shared_ptr<ARDOUR::Route>);
void current_mixer_strip_hidden ();
- void detach_tearoff (Gtk::Box* b, Gtk::Window* w);
- void reattach_tearoff (Gtk::Box* b, Gtk::Window* w, int32_t n);
#ifdef GTKOSX
void ensure_all_elements_drawn ();
#endif
#include "pbd/file_utils.h"
-#include "gtkmm2ext/tearoff.h"
#include "gtkmm2ext/utils.h"
#include "ardour/filesystem_paths.h"
}
} else if (p == "timecode-offset" || p == "timecode-offset-negative") {
update_just_timecode ();
- } else if (p == "show-zoom-tools") {
- if (_zoom_tearoff) {
- _zoom_tearoff->set_visible (UIConfiguration::instance().get_show_zoom_tools(), true);
- }
} else if (p == "sound-midi-notes") {
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("sound-midi-notes"));
#include "gtkmm2ext/bindings.h"
#include "gtkmm2ext/utils.h"
-#include "gtkmm2ext/tearoff.h"
#include "canvas/canvas.h"
class Menu;
}
-namespace Gtkmm2ext {
- class TearOff;
-}
-
class AudioRegionView;
class AutomationLine;
class AutomationTimeAxisView;
virtual void remove_last_capture () = 0;
virtual void maximise_editing_space () = 0;
virtual void restore_editing_space () = 0;
- virtual void update_tearoff_visibility () = 0;
- virtual void reattach_all_tearoffs () = 0;
virtual framepos_t get_preferred_edit_position (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE, bool from_context_menu = false, bool from_outside_canvas = false) = 0;
virtual void toggle_meter_updating() = 0;
virtual void split_regions_at (framepos_t, RegionSelection&) = 0;
virtual TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const = 0;
virtual TrackViewList const & get_track_views () = 0;
- virtual Gtkmm2ext::TearOff* mouse_mode_tearoff () const = 0;
- virtual Gtkmm2ext::TearOff* tools_tearoff () const = 0;
-
virtual DragManager* drags () const = 0;
virtual void maybe_autoscroll (bool, bool, bool from_headers) = 0;
virtual void stop_canvas_autoscroll () = 0;
UI_CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi")
UI_CONFIG_VARIABLE (std::string, default_bindings, "default-bindings", "ardour")
UI_CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", false)
-UI_CONFIG_VARIABLE (bool, keep_tearoffs, "keep-tearoffs", true)
UI_CONFIG_VARIABLE (bool, default_narrow_ms, "default-narrow_ms", false)
UI_CONFIG_VARIABLE (bool, name_new_markers, "name-new-markers", false)
UI_CONFIG_VARIABLE (bool, rubberbanding_snaps_to_grid, "rubberbanding-snaps-to-grid", false)