+void
+PluginEqGui::update_pointer_info(float x, float y)
+{
+ const int freq = std::max(1, (int) roundf((powf(10, x / _analysis_width * _log_max) - 1) * _samplerate / 2.0 / _log_coeff));
+ const float dB = _max_dB - y / _analysis_height * ( _max_dB - _min_dB );
+ std::stringstream ss;
+ ss << std::fixed;
+ if (freq >= 10000) {
+ ss << std::setprecision (1) << freq / 1000.0 << "kHz";
+ } else if (freq >= 1000) {
+ ss << std::setprecision (2) << freq / 1000.0 << "kHz";
+ } else {
+ ss << std::setprecision (0) << freq << "Hz";
+ }
+ ss << " " << std::setw(5) << std::setprecision (1) << std::showpos << dB;
+ ss << std::setw(0) << "dB";
+ _pointer_info->set_text(ss.str());
+}
+
+bool
+PluginEqGui::analysis_area_mouseover(GdkEventMotion *event)
+{
+ update_pointer_info(event->x, event->y);
+ return true;
+}
+
+bool
+PluginEqGui::analysis_area_mouseexit(GdkEventCrossing *)
+{
+ _pointer_info->set_text("");
+ return true;
+}
+
+bool
+PluginEqGui::analysis_area_mousedown(GdkEventButton *event)
+{
+ update_pointer_info(event->x, event->y);
+ return true;
+}
+
+