Logo Search packages:      
Sourcecode: ardour version File versions  Download package

ImageFrameView * ImageFrameTimeAxisGroup::add_imageframe_item ( const string &  frame_id,
nframes_t  start,
nframes_t  duration,
unsigned char *  rgb_data,
uint32_t  width,
uint32_t  height,
uint32_t  num_channels,
void *  src 
)

Adds an ImageFrameView to the list of items upon this time axis view helper the new ImageFrameView is returned

Parameters:
item_id the unique id of the new item
image_id the id/name of the image data we are usin
start the position the new item should be placed upon the time line
duration the duration the new item should be placed upon the timeline
rgb_data the rgb data of the image
width the original image width of the rgb_data (not the size to display)
height the irigianl height of the rgb_data
num_channels the number of channles within the rgb_data
src the identity of the object that initiated the change

Definition at line 197 of file imageframe_time_axis_group.cc.

References _view_helper, sigc::bind(), ImageFrameTimeAxisView::canvas_item(), sigc::signal7< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator >::connect(), TimeAxisView::editor, get_named_imageframe_item(), ImageFrameView::GoingAway, ImageFrameAdded, sigc::mem_fun(), remove_imageframe_item(), and ImageFrameTimeAxisView::trackview().

Referenced by ImageFrameSocketHandler::handle_insert_imageframe_view().

{
      ImageFrameView* ifv = 0 ;
      
      //check that there is not already an imageframe with that id
      if(get_named_imageframe_item(frame_id) == 0)
      {
            ifv = new ImageFrameView(frame_id,
                  _view_helper.canvas_item()->property_parent(),
                  &(_view_helper.trackview()),
                  this,
                  _view_helper.trackview().editor.get_current_zoom(),
                  region_color,
                  start,
                  duration,
                  rgb_data,
                  width,
                  height,
                  num_channels) ;

            imageframe_views.push_front(ifv) ;
      
            ifv->GoingAway.connect(bind(mem_fun(*this,&ImageFrameTimeAxisGroup::remove_imageframe_item), (void*)this)) ;
      
             ImageFrameAdded(ifv, src) ; /* EMIT_SIGNAL */
      }

      return(ifv) ;
}


Generated by  Doxygen 1.6.0   Back to index