#include "widgets/ardour_button.h"
#include "widgets/ardour_knob.h"
-#include "ardour_ui.h"
#include "automation_controller.h"
+#include "context_menu_helper.h"
#include "gui_thread.h"
#include "note_select_dialog.h"
#include "timers.h"
const ARDOUR::ParameterDescriptor& desc = _controllable->desc();
if (desc.unit == ARDOUR::ParameterDescriptor::MIDI_NOTE) {
- Gtk::Menu* menu = ARDOUR_UI::instance()->shared_popup_menu ();
+ Gtk::Menu* menu = ARDOUR_UI_UTILS::shared_popup_menu ();
MenuList& items = menu->items();
items.push_back(MenuElem(_("Select Note..."),
sigc::mem_fun(*this, &AutomationController::run_note_select_dialog)));
menu->popup(1, ev->time);
return true;
} else if (desc.unit == ARDOUR::ParameterDescriptor::HZ) {
- Gtk::Menu* menu = ARDOUR_UI::instance()->shared_popup_menu ();
+ Gtk::Menu* menu = ARDOUR_UI_UTILS::shared_popup_menu ();
MenuList& items = menu->items();
items.push_back(MenuElem(_("Halve"),
sigc::bind(sigc::mem_fun(*this, &AutomationController::set_ratio),
--- /dev/null
+/*
+ * Copyright (C) 2019 Robin Gareus <robin@gareus.org>
+ *
+ * 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.
+ */
+
+#ifndef _gtkardour_context_menu_helper_h_
+#define _gtkardour_context_menu_helper_h_
+
+namespace Gtk {
+ class Menu;
+}
+
+namespace ARDOUR_UI_UTILS {
+ Gtk::Menu* shared_popup_menu ();
+}
+
+#endif
#include <gtkmm/menu.h>
#include <gtkmm/menuitem.h>
-#include "ardour_ui.h"
+#include "context_menu_helper.h"
#include "time_axis_view.h"
#include "streamview.h"
#include "editor_summary.h"
if (ev->button == 3) { // right-click: show the reset menu action
using namespace Gtk::Menu_Helpers;
- Gtk::Menu* m = ARDOUR_UI::instance()->shared_popup_menu ();
+ Gtk::Menu* m = ARDOUR_UI_UTILS::shared_popup_menu ();
MenuList& items = m->items ();
items.push_back(MenuElem(_("Reset Summary to Extents"),
sigc::mem_fun(*this, &EditorSummary::reset_to_extents)));
#include "widgets/tooltips.h"
#include "gui_thread.h"
-#include "ardour_ui.h"
#include "ardour_window.h"
+#include "context_menu_helper.h"
#include "ui_config.h"
#include "utils.h"
{
using namespace Gtk::Menu_Helpers;
- Gtk::Menu* m = ARDOUR_UI::instance()->shared_popup_menu ();
+ Gtk::Menu* m = ARDOUR_UI_UTILS::shared_popup_menu ();
MenuList& items = m->items ();
RadioMenuItem::Group group;
{
using namespace Gtk::Menu_Helpers;
- Gtk::Menu* m = ARDOUR_UI::instance()->shared_popup_menu ();
+ Gtk::Menu* m = ARDOUR_UI_UTILS::shared_popup_menu ();
MenuList& items = m->items ();
RadioMenuItem::Group group;
#include "widgets/tooltips.h"
-#include "ardour_ui.h"
#include "ardour_window.h"
+#include "context_menu_helper.h"
#include "enums_convert.h"
#include "mixer_strip.h"
#include "mixer_ui.h"
{
using namespace Gtk::Menu_Helpers;
- Gtk::Menu* m = ARDOUR_UI::instance()->shared_popup_menu ();
+ Gtk::Menu* m = ARDOUR_UI_UTILS::shared_popup_menu ();
MenuList& items = m->items ();
RadioMenuItem::Group group;
#include "canvas/item.h"
#include "actions.h"
+#include "context_menu_helper.h"
#include "debug.h"
#include "public_editor.h"
#include "keyboard.h"
gchar const *x = g_getenv ("ARDOUR_THEMES_PATH");
return x && (string (x).find ("gtk2_ardour") != string::npos);
}
+
+Gtk::Menu*
+ARDOUR_UI_UTILS::shared_popup_menu ()
+{
+ return ARDOUR_UI::instance()->shared_popup_menu ();
+}
#include "pbd/strsplit.h"
#include "pbd/xml++.h"
-#include "ardour_ui.h"
+#include "context_menu_helper.h"
#include "visibility_group.h"
#include "pbd/i18n.h"
using namespace Gtk::Menu_Helpers;
- Gtk::Menu* m = ARDOUR_UI::instance()->shared_popup_menu ();
+ Gtk::Menu* m = ARDOUR_UI_UTILS::shared_popup_menu ();
MenuList& items = m->items ();
for (vector<Member>::iterator i = _members.begin(); i != _members.end(); ++i) {