}
ui_config = new UIConfiguration();
+ ui_config->ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed));
+ boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
+ ui_config->map_parameters (pc);
editor = 0;
mixer = 0;
#include "ardour/osc.h"
#endif
+#include "canvas/wave_view.h"
+
#include "audio_clock.h"
#include "ardour_ui.h"
#include "actions.h"
void
ARDOUR_UI::parameter_changed (std::string p)
{
- ENSURE_GUI_THREAD (*this, &ARDOUR_UI::parameter_changed, p)
-
if (p == "external-sync") {
ActionManager::map_some_state ("Transport", "ToggleExternalSync", sigc::mem_fun (_session->config, &SessionConfiguration::get_external_sync));
} else if (p == "super-rapid-clock-update") {
stop_clocking ();
start_clocking ();
+ } else if (p == "waveform-gradient-depth") {
+ ArdourCanvas::WaveView::set_global_gradient_depth (config()->get_waveform_gradient_depth());
}
}
ArdourCanvas::WaveView::set_global_gradient_depth (v);
}
-
void
ThemeManager::on_timeline_item_gradient_depth_change ()
{
{
}
+void
+UIConfiguration::map_parameters (boost::function<void (std::string)>& functor)
+{
+#undef UI_CONFIG_VARIABLE
+#define UI_CONFIG_VARIABLE(Type,var,Name,value) functor (Name);
+#include "ui_config_vars.h"
+#undef UI_CONFIG_VARIABLE
+}
+
int
UIConfiguration::load_defaults ()
{
uint32_t color_by_name (const std::string&);
- sigc::signal<void,const char*> ParameterChanged;
+ sigc::signal<void,std::string> ParameterChanged;
+ void map_parameters (boost::function<void (std::string)>&);
#undef UI_CONFIG_VARIABLE
#define UI_CONFIG_VARIABLE(Type,var,name,value) \
#else
cerr << "draw, logscaled = " << _wave_view->_logscaled << " global " << WaveView::_global_logscaled << endl;
+ cerr << "gradient depth: " << _wave_view->gradient_depth() << endl;
boost::scoped_array<LineTips> tips (new LineTips[_n_peaks]);