From 598feb7cdc9fd891d303f1d0eb8f43b85c2c5402 Mon Sep 17 00:00:00 2001 From: VKamyshniy Date: Thu, 26 Jun 2014 17:40:20 +0300 Subject: [PATCH] [Summary] Just adding access to the named Gtk::EventBox-es, created with XML scripts. --- gtk2_ardour/waves_ui.cc | 11 +++++++++++ gtk2_ardour/waves_ui.h | 1 + 2 files changed, 12 insertions(+) diff --git a/gtk2_ardour/waves_ui.cc b/gtk2_ardour/waves_ui.cc index 25246e53d6..7e7b210662 100644 --- a/gtk2_ardour/waves_ui.cc +++ b/gtk2_ardour/waves_ui.cc @@ -480,6 +480,17 @@ WavesUI::get_adjustment(const char* id) return *child; } +Gtk::EventBox& +WavesUI::get_event_box (const char* id) +{ + Gtk::EventBox* child = dynamic_cast (get_object(id)); + if (child == NULL ) { + dbg_msg (std::string("Gtk::EventBox ") + id + " not found !"); + throw std::exception(); + } + return *child; +} + Gtk::Box& WavesUI::get_box (const char* id) diff --git a/gtk2_ardour/waves_ui.h b/gtk2_ardour/waves_ui.h index 99edfd4b36..0975968851 100644 --- a/gtk2_ardour/waves_ui.h +++ b/gtk2_ardour/waves_ui.h @@ -42,6 +42,7 @@ class WavesUI : public std::map { WavesUI (const std::string& layout_script_file, Gtk::Container& root); Gtk::Adjustment& get_adjustment (const char* id); + Gtk::EventBox& get_event_box (const char* id); Gtk::Box& get_box (const char* id); Gtk::VBox& get_v_box (const char* id); Gtk::HBox& get_h_box (const char* id);