2 Copyright (C) 2009 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __gtk_ardour_editor_summary_h__
21 #define __gtk_ardour_editor_summary_h__
23 #include "cairo_widget.h"
24 #include "editor_component.h"
32 /** Class to provide a visual summary of the contents of an editor window; represents
33 * the whole session as a set of lines, one per region view.
35 class EditorSummary : public CairoWidget, public EditorComponent
38 EditorSummary (Editor *);
40 void connect_to_session (ARDOUR::Session *);
41 void set_overlays_dirty ();
44 bool on_expose_event (GdkEventExpose *);
45 void on_size_request (Gtk::Requisition *);
46 bool on_button_press_event (GdkEventButton *);
47 bool on_button_release_event (GdkEventButton *);
48 bool on_motion_notify_event (GdkEventMotion *);
49 bool on_scroll_event (GdkEventScroll *);
51 void centre_on_click (GdkEventButton *);
52 void render (cairo_t *);
53 void render_region (RegionView*, cairo_t*, nframes_t, double) const;
54 void get_editor (std::pair<double, double> *, std::pair<double, double> *) const;
55 void set_editor (std::pair<double, double> const &, std::pair<double, double> const &);
56 void playhead_position_changed (nframes64_t);
58 double _x_scale; ///< pixels per frame for the x axis of the pixmap
60 double _last_playhead;
62 std::pair<double, double> _start_editor_x;
63 std::pair<double, double> _start_editor_y;
64 double _start_mouse_x;
65 double _start_mouse_y;