use new action map API instead of ActionManager::get_action
[ardour.git] / gtk2_ardour / analysis_window.h
index cd1243bb6ac63c0946556f931f6679db77d32123..cee37b308fb746d333465768766d0c694a904e3c 100644 (file)
 #include <gtkmm/label.h>
 #include <gtkmm/liststore.h>
 #include <gtkmm/separator.h>
+#include <gtkmm/window.h>
 
 #include <gtkmm2ext/dndtreeview.h>
 
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 
+#include "ardour/session_handle.h"
 
-#include "ardour_dialog.h"
 #include "fft_graph.h"
 #include "fft_result.h"
 
+namespace ARDOUR {
+       class Session;
+}
 
-class AnalysisWindow : public ArdourDialog
+class AnalysisWindow : public Gtk::Window, public ARDOUR::SessionHandlePtr
 {
-  public:
-         AnalysisWindow  ();
-         ~AnalysisWindow ();
-
-         void set_rangemode();
-         void set_regionmode();
-         
-         void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
-
-         void analyze ();
-
-  private:
-         
-         void clear_tracklist();
-
-         void source_selection_changed (Gtk::RadioButton *);
-         void display_model_changed    (Gtk::RadioButton *);
-
-         void analyze_data                             (Gtk::Button *);
-         
-         struct TrackListColumns : public Gtk::TreeModel::ColumnRecord {
-                 public:
-                 TrackListColumns () {
-                               add (trackname);
+public:
+       AnalysisWindow  ();
+       ~AnalysisWindow ();
+
+       void set_rangemode();
+       void set_regionmode();
+
+       void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
+
+       void analyze ();
+
+private:
+       void clear_tracklist();
+
+       void source_selection_changed (Gtk::RadioButton *);
+       void display_model_changed    (Gtk::RadioButton *);
+
+       void show_minmax_changed ();
+       void show_normalized_changed ();
+       void show_proportional_changed ();
+
+       void analyze_data (Gtk::Button *);
+
+       struct TrackListColumns : public Gtk::TreeModel::ColumnRecord {
+               public:
+                       TrackListColumns () {
+                               add (trackname);
                                add (visible);
                                add (color);
                                add (graph);
-                 }
-                 Gtk::TreeModelColumn<std::string> trackname;
-                 Gtk::TreeModelColumn<bool>        visible;
-          Gtk::TreeModelColumn<Gdk::Color>  color;
-                 Gtk::TreeModelColumn<FFTResult *>  graph;
-         };
-
-         // Packing essentials
-         Gtk::HBox hbox;
-         Gtk::VBox vbox;
-         
-         // Left  side
-         Glib::RefPtr<Gtk::ListStore> tlmodel;
-         TrackListColumns tlcols;
-         Gtk::TreeView track_list;
-         
-         Gtk::Label source_selection_label;
-         
-         Gtk::RadioButton source_selection_ranges_rb;
-         Gtk::RadioButton source_selection_regions_rb;
-
-         Gtk::HSeparator hseparator1;
-         
-         Gtk::Label display_model_label;
-         Gtk::RadioButton display_model_composite_separate_rb;
-         Gtk::RadioButton display_model_composite_all_tracks_rb;
-         
-         Gtk::HSeparator hseparator2;
-
-         Gtk::Button refresh_button;
-         
-         // The graph
-         FFTGraph fft_graph;
-
-         bool track_list_ready;
-         Glib::Mutex track_list_lock;
-
-         friend class FFTGraph;
+                       }
+                       Gtk::TreeModelColumn<std::string> trackname;
+                       Gtk::TreeModelColumn<bool>        visible;
+                       Gtk::TreeModelColumn<Gdk::Color>  color;
+                       Gtk::TreeModelColumn<FFTResult *>  graph;
+       };
+
+       // Packing essentials
+       Gtk::HBox hbox;
+       Gtk::VBox vbox;
+
+       // Left  side
+       Glib::RefPtr<Gtk::ListStore> tlmodel;
+       TrackListColumns tlcols;
+       Gtk::TreeView track_list;
+
+       Gtk::Label source_selection_label;
+
+       Gtk::RadioButton source_selection_ranges_rb;
+       Gtk::RadioButton source_selection_regions_rb;
+
+       Gtk::HSeparator hseparator1;
+
+       Gtk::Button refresh_button;
+
+       Gtk::CheckButton show_minmax_button;
+       Gtk::CheckButton show_normalized_button;
+       Gtk::CheckButton show_proportional_button;
+
+       // The graph
+       FFTGraph fft_graph;
+
+       bool track_list_ready;
+       Glib::Threads::Mutex track_list_lock;
+
+       friend class FFTGraph;
 };
 
 #endif // __ardour_analysis_window_h