Add a widget giving an overview of the editor, as (what I think is being) suggested...
[ardour.git] / gtk2_ardour / editor_summary.h
1 #ifndef __gtk_ardour_editor_summary_h__
2 #define __gtk_ardour_editor_summary_h__
3
4 #include <gtkmm/eventbox.h>
5
6 namespace ARDOUR {
7         class Session;
8 }
9
10 class Editor;
11
12 class EditorSummary : public Gtk::EventBox
13 {
14 public:
15         EditorSummary (Editor *);
16         ~EditorSummary ();
17
18         void set_session (ARDOUR::Session *);
19         void set_dirty ();
20         void set_bounds_dirty ();
21
22 private:
23         bool on_expose_event (GdkEventExpose *);
24         void on_size_request (Gtk::Requisition *);
25         void on_size_allocate (Gtk::Allocation &);
26         bool on_button_press_event (GdkEventButton *);
27
28         void render (cairo_t *);
29         GdkPixmap* get_pixmap (GdkDrawable *);
30         void render_region (RegionView*, cairo_t*, nframes_t, double) const;
31
32         Editor* _editor;
33         ARDOUR::Session* _session;
34         GdkPixmap* _pixmap;
35         bool _regions_dirty;
36         int _width;
37         int _height;
38         double _pixels_per_frame;
39 };
40
41 #endif