fade_out_shape->property_fill_color_rgba() = fade_color;
fade_out_shape->set_data ("regionview", this);
- {
+ if (!_recregion) {
uint32_t r,g,b,a;
UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
reset_width_dependent_items (_pixel_width);
fade_in_shape->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_fade_in_event), fade_in_shape, this));
- fade_in_handle->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_fade_in_handle_event), fade_in_handle, this));
+ if (fade_in_handle) {
+ fade_in_handle->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_fade_in_handle_event), fade_in_handle, this));
+ }
+
fade_out_shape->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_fade_out_event), fade_out_shape, this));
- fade_out_handle->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_fade_out_handle_event), fade_out_handle, this));
+
+ if (fade_out_handle) {
+ fade_out_handle->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_fade_out_handle_event), fade_out_handle, this));
+ }
set_colors ();
delete points;
/* ensure trim handle stays on top */
- frame_handle_start->raise_to_top();
+ if (frame_handle_start) {
+ frame_handle_start->raise_to_top();
+ }
}
void
delete points;
/* ensure trim handle stays on top */
- frame_handle_end->raise_to_top();
+ if (frame_handle_end) {
+ frame_handle_end->raise_to_top();
+ }
}
void
{
RegionView::update_coverage_frames (d);
- fade_in_handle->raise_to_top ();
- fade_out_handle->raise_to_top ();
+ if (fade_in_handle) {
+ fade_in_handle->raise_to_top ();
+ fade_out_handle->raise_to_top ();
+ }
}
void
ArdourCanvas::SimpleLine* zero_line;
ArdourCanvas::Polygon* fade_in_shape;
ArdourCanvas::Polygon* fade_out_shape;
- ArdourCanvas::SimpleRect* fade_in_handle;
- ArdourCanvas::SimpleRect* fade_out_handle;
+ ArdourCanvas::SimpleRect* fade_in_handle; ///< fade in handle, or 0
+ ArdourCanvas::SimpleRect* fade_out_handle; ///< fade out handle, or 0
AudioRegionGainLine * gain_line;
// hook up our canvas events
- frame_handle_start->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_start_handle_event), frame_handle_start, this));
- frame_handle_end->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_end_handle_event), frame_handle_end, this));
+ if (frame_handle_start) {
+ frame_handle_start->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_start_handle_event), frame_handle_start, this));
+ frame_handle_end->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_end_handle_event), frame_handle_end, this));
+ }
group->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_markerview_item_view_event), group, this));
set_position(start, this) ;
name_highlight->set_data ("regionview", this);
name_highlight->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_name_highlight_event), name_highlight, this));
- frame_handle_start->set_data ("regionview", this);
- frame_handle_start->set_data ("isleft", (void*) 1);
- frame_handle_start->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_frame_handle_event), frame_handle_start, this));
-
- frame_handle_end->set_data ("regionview", this);
- frame_handle_end->set_data ("isleft", (void*) 0);
- frame_handle_end->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_frame_handle_event), frame_handle_end, this));
+ if (frame_handle_start) {
+ frame_handle_start->set_data ("regionview", this);
+ frame_handle_start->set_data ("isleft", (void*) 1);
+ frame_handle_start->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_frame_handle_event), frame_handle_start, this));
+ frame_handle_start->raise_to_top();
+ }
- frame_handle_start->raise_to_top();
- frame_handle_end->raise_to_top();
+ if (frame_handle_end) {
+ frame_handle_end->set_data ("regionview", this);
+ frame_handle_end->set_data ("isleft", (void*) 0);
+ frame_handle_end->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_frame_handle_event), frame_handle_end, this));
+ frame_handle_end->raise_to_top();
+ }
}
if (name_pixbuf) {
cr->property_x2() = trackview.editor().frame_to_pixel (end - position);
}
- frame_handle_start->raise_to_top ();
- frame_handle_end->raise_to_top ();
+ if (frame_handle_start) {
+ frame_handle_start->raise_to_top ();
+ frame_handle_end->raise_to_top ();
+ }
}
}
/* create our grab handles used for trimming/duration etc */
- frame_handle_start = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
- frame_handle_start->property_outline_what() = 0x0;
-
- frame_handle_end = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
- frame_handle_end->property_outline_what() = 0x0;
+ if (!_recregion) {
+ frame_handle_start = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
+ frame_handle_start->property_outline_what() = 0x0;
+ frame_handle_end = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
+ frame_handle_end->property_outline_what() = 0x0;
+ } else {
+ frame_handle_start = frame_handle_end = 0;
+ }
set_color (base_color);
if (frame) {
frame->property_y2() = height - 1;
- frame_handle_start->property_y2() = height - 1;
- frame_handle_end->property_y2() = height - 1;
+ if (frame_handle_start) {
+ frame_handle_start->property_y2() = height - 1;
+ frame_handle_end->property_y2() = height - 1;
+ }
}
vestigial_frame->property_y2() = height - 1;
ArdourCanvas::SimpleRect* frame;
ArdourCanvas::Pixbuf* name_pixbuf;
ArdourCanvas::SimpleRect* name_highlight;
- ArdourCanvas::SimpleRect* frame_handle_start;
- ArdourCanvas::SimpleRect* frame_handle_end;
+
+ /* with these two values, if frame_handle_start == 0 then frame_handle_end will also be 0 */
+ ArdourCanvas::SimpleRect* frame_handle_start; ///< `frame' (fade) handle for the start of the item, or 0
+ ArdourCanvas::SimpleRect* frame_handle_end; ///< `frame' (fade) handle for the end of the item, or 0
double _height;
Visibility visibility;