[Summary] Moving to MAC for debugging while progressing suitable dropdown

This commit is contained in:
VKamyshniy 2014-09-02 16:05:27 +03:00
parent 8cf10fa7c7
commit 7e1d4ea9de
3 changed files with 20 additions and 0 deletions

View file

@ -80,6 +80,8 @@ WavesUI::create_widget (const XMLNode& definition, const XMLNodeMap& styles)
child = manage (new WavesButton(text));
} else if (widget_type == "ICONBUTTON") {
child = manage (new WavesIconButton);
} else if (widget_type == "DROPDOWN") {
child = manage (new WavesDropdown);
} else if (widget_type == "ICON") {
std::string image_path;
Searchpath spath(ARDOUR::ardour_data_search_path());
@ -676,6 +678,11 @@ WavesUI::set_attributes (Gtk::Widget& widget, const XMLNode& definition, const X
}
}
WavesDropdown* dropdown = dynamic_cast<WavesDropdown*> (&widget);
if (dropdown) {
set_attributes (dropdown->get_menu (), definition, styles);
}
Gtk::Table* table = dynamic_cast<Gtk::Table*> (&widget);
if (table) {
table->set_col_spacings (xml_property (definition, "columnspacing", styles, 0));
@ -810,6 +817,16 @@ WavesUI::get_waves_grid (const char* id)
return *child;
}
WavesDropdown&
WavesUI::get_waves_dropdown (const char* id)
{
WavesDropdown* child = dynamic_cast<WavesDropdown*> (get_object(id));
if (child == NULL ) {
dbg_msg (std::string("WavesDropdown ") + id + " not found in " + _scrip_file_name + "!");
abort ();
}
return *child;
}
Gtk::Paned&
WavesUI::get_paned (const char* id)
{

View file

@ -36,6 +36,7 @@
#include "waves_grid.h"
#include "waves_button.h"
#include "waves_icon_button.h"
#include "waves_dropdown.h"
using namespace ArdourCanvas::XMLUI;
@ -53,6 +54,7 @@ class WavesUI : public std::map<std::string, Gtk::Object*> {
Gtk::HBox& get_h_box (const char* id);
Gtk::Fixed& get_fixed (const char* id);
WavesGrid& get_waves_grid (const char* id);
WavesDropdown& get_waves_dropdown (const char* id);
Gtk::Paned& get_paned (const char* id);
Gtk::HPaned& get_h_paned (const char* id);
Gtk::VPaned& get_v_paned (const char* id);

View file

@ -28,6 +28,7 @@ path_prefix = 'gtk2_ardour/'
gtk2_ardour_sources = [
'mixer_bridge_view.cc',
'waves_dropdown.cc',
'waves_zoom_control.cc',
'waves_ui.cc',
'waves_grid.cc',