Ardour  8.12
editor_summary.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2009-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2012-2017 Robin Gareus <robin@gareus.org>
5  * Copyright (C) 2017-2019 Ben Loftis <ben@harrisonconsoles.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #ifndef __gtk_ardour_editor_summary_h__
23 #define __gtk_ardour_editor_summary_h__
24 
25 #include "gtkmm2ext/cairo_widget.h"
26 #include "editor_component.h"
27 
28 namespace ARDOUR {
29  class Session;
30 }
31 
32 class Editor;
33 
38 {
39 public:
42 
46  void routes_added (std::list<RouteTimeAxisView*> const &);
47 
48 private:
49  void parameter_changed (std::string);
51 
58  };
59 
69 
71 
73  void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*);
74  void render_region (RegionView*, cairo_t*, double) const;
75  void get_editor (std::pair<double, double>* x, std::pair<double, double>* y = NULL) const;
76  void set_editor (double);
77  void set_editor (std::pair<double, double>);
78  void set_editor_x (double);
79  void set_editor_x (std::pair<double, double>);
81  double editor_y_to_summary (double) const;
82  SummaryPosition get_position (double, double) const;
88  void set_overlays_dirty_rect (int, int, int, int);
89 
90  void summary_zoom_step ( int steps );
91 
94 
97 
98  double _x_scale;
99  double _track_height;
101 
102  std::pair<double, double> _start_editor_x;
105 
107 
109 
110  void set_colors ();
111  uint32_t _phead_color;
112 
113  //used for zooming
114  int _last_mx;
115  int _last_my;
116  int _last_dx;
117  int _last_dy;
119 
120  std::pair<double, double> _view_rectangle_x;
121  std::pair<double, double> _view_rectangle_y;
122 
123  std::pair<double, double> _pending_editor_x;
124  std::pair<double, double> _pending_editor_y;
126 
129 
131  cairo_surface_t* _image;
134 
138 };
139 
140 #endif
void set_editor_x(std::pair< double, double >)
void route_gui_changed(PBD::PropertyChange const &)
void get_editor(std::pair< double, double > *x, std::pair< double, double > *y=NULL) const
EditorSummary(Editor *)
void set_session(ARDOUR::Session *)
void render_region(RegionView *, cairo_t *, double) const
uint32_t _phead_color
std::pair< double, double > _view_rectangle_y
double _start_mouse_y
void reset_to_extents()
PBD::ScopedConnectionList region_property_connection
bool on_button_press_event(GdkEventButton *)
This is a default handler for the signal signal_button_press_event().
void set_editor(double)
samplepos_t _start
start sample of the overview
bool _pending_editor_changed
void render_background_image()
PBD::ScopedConnection route_ctrl_id_connection
bool on_key_press_event(GdkEventKey *)
This is a default handler for the signal signal_key_press_event().
std::pair< double, double > _view_rectangle_x
bool on_scroll_event(GdkEventScroll *)
This is a default handler for the signal signal_scroll_event().
cairo_surface_t * _image
double editor_y_to_summary(double) const
void set_editor_x(double)
void playhead_position_changed(samplepos_t)
void set_colors()
samplepos_t _rightmost
the latest sample we ever viewed
samplepos_t _leftmost
the earliest sample we ever viewed
bool on_enter_notify_event(GdkEventCrossing *)
This is a default handler for the signal signal_enter_notify_event().
PBD::ScopedConnectionList position_connection
void set_editor(std::pair< double, double >)
void parameter_changed(std::string)
double _last_playhead
samplepos_t position_to_playhead_sample_to_position(double pos) const
double _x_scale
pixels per sample for the x axis of the pixmap
bool on_button_release_event(GdkEventButton *)
This is a default handler for the signal signal_button_release_event().
void summary_zoom_step(int steps)
double _start_mouse_x
samplepos_t _end
end sample of the overview
void on_size_request(Gtk::Requisition *)
This is a default handler for the signal signal_size_request().
void set_overlays_dirty()
bool _zoom_trim_dragging
void routes_added(std::list< RouteTimeAxisView * > const &)
std::pair< double, double > _pending_editor_y
void set_cursor(SummaryPosition)
SummaryPosition _start_position
void on_size_allocate(Gtk::Allocation &alloc)
This is a default handler for the signal signal_size_allocate().
double playhead_sample_to_position(samplepos_t) const
bool on_motion_notify_event(GdkEventMotion *)
This is a default handler for the signal signal_motion_notify_event().
void set_background_dirty()
SummaryPosition get_position(double, double) const
void centre_on_click(GdkEventButton *)
double _track_height
bool on_leave_notify_event(GdkEventCrossing *)
This is a default handler for the signal signal_leave_notify_event().
std::pair< double, double > _pending_editor_x
bool on_key_release_event(GdkEventKey *)
This is a default handler for the signal signal_key_release_event().
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
bool _old_follow_playhead
std::pair< double, double > _start_editor_x
bool suspending_editor_updates() const
void set_overlays_dirty_rect(int, int, int, int)
SummaryPosition _zoom_trim_position
Definition: editor.h:158
Temporal::samplepos_t samplepos_t