void first_idle ();
virtual bool have_idled () const { return _have_idled; }
- framepos_t leftmost_position() const { return leftmost_frame; }
+ framepos_t leftmost_sample() const { return leftmost_frame; }
- framecnt_t current_page_frames() const {
- return (framecnt_t) floor (_visible_canvas_width * frames_per_pixel);
+ framecnt_t current_page_samples() const {
+ return (framecnt_t) floor (_visible_canvas_width * samples_per_pixel);
}
double visible_canvas_height () const {
void transition_to_rolling (bool forward);
/* NOTE: these functions assume that the "pixel" coordinate is
- the result of using the world->canvas affine transform on a
- world coordinate. These coordinates already take into
- account any scrolling carried out by adjusting the
- xscroll_adjustment.
+ in canvas coordinates. These coordinates already take into
+ account any scrolling offsets.
*/
- framepos_t pixel_to_frame (double pixel) const {
+ framepos_t pixel_to_sample (double pixel) const {
/* pixel can be less than zero when motion events
are processed. since we've already run the world->canvas
*/
if (pixel >= 0) {
- return (framepos_t) rint (pixel * frames_per_pixel);
+ return (framepos_t) rint (pixel * samples_per_pixel);
} else {
return 0;
}
}
- double frame_to_pixel (framepos_t frame) const {
- return rint (frame / frames_per_pixel);
+ double sample_to_pixel (framepos_t sample) const {
+ return rint (sample / samples_per_pixel);
}
- double frame_to_pixel_unrounded (framepos_t frame) const {
- return frame / frames_per_pixel;
+ double sample_to_pixel_unrounded (framepos_t sample) const {
+ return sample / samples_per_pixel;
}
- void flush_canvas ();
-
/* selection */
Selection& get_selection() const { return *selection; }
void set_zoom_focus (Editing::ZoomFocus);
Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
- double get_current_zoom () const { return frames_per_pixel; }
+ double get_current_zoom () const { return samples_per_pixel; }
void cycle_zoom_focus ();
void temporal_zoom_step (bool coarser);
void tav_zoom_step (bool coarser);
VisualState (bool with_tracks);
~VisualState ();
double y_position;
- double frames_per_pixel;
+ double samples_per_pixel;
framepos_t leftmost_frame;
Editing::ZoomFocus zoom_focus;
GUIObjectState* gui_state;
void cancel_visual_state_op (uint32_t n);
framepos_t leftmost_frame;
- double frames_per_pixel;
+ double samples_per_pixel;
Editing::ZoomFocus zoom_focus;
- void set_frames_per_pixel (double);
- bool clamp_frames_per_pixel (double &) const;
+ void set_samples_per_pixel (double);
+ bool clamp_samples_per_pixel (double &) const;
Editing::MouseMode mouse_mode;
Editing::MouseMode pre_internal_mouse_mode;
ArdourCanvas::GtkCanvas* _track_canvas;
ArdourCanvas::GtkCanvasViewport* _track_canvas_viewport;
- Gtk::Adjustment* _track_canvas_hadj;
- Gtk::Adjustment* _track_canvas_vadj;
ArdourCanvas::GtkCanvas* _time_bars_canvas;
ArdourCanvas::GtkCanvasViewport* _time_bars_canvas_viewport;
- Gtk::Adjustment* _time_bars_canvas_hadj;
Gtk::Adjustment* _time_bars_canvas_vadj;
bool within_track_canvas;
/** the adjustment that controls the overall editor vertical scroll position */
Gtk::Adjustment vertical_adjustment;
+ Gtk::Adjustment horizontal_adjustment;
+ Gtk::Adjustment unused_adjustment; // yes, really; Gtk::Layout constructor requires refs
Gtk::Layout controls_layout;
bool control_layout_scroll (GdkEventScroll* ev);
void reset_controls_layout_width ();
Type pending;
framepos_t time_origin;
- double frames_per_pixel;
+ double samples_per_pixel;
double y_origin;
int idle_handler_id;
/** true if we are currently in the idle handler */
bool being_handled;
- VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_pixel (0), idle_handler_id (-1), being_handled (false) {}
+ VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), samples_per_pixel (0), idle_handler_id (-1), being_handled (false) {}
void add (Type t) {
pending = Type (pending | t);
}
void region_view_added (RegionView *);
void region_view_removed ();
- void update_canvas_now ();
-
EditorGroupTabs* _group_tabs;
void fit_route_group (ARDOUR::RouteGroup *);