projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more panner tweaking
[ardour.git]
/
gtk2_ardour
/
editor_imageframe.cc
diff --git
a/gtk2_ardour/editor_imageframe.cc
b/gtk2_ardour/editor_imageframe.cc
index a8dce7d64bbabfae4f6c45b4b6036de4828ecf75..0e5131bb97d18be7d4cbcab496107e0bafec54a5 100644
(file)
--- a/
gtk2_ardour/editor_imageframe.cc
+++ b/
gtk2_ardour/editor_imageframe.cc
@@
-44,6
+44,7
@@
#include "public_editor.h"
using namespace Gtk;
#include "public_editor.h"
using namespace Gtk;
+using namespace PBD;
/* <CMT Additions file="editor.cc"> */
/* <CMT Additions file="editor.cc"> */
@@
-95,20
+96,18
@@
void
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
{
// GTK2FIX
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
{
// GTK2FIX
- //
jack_nframes_t offset = static_cast<jack_
nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
-
jack_
nframes_t offset = 0;
+ //
nframes_t offset = static_cast<
nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
+ nframes_t offset = 0;
-
jack_
nframes_t x_pos = 0 ;
- if(item->get_position() < offset)
- {
+ nframes_t x_pos = 0 ;
+
+
if (item->get_position() < offset)
{
x_pos = 0 ;
x_pos = 0 ;
- }
- else
- {
- x_pos = item->get_position() - offset + (item->get_duration() / 2) ;
+ } else {
+ x_pos = item->get_position() - offset + (item->get_duration() / 2);
}
}
- reposition_x_origin
(x_pos)
;
+ reposition_x_origin
(x_pos)
;
}
void
}
void
@@
-493,14
+492,14
@@
Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
double cx, cy ;
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
double cx, cy ;
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
-
jack_
nframes_t pending_region_position ;
-
jack_
nframes_t pointer_frame ;
+ nframes_t pending_region_position ;
+ nframes_t pointer_frame ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (
jack_
nframes_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
@@
-541,14
+540,14
@@
Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
-
jack_
nframes_t pending_region_position;
-
jack_
nframes_t pointer_frame;
+ nframes_t pending_region_position;
+ nframes_t pointer_frame;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (
jack_
nframes_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
@@
-576,7
+575,7
@@
Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
void
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
{
void
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
{
-
jack_
nframes_t where ;
+ nframes_t where ;
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
@@
-674,9
+673,9
@@
Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
-
jack_
nframes_t start = 0 ;
-
jack_
nframes_t end = 0 ;
-
jack_
nframes_t pointer_frame = event_frame(event) ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!ifv->get_position_locked()) {
// chekc th eposition of the item is not locked
if(!ifv->get_position_locked()) {
@@
-693,7
+692,7
@@
Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
}
// are we getting bigger or smaller?
}
// are we getting bigger or smaller?
-
jack_
nframes_t new_dur_val = end - start ;
+ nframes_t new_dur_val = end - start ;
// start handle, so a smaller pointer frame increases our component size
if(pointer_frame <= drag_info.grab_frame)
// start handle, so a smaller pointer frame increases our component size
if(pointer_frame <= drag_info.grab_frame)
@@
-751,10
+750,10
@@
Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
}
else
{
}
else
{
-
jack_
nframes_t temp = ifv->get_position() + ifv->get_duration() ;
+ nframes_t temp = ifv->get_position() + ifv->get_duration() ;
- ifv->set_position((
jack_
nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
- ifv->set_duration((
jack_
nframes_t) drag_info.cumulative_x_drag, this) ;
+ ifv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
+ ifv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
}
}
}
}
@@
-763,10
+762,10
@@
Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
-
jack_
nframes_t start = 0 ;
-
jack_
nframes_t end = 0 ;
-
jack_
nframes_t pointer_frame = event_frame(event) ;
-
jack_
nframes_t new_dur_val = 0 ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
+ nframes_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
snap_to(pointer_frame) ;
@@
-828,7
+827,7
@@
Editor::imageframe_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
}
else
{
}
else
{
-
jack_nframes_t new_duration = (jack_
nframes_t)drag_info.cumulative_x_drag ;
+
nframes_t new_duration = (
nframes_t)drag_info.cumulative_x_drag ;
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
{
ifv->set_duration(new_duration, this) ;
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
{
ifv->set_duration(new_duration, this) ;
@@
-888,9
+887,9
@@
Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
-
jack_
nframes_t start = 0 ;
-
jack_
nframes_t end = 0 ;
-
jack_
nframes_t pointer_frame = event_frame(event) ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!mv->get_position_locked())
// chekc th eposition of the item is not locked
if(!mv->get_position_locked())
@@
-911,7
+910,7
@@
Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
}
// are we getting bigger or smaller?
}
// are we getting bigger or smaller?
-
jack_
nframes_t new_dur_val = end - start ;
+ nframes_t new_dur_val = end - start ;
if(pointer_frame <= drag_info.grab_frame)
{
if(pointer_frame <= drag_info.grab_frame)
{
@@
-968,10
+967,10
@@
Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
}
else
{
}
else
{
-
jack_
nframes_t temp = mv->get_position() + mv->get_duration() ;
+ nframes_t temp = mv->get_position() + mv->get_duration() ;
- mv->set_position((
jack_
nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
- mv->set_duration((
jack_
nframes_t) drag_info.cumulative_x_drag, this) ;
+ mv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
+ mv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
}
}
}
}
@@
-980,10
+979,10
@@
Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
-
jack_
nframes_t start = 0 ;
-
jack_
nframes_t end = 0 ;
-
jack_
nframes_t pointer_frame = event_frame(event) ;
-
jack_
nframes_t new_dur_val = 0 ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
+ nframes_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
snap_to(pointer_frame) ;
@@
-1008,7
+1007,7
@@
Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
// we cant extend beyond the item we are marking
ImageFrameView* marked_item = mv->get_marked_item() ;
{
// we cant extend beyond the item we are marking
ImageFrameView* marked_item = mv->get_marked_item() ;
-
jack_
nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
+ nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
{
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
{
@@
-1062,7
+1061,7
@@
Editor::markerview_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
}
else
{
}
else
{
-
jack_nframes_t new_duration = (jack_
nframes_t)drag_info.cumulative_x_drag ;
+
nframes_t new_duration = (
nframes_t)drag_info.cumulative_x_drag ;
mv->set_duration(new_duration, this) ;
}
}
mv->set_duration(new_duration, this) ;
}
}