mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
big rework of scrolling, horizontal part considered almost 100% done.
Many more changes than I would typically like in a single commit, but this was all very intertwined. Vertical scrolling using track-stepping still to follow.
This commit is contained in:
parent
01c6266909
commit
9df3157dfc
8 changed files with 280 additions and 256 deletions
|
|
@ -207,7 +207,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
account any scrolling offsets.
|
||||
*/
|
||||
|
||||
framepos_t pixel_to_sample (double pixel) const {
|
||||
framepos_t pixel_to_sample_from_event (double pixel) const {
|
||||
|
||||
/* pixel can be less than zero when motion events
|
||||
are processed. since we've already run the world->canvas
|
||||
|
|
@ -222,6 +222,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
}
|
||||
}
|
||||
|
||||
framepos_t pixel_to_sample (double pixel) const {
|
||||
return pixel * samples_per_pixel;
|
||||
}
|
||||
|
||||
double sample_to_pixel (framepos_t sample) const {
|
||||
return sample / samples_per_pixel;
|
||||
}
|
||||
|
|
@ -408,7 +412,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
return _drags;
|
||||
}
|
||||
|
||||
void maybe_autoscroll (bool, bool, bool, bool);
|
||||
void maybe_autoscroll (bool, bool, bool);
|
||||
bool autoscroll_active() const;
|
||||
|
||||
Gdk::Cursor* get_canvas_cursor () const { return current_canvas_cursor; }
|
||||
void set_canvas_cursor (Gdk::Cursor*, bool save=false);
|
||||
|
|
@ -1022,6 +1027,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
static int _idle_visual_changer (void *arg);
|
||||
int idle_visual_changer ();
|
||||
void visual_changer (const VisualChange&);
|
||||
void ensure_visual_change_idle_handler ();
|
||||
|
||||
/* track views */
|
||||
|
|
@ -1072,8 +1078,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
Gtkmm2ext::ActionMap editor_action_map;
|
||||
Gtkmm2ext::Bindings key_bindings;
|
||||
|
||||
int ensure_cursor (framepos_t* pos);
|
||||
|
||||
void cut_copy (Editing::CutCopyOp);
|
||||
bool can_cut_copy () const;
|
||||
void cut_copy_points (Editing::CutCopyOp);
|
||||
|
|
@ -1722,22 +1726,15 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
/* autoscrolling */
|
||||
|
||||
bool autoscroll_active;
|
||||
int autoscroll_timeout_tag;
|
||||
int autoscroll_x;
|
||||
int autoscroll_y;
|
||||
int last_autoscroll_x;
|
||||
int last_autoscroll_y;
|
||||
uint32_t autoscroll_cnt;
|
||||
framecnt_t autoscroll_x_distance;
|
||||
double autoscroll_y_distance;
|
||||
sigc::connection autoscroll_connection;
|
||||
bool autoscroll_horizontal_allowed;
|
||||
bool autoscroll_vertical_allowed;
|
||||
uint32_t autoscroll_cnt;
|
||||
Gtk::Widget* autoscroll_widget;
|
||||
ArdourCanvas::Rect autoscroll_boundary;
|
||||
|
||||
bool _autoscroll_fudging;
|
||||
int autoscroll_fudge_threshold () const;
|
||||
|
||||
static gint _autoscroll_canvas (void *);
|
||||
bool autoscroll_canvas ();
|
||||
void start_canvas_autoscroll (int x, int y);
|
||||
void start_canvas_autoscroll (bool allow_horiz, bool allow_vert);
|
||||
void stop_canvas_autoscroll ();
|
||||
|
||||
/* trimming */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue