* @param start the start point of this item
* @param duration the duration of this item
*/
-TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisViewPtr tv, double spu, Gdk::Color const & base_color,
+TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
nframes_t start, nframes_t duration, bool recording,
Visibility vis)
: trackview (tv), _recregion(recording)
warning << "Time Axis Item Duration == 0" << endl ;
}
- vestigial_frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, 2.0, trackview->current_height());
+ vestigial_frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, 2.0, trackview.current_height());
vestigial_frame->hide ();
vestigial_frame->property_outline_what() = 0xF;
vestigial_frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_VestigialFrame.get();
vestigial_frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_VestigialFrame.get();
if (visibility & ShowFrame) {
- frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, trackview->editor().frame_to_pixel(duration), trackview->current_height());
+ frame = new ArdourCanvas::SimpleRect (*group, 0.0, 1.0, trackview.editor().frame_to_pixel(duration), trackview.current_height());
frame->property_outline_pixels() = 1;
frame->property_outline_what() = 0xF;
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
if (visibility & ShowNameHighlight) {
if (visibility & FullWidthNameHighlight) {
- name_highlight = new ArdourCanvas::SimpleRect (*group, 0.0, trackview->editor().frame_to_pixel(item_duration), trackview->current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview->current_height() - 1);
+ name_highlight = new ArdourCanvas::SimpleRect (*group, 0.0, trackview.editor().frame_to_pixel(item_duration), trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height() - 1);
} else {
- name_highlight = new ArdourCanvas::SimpleRect (*group, 1.0, trackview->editor().frame_to_pixel(item_duration) - 1, trackview->current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview->current_height() - 1);
+ name_highlight = new ArdourCanvas::SimpleRect (*group, 1.0, trackview.editor().frame_to_pixel(item_duration) - 1, trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height() - 1);
}
name_highlight->set_data ("timeaxisviewitem", this);
if (visibility & ShowNameText) {
name_pixbuf = new ArdourCanvas::Pixbuf(*group);
name_pixbuf->property_x() = NAME_X_OFFSET;
- name_pixbuf->property_y() = trackview->current_height() - 1.0 - NAME_Y_OFFSET;
+ name_pixbuf->property_y() = trackview.current_height() - 1.0 - NAME_Y_OFFSET;
} else {
name_pixbuf = 0;
frame_handle_start = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 1.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH+1);
frame_handle_start->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameHandle.get();
- frame_handle_end = new ArdourCanvas::SimpleRect (*group, trackview->editor().frame_to_pixel(get_duration()) - TimeAxisViewItem::GRAB_HANDLE_LENGTH, trackview->editor().frame_to_pixel(get_duration()), 1.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH + 1);
+ frame_handle_end = new ArdourCanvas::SimpleRect (*group, trackview.editor().frame_to_pixel(get_duration()) - TimeAxisViewItem::GRAB_HANDLE_LENGTH, trackview.editor().frame_to_pixel(get_duration()), 1.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH + 1);
frame_handle_end->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_FrameHandle.get();
} else {
item_duration = dur;
- reset_width_dependent_items (trackview->editor().frame_to_pixel (dur));
+ reset_width_dependent_items (trackview.editor().frame_to_pixel (dur));
DurationChanged (dur, src) ; /* EMIT_SIGNAL */
return true;
* @param src the identity of the object that initiated the change
*/
void
-TimeAxisViewItem::set_max_duration_active(bool active, void* src)
+TimeAxisViewItem::set_max_duration_active (bool active, void* /*src*/)
{
- max_duration_active = active ;
+ max_duration_active = active;
}
/**
* @param src the identity of the object that initiated the change
*/
void
-TimeAxisViewItem::set_min_duration_active(bool active, void* src)
+TimeAxisViewItem::set_min_duration_active (bool active, void* /*src*/)
{
min_duration_active = active ;
}
*
* @return the timeAxisView that this item is placed upon
*/
-TimeAxisViewPtr
-TimeAxisViewItem::get_time_axis_view ()
+TimeAxisView&
+TimeAxisViewItem::get_time_axis_view()
{
return trackview;
}
double font_size;
font_size = NAME_FONT->get_size() / Pango::SCALE;
- it_width = trackview->editor().frame_to_pixel(item_duration);
+ it_width = trackview.editor().frame_to_pixel(item_duration);
pb_width = new_name.length() * font_size;
if (pb_width > it_width - NAME_X_OFFSET) {
}
void
-TimeAxisViewItem::reset_name_width (double pixel_width)
+TimeAxisViewItem::reset_name_width (double /*pixel_width*/)
{
set_name_text (item_name);
}