Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
23 
24 #include "ardour/session_handle.h"
25 #include "ardour/types.h"
26 #include "gtkmm2ext/cairo_widget.h"
27 #include "pbd/property_basics.h"
28 
29 #include "editor_component.h"
30 
31 namespace ARDOUR {
32  class Session;
33 }
34 
35 class Editor;
36 class RegionView;
37 class RouteTimeAxisView;
38 
43 {
44 public:
47 
51  void routes_added (std::list<RouteTimeAxisView*> const &);
52 
53 private:
54  void parameter_changed (std::string);
56 
63  };
64 
74 
76 
78  void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*);
79  void render_region (RegionView*, cairo_t*, double) const;
80  void get_editor (std::pair<double, double>* x, std::pair<double, double>* y = NULL) const;
81  void set_editor (double);
82  void set_editor (std::pair<double, double>);
83  void set_editor_x (double);
84  void set_editor_x (std::pair<double, double>);
86  double editor_y_to_summary (double) const;
87  SummaryPosition get_position (double, double) const;
93  void set_overlays_dirty_rect (int, int, int, int);
94 
95  void summary_zoom_step ( int steps );
96 
99 
102 
103  double _x_scale;
106 
107  std::pair<double, double> _start_editor_x;
110 
112 
114 
115  void set_colors ();
116  uint32_t _phead_color;
117 
118  //used for zooming
119  int _last_mx;
120  int _last_my;
121  int _last_dx;
122  int _last_dy;
124 
125  std::pair<double, double> _view_rectangle_x;
126  std::pair<double, double> _view_rectangle_y;
127 
128  std::pair<double, double> _pending_editor_x;
129  std::pair<double, double> _pending_editor_y;
131 
134 
136  cairo_surface_t* _image;
139 
143 };
144 
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