ardour
editor_summary.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 Paul Davis
3 
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.
8 
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.
13 
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.
17 
18 */
19 
20 #ifndef __gtk_ardour_editor_summary_h__
21 #define __gtk_ardour_editor_summary_h__
22 
23 #include "gtkmm2ext/cairo_widget.h"
24 #include "editor_component.h"
25 
26 namespace ARDOUR {
27  class Session;
28 }
29 
30 class Editor;
31 
36 {
37 public:
39  ~EditorSummary ();
40 
42  void set_overlays_dirty ();
43  void set_background_dirty ();
44  void routes_added (std::list<RouteTimeAxisView*> const &);
45 
46 private:
47  void parameter_changed (std::string);
48  void on_size_allocate (Gtk::Allocation& alloc);
49 
50  enum Position {
53  TOP,
63  };
64 
65  void on_size_request (Gtk::Requisition *);
66  bool on_button_press_event (GdkEventButton *);
67  bool on_button_release_event (GdkEventButton *);
68  bool on_motion_notify_event (GdkEventMotion *);
69  bool on_scroll_event (GdkEventScroll *);
70  bool on_key_press_event (GdkEventKey*);
71  bool on_key_release_event (GdkEventKey*);
72  bool on_enter_notify_event (GdkEventCrossing*);
73  bool on_leave_notify_event (GdkEventCrossing*);
74 
75  void centre_on_click (GdkEventButton *);
76  void render (cairo_t *, cairo_rectangle_t*);
77  void render_region (RegionView*, cairo_t*, double) const;
78  void get_editor (std::pair<double, double> *, std::pair<double, double> *) const;
79  void set_editor (double, double);
80  void set_editor (std::pair<double, double>, double);
81  void set_editor (std::pair<double, double>, std::pair<double, double>);
82  void set_editor_x (double);
83  void set_editor_x (std::pair<double, double>);
84  void set_editor_y (double);
85  void set_editor_y (std::pair<double, double>);
87  double summary_y_to_editor (double) const;
88  double editor_y_to_summary (double) const;
89  Position get_position (double, double) const;
90  void set_cursor (Position);
91  void route_gui_changed (std::string);
92  bool suspending_editor_updates () const;
95  void set_overlays_dirty (int, int, int, int);
96 
99 
102 
103  double _x_scale;
106 
107  std::pair<double, double> _start_editor_x;
108  std::pair<double, double> _start_editor_y;
111 
113 
115  bool _moved;
116  std::pair<double, double> _view_rectangle_x;
117  std::pair<double, double> _view_rectangle_y;
118 
119  std::pair<double, double> _pending_editor_x;
120  std::pair<double, double> _pending_editor_y;
122 
125 
127  cairo_surface_t* _image;
128  void render_background_image ();
130 
134 };
135 
136 #endif
void set_cursor(Position)
std::pair< double, double > _start_editor_y
double summary_y_to_editor(double) const
std::pair< double, double > _pending_editor_y
EditorSummary(Editor *)
double _overhang_fraction
bool on_scroll_event(GdkEventScroll *)
void centre_on_click(GdkEventButton *)
double _start_mouse_y
cairo_surface_t * _image
void render_region(RegionView *, cairo_t *, double) const
double playhead_frame_to_position(framepos_t) const
PBD::ScopedConnectionList position_connection
double _start_mouse_x
void render(cairo_t *, cairo_rectangle_t *)
bool _old_follow_playhead
bool on_enter_notify_event(GdkEventCrossing *)
double editor_y_to_summary(double) const
bool _pending_editor_changed
void set_editor_y(double)
double _last_playhead
bool on_key_press_event(GdkEventKey *)
void parameter_changed(std::string)
void set_editor(double, double)
framepos_t _end
end frame of the overview
Position _zoom_position
void on_size_request(Gtk::Requisition *)
void routes_added(std::list< RouteTimeAxisView * > const &)
void render_background_image()
void playhead_position_changed(framepos_t)
void set_background_dirty()
PBD::ScopedConnection route_ctrl_id_connection
Definition: amp.h:29
std::pair< double, double > _pending_editor_x
double _x_scale
pixels per frame for the x axis of the pixmap
void route_gui_changed(std::string)
bool on_leave_notify_event(GdkEventCrossing *)
framepos_t position_to_playhead_frame_to_position(double pos) const
std::pair< double, double > _start_editor_x
Definition: editor.h:134
std::pair< double, double > _view_rectangle_x
double _track_height
bool on_button_press_event(GdkEventButton *)
bool on_motion_notify_event(GdkEventMotion *)
bool on_button_release_event(GdkEventButton *)
void set_session(ARDOUR::Session *)
std::pair< double, double > _view_rectangle_y
Position get_position(double, double) const
void get_editor(std::pair< double, double > *, std::pair< double, double > *) const
void on_size_allocate(Gtk::Allocation &alloc)
framepos_t _start
start frame of the overview
void set_overlays_dirty()
int64_t framepos_t
PBD::ScopedConnectionList region_property_connection
bool suspending_editor_updates() const
Position _start_position
bool on_key_release_event(GdkEventKey *)
void set_editor_x(double)