1 #ifndef __gtk_ardour_editor_summary_h__
2 #define __gtk_ardour_editor_summary_h__
4 #include <gtkmm/eventbox.h>
12 /** Class to provide a visual summary of the contents of an editor window; represents
13 * the whole session as a set of lines, one per region view.
15 class EditorSummary : public Gtk::EventBox
18 EditorSummary (Editor *);
21 void set_session (ARDOUR::Session *);
23 void set_bounds_dirty ();
26 bool on_expose_event (GdkEventExpose *);
27 void on_size_request (Gtk::Requisition *);
28 void on_size_allocate (Gtk::Allocation &);
29 bool on_button_press_event (GdkEventButton *);
30 bool on_button_release_event (GdkEventButton *);
31 bool on_motion_notify_event (GdkEventMotion *);
33 void render (cairo_t *);
34 GdkPixmap* get_pixmap (GdkDrawable *);
35 void render_region (RegionView*, cairo_t*, nframes_t, double) const;
36 void editor_view (std::pair<double, double> *, std::pair<double, double> *) const;
38 Editor* _editor; ///< our editor
39 ARDOUR::Session* _session; ///< our session
40 GdkPixmap* _pixmap; ///< pixmap containing a rendering of the region views, or 0
41 bool _regions_dirty; ///< true if _pixmap requires re-rendering, otherwise false
42 int _width; ///< pixmap width
43 int _height; ///< pixmap height
44 double _pixels_per_frame; ///< pixels per frame for the x axis of the pixmap
45 double _vertical_scale;