summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/editor.h')
-rw-r--r--gtk2_ardour/editor.h134
1 files changed, 64 insertions, 70 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index e521c51a2d..4b4f0fbda6 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -133,9 +133,9 @@ class Editor : public PublicEditor
void first_idle ();
virtual bool have_idled() const { return _have_idled; }
- nframes_t leftmost_position() const { return leftmost_frame; }
- nframes_t current_page_frames() const {
- return (nframes_t) floor (canvas_width * frames_per_unit);
+ nframes64_t leftmost_position() const { return leftmost_frame; }
+ nframes64_t current_page_frames() const {
+ return (nframes64_t) floor (canvas_width * frames_per_unit);
}
void cycle_snap_mode ();
@@ -192,11 +192,11 @@ class Editor : public PublicEditor
/* undo related */
- nframes_t unit_to_frame (double unit) const {
- return (nframes_t) rint (unit * frames_per_unit);
+ nframes64_t unit_to_frame (double unit) const {
+ return (nframes64_t) rint (unit * frames_per_unit);
}
- double frame_to_unit (nframes_t frame) const {
+ double frame_to_unit (nframes64_t frame) const {
return rint ((double) frame / (double) frames_per_unit);
}
@@ -220,7 +220,7 @@ class Editor : public PublicEditor
*/
if (pixel >= 0) {
- return (nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
+ return (nframes64_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
} else {
return 0;
}
@@ -359,9 +359,9 @@ class Editor : public PublicEditor
void maximise_editing_space();
void restore_editing_space();
- void reset_x_origin (nframes_t);
+ void reset_x_origin (nframes64_t);
void reset_zoom (double);
- void reposition_and_zoom (nframes_t, double);
+ void reposition_and_zoom (nframes64_t, double);
nframes64_t get_preferred_edit_position (bool ignore_playhead = false);
@@ -377,7 +377,7 @@ class Editor : public PublicEditor
protected:
void map_transport_state ();
- void map_position_change (nframes_t);
+ void map_position_change (nframes64_t);
void on_realize();
@@ -387,7 +387,7 @@ class Editor : public PublicEditor
bool constructed;
// to keep track of the playhead position for control_scroll
- boost::optional<nframes_t> _control_scroll_target;
+ boost::optional<nframes64_t> _control_scroll_target;
PlaylistSelector* _playlist_selector;
@@ -396,7 +396,7 @@ class Editor : public PublicEditor
struct VisualState {
double y_position;
double frames_per_unit;
- nframes_t leftmost_frame;
+ nframes64_t leftmost_frame;
Editing::ZoomFocus zoom_focus;
bool zoomed_to_region;
std::list<TAVState> track_states;
@@ -417,7 +417,7 @@ class Editor : public PublicEditor
void cancel_visual_state_op (uint32_t n);
bool end_visual_state_op (uint32_t n);
- nframes_t leftmost_frame;
+ nframes64_t leftmost_frame;
double frames_per_unit;
Editing::ZoomFocus zoom_focus;
@@ -470,7 +470,7 @@ class Editor : public PublicEditor
void hide();
void show ();
void set_name (const string&);
- void set_position (nframes_t start, nframes_t end = 0);
+ void set_position (nframes64_t start, nframes64_t end = 0);
void set_color_rgba (uint32_t);
};
@@ -483,7 +483,7 @@ class Editor : public PublicEditor
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
void clear_marker_display ();
- void mouse_add_new_marker (nframes_t where, bool is_cd=false, bool is_xrun=false);
+ void mouse_add_new_marker (nframes64_t where, bool is_cd=false, bool is_xrun=false);
bool choose_new_marker_name(string &name);
void update_cd_marker_display ();
void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
@@ -539,12 +539,12 @@ class Editor : public PublicEditor
Gtk::Menu * track_edit_playlist_submenu;
Gtk::Menu * track_selection_edit_playlist_submenu;
- void popup_track_context_menu (int, int, ItemType, bool, nframes_t);
- Gtk::Menu* build_track_context_menu (nframes_t);
- Gtk::Menu* build_track_bus_context_menu (nframes_t);
- Gtk::Menu* build_track_region_context_menu (nframes_t frame);
- Gtk::Menu* build_track_crossfade_context_menu (nframes_t);
- Gtk::Menu* build_track_selection_context_menu (nframes_t);
+ void popup_track_context_menu (int, int, ItemType, bool, nframes64_t);
+ Gtk::Menu* build_track_context_menu (nframes64_t);
+ Gtk::Menu* build_track_bus_context_menu (nframes64_t);
+ Gtk::Menu* build_track_region_context_menu (nframes64_t frame);
+ Gtk::Menu* build_track_crossfade_context_menu (nframes64_t);
+ Gtk::Menu* build_track_selection_context_menu (nframes64_t);
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
void add_region_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Region>, Gtk::Menu_Helpers::MenuList&);
@@ -637,7 +637,7 @@ class Editor : public PublicEditor
void update_just_smpte ();
void update_fixed_rulers ();
void update_tempo_based_rulers ();
- void popup_ruler_menu (nframes_t where = 0, ItemType type = RegionItem);
+ void popup_ruler_menu (nframes64_t where = 0, ItemType type = RegionItem);
void update_ruler_visibility ();
void set_ruler_visible (RulerType, bool);
void toggle_ruler_visibility (RulerType rt);
@@ -705,13 +705,13 @@ class Editor : public PublicEditor
Editor& editor;
ArdourCanvas::Points points;
ArdourCanvas::Line canvas_item;
- nframes_t current_frame;
+ nframes64_t current_frame;
double length;
Cursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
~Cursor ();
- void set_position (nframes_t);
+ void set_position (nframes64_t);
void set_length (double units);
void set_y_axis (double position);
};
@@ -746,10 +746,10 @@ class Editor : public PublicEditor
void select_all_selectables_between (bool within);
void select_range_between ();
- boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
+ boost::shared_ptr<ARDOUR::Region> find_next_region (nframes64_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
nframes64_t find_next_region_boundary (nframes64_t, int32_t dir, const TrackViewList&);
- vector<nframes_t> region_boundary_cache;
+ vector<nframes64_t> region_boundary_cache;
void build_region_boundary_cache ();
Gtk::HBox top_hbox;
@@ -777,7 +777,7 @@ class Editor : public PublicEditor
double canvas_width;
double canvas_height;
double full_canvas_height;
- nframes_t last_canvas_frame;
+ nframes64_t last_canvas_frame;
bool track_canvas_map_handler (GdkEventAny*);
bool time_canvas_map_handler (GdkEventAny*);
@@ -793,7 +793,7 @@ class Editor : public PublicEditor
void control_scroll (float);
void access_action (std::string,std::string);
- bool deferred_control_scroll (nframes_t);
+ bool deferred_control_scroll (nframes64_t);
sigc::connection control_scroll_connection;
void tie_vertical_scrolling ();
@@ -807,7 +807,7 @@ class Editor : public PublicEditor
};
Type pending;
- nframes_t time_origin;
+ nframes64_t time_origin;
double frames_per_unit;
int idle_handler_id;
@@ -821,7 +821,7 @@ class Editor : public PublicEditor
static int _idle_visual_changer (void *arg);
int idle_visual_changer ();
- void queue_visual_change (nframes_t);
+ void queue_visual_change (nframes64_t);
void queue_visual_change (double);
void end_location_changed (ARDOUR::Location*);
@@ -946,16 +946,16 @@ class Editor : public PublicEditor
static void build_cursors ();
sigc::connection scroll_connection;
- nframes_t last_update_frame;
- void center_screen (nframes_t);
- void center_screen_internal (nframes_t, float);
+ nframes64_t last_update_frame;
+ void center_screen (nframes64_t);
+ void center_screen_internal (nframes64_t, float);
void update_current_screen ();
void session_going_away ();
- nframes_t cut_buffer_start;
- nframes_t cut_buffer_length;
+ nframes64_t cut_buffer_start;
+ nframes64_t cut_buffer_length;
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
@@ -968,7 +968,7 @@ class Editor : public PublicEditor
void register_actions ();
- int ensure_cursor (nframes_t* pos);
+ int ensure_cursor (nframes64_t* pos);
void handle_new_audio_region (boost::weak_ptr<ARDOUR::AudioRegion>);
void handle_new_audio_regions (vector<boost::weak_ptr<ARDOUR::AudioRegion> >& );
@@ -987,7 +987,7 @@ class Editor : public PublicEditor
void cut_copy_ranges (Editing::CutCopyOp);
void mouse_paste ();
- void paste_internal (nframes_t position, float times);
+ void paste_internal (nframes64_t position, float times);
/* EDITING OPERATIONS */
@@ -1001,19 +1001,19 @@ class Editor : public PublicEditor
void lower_region ();
void lower_region_to_bottom ();
void split_region ();
- void split_region_at (nframes_t);
- void split_regions_at (nframes_t, RegionSelection&);
+ void split_region_at (nframes64_t);
+ void split_regions_at (nframes64_t, RegionSelection&);
void split_region_at_transients ();
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret);
void crop_region_to_selection ();
- void crop_region_to (nframes_t start, nframes_t end);
+ void crop_region_to (nframes64_t start, nframes64_t end);
void set_sync_point (nframes64_t, const RegionSelection&);
void set_region_sync_from_edit_point ();
void remove_region_sync();
- void align_selection (ARDOUR::RegionPoint, nframes_t position, const RegionSelection&);
- void align_selection_relative (ARDOUR::RegionPoint point, nframes_t position, const RegionSelection&);
- void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
- void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
+ void align_selection (ARDOUR::RegionPoint, nframes64_t position, const RegionSelection&);
+ void align_selection_relative (ARDOUR::RegionPoint point, nframes64_t position, const RegionSelection&);
+ void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
+ void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
void remove_clicked_region ();
void destroy_clicked_region ();
void edit_region ();
@@ -1080,8 +1080,8 @@ class Editor : public PublicEditor
bool zoomed_to_region;
void temporal_zoom_session ();
void temporal_zoom (gdouble scale);
- void temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op);
- void temporal_zoom_to_frame (bool coarser, nframes_t frame);
+ void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string & op);
+ void temporal_zoom_to_frame (bool coarser, nframes64_t frame);
void amplitude_zoom (gdouble scale);
void amplitude_zoom_step (bool in);
@@ -1199,8 +1199,8 @@ class Editor : public PublicEditor
void set_loop_from_region (bool play);
void set_punch_from_edit_range ();
- void set_loop_range (nframes_t start, nframes_t end, std::string cmd);
- void set_punch_range (nframes_t start, nframes_t end, std::string cmd);
+ void set_loop_range (nframes64_t start, nframes64_t end, std::string cmd);
+ void set_punch_range (nframes64_t start, nframes64_t end, std::string cmd);
void add_location_from_playhead_cursor ();
bool select_new_marker;
@@ -1221,7 +1221,7 @@ class Editor : public PublicEditor
void keyboard_selection_begin ();
void keyboard_selection_finish (bool add);
bool have_pending_keyboard_selection;
- nframes_t pending_keyboard_selection_start;
+ nframes64_t pending_keyboard_selection_start;
boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
void extend_selection_to_end_of_region (bool next);
@@ -1310,11 +1310,11 @@ class Editor : public PublicEditor
void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
- void mouse_brush_insert_region (RegionView*, nframes_t pos);
- void brush (nframes_t);
+ void mouse_brush_insert_region (RegionView*, nframes64_t pos);
+ void brush (nframes64_t);
- void show_verbose_time_cursor (nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
- void show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
+ void show_verbose_time_cursor (nframes64_t frame, double offset = 0, double xpos=-1, double ypos=-1);
+ void show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset = 0, double xpos=-1, double ypos=-1);
double clamp_verbose_cursor_x (double);
double clamp_verbose_cursor_y (double);
@@ -1416,8 +1416,8 @@ public:
void new_tempo_section ();
- void mouse_add_new_tempo_event (nframes_t where);
- void mouse_add_new_meter_event (nframes_t where);
+ void mouse_add_new_tempo_event (nframes64_t where);
+ void mouse_add_new_meter_event (nframes64_t where);
void remove_tempo_marker (ArdourCanvas::Item*);
void remove_meter_marker (ArdourCanvas::Item*);
@@ -1476,12 +1476,6 @@ public:
void redisplay_tempo (bool immediate_redraw);
void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
- void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false) {
- /* XXX remove this function when everything moves to 64 bit frame counts */
- nframes64_t first64 = first;
- snap_to (first64, direction, for_mark);
- first = (nframes_t) first64;
- }
uint32_t bbt_beat_subdivision;
@@ -1594,7 +1588,7 @@ public:
void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
- bool audio_region_selection_covers (nframes_t where);
+ bool audio_region_selection_covers (nframes64_t where);
/* transport range select process */
enum RangeMarkerOp {
@@ -1637,7 +1631,7 @@ public:
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
- bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
+ bool select_all_within (nframes64_t start, nframes64_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
ArdourCanvas::SimpleRect *rubberband_rect;
@@ -1648,7 +1642,7 @@ public:
void end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
ArdourCanvas::SimpleRect *zoom_rect;
- void reposition_zoom_rect (nframes_t start, nframes_t end);
+ void reposition_zoom_rect (nframes64_t start, nframes64_t end);
/* diskstream/route display management */
@@ -1761,7 +1755,7 @@ public:
int last_autoscroll_x;
int last_autoscroll_y;
uint32_t autoscroll_cnt;
- nframes_t autoscroll_x_distance;
+ nframes64_t autoscroll_x_distance;
double autoscroll_y_distance;
static gint _autoscroll_canvas (void *);
@@ -1781,9 +1775,9 @@ public:
void start_trim (ArdourCanvas::Item*, GdkEvent*);
void point_trim (GdkEvent*);
void trim_motion_callback (ArdourCanvas::Item*, GdkEvent*);
- void single_contents_trim (RegionView&, nframes_t, bool, bool, bool);
- void single_start_trim (RegionView&, nframes_t, bool, bool);
- void single_end_trim (RegionView&, nframes_t, bool, bool);
+ void single_contents_trim (RegionView&, nframes64_t, bool, bool, bool);
+ void single_start_trim (RegionView&, nframes64_t, bool, bool);
+ void single_end_trim (RegionView&, nframes64_t, bool, bool);
void trim_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void thaw_region_after_trim (RegionView& rv);
@@ -1844,7 +1838,7 @@ public:
ExportDialog *export_dialog;
ExportDialog *export_range_markers_dialog;
- void export_range (nframes_t start, nframes_t end);
+ void export_range (nframes64_t start, nframes64_t end);
void export_range_markers ();
int write_region_selection(RegionSelection&);
@@ -2044,7 +2038,7 @@ public:
Gtk::VBox nudge_vbox;
AudioClock nudge_clock;
- nframes_t get_nudge_distance (nframes_t pos, nframes_t& next);
+ nframes64_t get_nudge_distance (nframes64_t pos, nframes64_t& next);
bool nudge_forward_release (GdkEventButton*);
bool nudge_backward_release (GdkEventButton*);