Remove duplicate menubarstyle property.
[ardour.git] / gtk2_ardour / imageframe_view.cc
index 8ebdeec5355e628931f74920880aef56f977ab78..f35381301e238d4bf43228ff5fd935581b285fcd 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <algorithm>
@@ -56,14 +55,14 @@ sigc::signal<void,ImageFrameView*> ImageFrameView::GoingAway;
  * @param height the width of the origianl rgb_data image data
  * @param num_channels the number of color channels within rgb_data
  */
-ImageFrameView::ImageFrameView(std::string item_id,
+ImageFrameView::ImageFrameView(const string & item_id,
        ArdourCanvas::Group *parent,
        ImageFrameTimeAxis* tv,
        ImageFrameTimeAxisGroup* item_group,
        double spu,
        Gdk::Color& basic_color,
-       jack_nframes_t start,
-       jack_nframes_t duration,
+       nframes_t start,
+       nframes_t duration,
        unsigned char* rgb_data,
        uint32_t width,
        uint32_t height,
@@ -92,9 +91,9 @@ ImageFrameView::ImageFrameView(std::string item_id,
        
        //calculate our image width based on the track height
        double im_ratio = (double)width/(double)height ;
-       double im_width = ((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
+       double im_width = ((double)(trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
        
-       imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
+       imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
 
        frame_handle_start->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_start_handle_event), frame_handle_start, this));
        frame_handle_end->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_end_handle_event), frame_handle_end, this));
@@ -172,22 +171,21 @@ delete imageframe;
  * @return true if the position change was a success, false otherwise
  */
 bool
-ImageFrameView::set_position(jack_nframes_t pos, void* src)
+ImageFrameView::set_position(nframes_t pos, void* src, double* delta)
 {
-       jack_nframes_t old_pos = frame_position ;
+       nframes_t old_pos = frame_position ;
        
        // do the standard stuff
-       bool ret = TimeAxisViewItem::set_position(pos, src) ;
+       bool ret = TimeAxisViewItem::set_position(pos, src, delta) ;
 
        // everything went ok with the standard stuff?
-       if(ret)
-       {
+       if (ret) {
                /* move each of our associated markers with this ImageFrameView */
                for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
                {
                        // calculate the offset of the marker
                        MarkerView* mv = (MarkerView*)*i ;
-                       jack_nframes_t marker_old_pos = mv->get_position() ;
+                       nframes_t marker_old_pos = mv->get_position() ;
                        
                        mv->set_position(pos + (marker_old_pos - old_pos), src) ;
                }
@@ -204,7 +202,7 @@ ImageFrameView::set_position(jack_nframes_t pos, void* src)
  * @return true if the duration change was succesful, false otherwise
  */
 bool
-ImageFrameView::set_duration(jack_nframes_t dur, void* src)
+ImageFrameView::set_duration(nframes_t dur, void* src)
 {
        /* do the standard stuff */
        bool ret = TimeAxisViewItem::set_duration(dur, src) ;
@@ -307,7 +305,7 @@ ImageFrameView::add_marker_view_item(MarkerView* item, void* src)
  * @return the removed marker item
  */
 MarkerView*
-ImageFrameView::remove_named_marker_view_item(std::string markerId, void* src)
+ImageFrameView::remove_named_marker_view_item(const string & markerId, void* src)
 {
        MarkerView* mv = 0 ;
        MarkerViewList::iterator i = marker_view_list.begin() ;
@@ -359,11 +357,11 @@ ImageFrameView::remove_marker_view_item(MarkerView* mv, void* src)
  * @param markId the id/name of the item to search for
  */
 bool
-ImageFrameView::has_marker_view_item(std::string mname)
+ImageFrameView::has_marker_view_item(const string & mname)
 {
        bool result = false ;
        
-       for (MarkerViewList::iterator ci = marker_view_list.begin(); ci != marker_view_list.end(); ++ci)
+       for (MarkerViewList::const_iterator ci = marker_view_list.begin(); ci != marker_view_list.end(); ++ci)
        {
                if (((MarkerView*)*ci)->get_item_name() == mname)
                {