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 void centre_on_click (GdkEventButton *);
27 bool on_expose_event (GdkEventExpose *);
28 void on_size_request (Gtk::Requisition *);
29 void on_size_allocate (Gtk::Allocation &);
30 bool on_button_press_event (GdkEventButton *);
31 bool on_button_release_event (GdkEventButton *);
32 bool on_motion_notify_event (GdkEventMotion *);
34 void render (cairo_t *);
35 GdkPixmap* get_pixmap (GdkDrawable *);
36 void render_region (RegionView*, cairo_t*, nframes_t, double) const;
37 void editor_view (std::pair<double, double> *, std::pair<double, double> *) const;
39 Editor* _editor; ///< our editor
40 ARDOUR::Session* _session; ///< our session
41 GdkPixmap* _pixmap; ///< pixmap containing a rendering of the region views, or 0
42 bool _regions_dirty; ///< true if _pixmap requires re-rendering, otherwise false
43 int _width; ///< pixmap width
44 int _height; ///< pixmap height
45 double _pixels_per_frame; ///< pixels per frame for the x axis of the pixmap
46 double _vertical_scale;