/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
first_action_message->hide();
}
- flush_track_canvas();
-
update_title ();
session->going_away.connect (mem_fun(*this, &Editor::session_going_away));
}
}
-void
-Editor::flush_track_canvas ()
-{
- /* I don't think this is necessary, and only causes more problems.
- I'm commenting it out
- and if the imageframe folks don't have any issues, we can take
- out this method entirely
- */
-
- //gnome_canvas_update_now (GNOME_CANVAS(track_canvas));
- //gtk_main_iteration ();
-}
-
void
Editor::set_selected_track_from_click (bool add, bool with_undo, bool no_remove)
{
drag_info.motion_callback = &Editor::imageframe_start_handle_trim_motion ;
drag_info.finished_callback = &Editor::imageframe_start_handle_end_trim ;
- flush_track_canvas() ;
-
start_grab(event) ;
show_verbose_time_cursor(ifv->get_position(), 10) ;
drag_info.motion_callback = &Editor::imageframe_end_handle_trim_motion ;
drag_info.finished_callback = &Editor::imageframe_end_handle_end_trim ;
- flush_track_canvas() ;
-
start_grab(event, trimmer_cursor) ;
show_verbose_time_cursor(ifv->get_position() + ifv->get_duration(), 10) ;
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) ;
}
-
- flush_track_canvas() ;
}
void
ifv->set_duration(new_duration, this) ;
}
}
-
- flush_track_canvas ();
}
drag_info.motion_callback = &Editor::markerview_start_handle_trim_motion ;
drag_info.finished_callback = &Editor::markerview_start_handle_end_trim ;
- flush_track_canvas() ;
-
start_grab(event, trimmer_cursor) ;
}
drag_info.motion_callback = &Editor::markerview_end_handle_trim_motion ;
drag_info.finished_callback = &Editor::markerview_end_handle_end_trim ;
- flush_track_canvas () ;
-
start_grab(event, trimmer_cursor) ;
}
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) ;
}
-
- flush_track_canvas() ;
}
void
jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
mv->set_duration(new_duration, this) ;
}
-
- flush_track_canvas() ;
}
uint32_t nchans = atv.get_diskstream()->n_channels();
uint32_t n;
uint32_t nwaves = std::min (nchans, region.n_channels());
-
gdouble ht;
+
if (trackview.height < NAME_HIGHLIGHT_SIZE) {
ht = ((trackview.height) / (double) nchans);
} else {
ht = ((trackview.height - NAME_HIGHLIGHT_SIZE) / (double) nchans);
}
+
gdouble yoff = which * ht;
WaveView *wave = new WaveView(*group);
wave->property_amplitude_above_axis() = _amplitude_above_axis;
wave->property_wave_color() = region.muted() ? color_map[cMutedWaveForm] : color_map[cWaveForm];
wave->property_region_start() = region.start();
-// WaveView *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
-// gnome_canvas_waveview_get_type (),
-// "data_src", (gpointer) ®ion,
-// "cache", wave_caches[which],
-// "cache_updater", (gboolean) true,
-// "channel", (guint32) which,
-// "length_function", (gpointer) region_length_from_c,
-// "sourcefile_length_function",(gpointer) sourcefile_length_from_c,
-// "peak_function", (gpointer) region_read_peaks_from_c,
-// "x", 0.0,
-// "y", yoff,
-// "height", (double) ht,
-// "samples_per_unit", samples_per_unit,
-// "amplitude_above_axis", _amplitude_above_axis,
-// "wave_color", (guint32) (region.muted() ? color_map[cMutedWaveForm] : color_map[cWaveForm]),
-// "region_start",(guint32) region.start(),
-// NULL);
-
+
if (!(_flags & WaveformVisible)) {
wave->hide();
}
wave->property_amplitude_above_axis() = _amplitude_above_axis;
wave->property_wave_color() = color_map[cGhostTrackWave];
wave->property_region_start() = region.start();
- // WaveView *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(ghost->group),
- // gnome_canvas_waveview_get_type (),
- // "data_src", (gpointer) ®ion,
- // "cache", wave_caches[n],
- // "cache_updater", (gboolean) false,
- // "channel", (guint32) n,
- // "length_function", (gpointer) region_length_from_c,
- // "sourcefile_length_function",(gpointer) sourcefile_length_from_c,
- // "peak_function", (gpointer) region_read_peaks_from_c,
- // "x", 0.0,
- // "samples_per_unit", samples_per_unit,
- // "amplitude_above_axis", _amplitude_above_axis,
- // "wave_color", color_map[cGhostTrackWave],
- // "region_start", (guint32) region.start(),
- // NULL);
-
ghost->waves.push_back(wave);
}