Logo Search packages:      
Sourcecode: ardour version File versions

void ImageFrameTimeAxis::create_imageframe_menu (  )  [private]

handles the building of the ImageFrameView sub menu

Definition at line 265 of file imageframe_time_axis.cc.

References sigc::bind(), Gtk::MenuShell::items(), sigc::mem_fun(), ImageFrameTimeAxisView::remove_selected_imageframe_item(), ImageFrameTimeAxisView::set_imageframe_duration_sec(), Gtk::Widget::set_name(), Gtk::Widget::show_all(), and VisualTimeAxis::start_time_axis_rename().

Referenced by ImageFrameTimeAxis(), and popup_imageframe_edit_menu().

{
      using namespace Menu_Helpers;
      using Gtk::Menu;

      imageframe_menu = manage(new Menu) ;
      imageframe_menu->set_name ("ArdourContextMenu");
      MenuList& items = imageframe_menu->items();
      
      imageframe_item_menu = manage(new Menu) ;
      imageframe_item_menu->set_name ("ArdourContextMenu");
      MenuList& imageframe_sub_items = imageframe_item_menu->items() ;

      /* duration menu */
      Menu* duration_menu = manage(new Menu) ;
      duration_menu->set_name ("ArdourContextMenu");
      MenuList& duration_items = duration_menu->items() ;

      if(view)
      {
            duration_items.push_back(MenuElem (_("0.5 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 0.5))) ;
            duration_items.push_back(MenuElem (_("1 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 1.0))) ;
            duration_items.push_back(MenuElem (_("1.5 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 1.5))) ;
            duration_items.push_back(MenuElem (_("2 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 2.0))) ;
            duration_items.push_back(MenuElem (_("2.5 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 2.5))) ;
            duration_items.push_back(MenuElem (_("3 seconds"), bind (mem_fun (view, &ImageFrameTimeAxisView::set_imageframe_duration_sec), 3.0))) ;
            //duration_items.push_back(SeparatorElem()) ;
            //duration_items.push_back(MenuElem (_("custom"), mem_fun(*this, &ImageFrameTimeAxis::set_imageframe_duration_custom))) ;
      }

      imageframe_sub_items.push_back(MenuElem(_("Duration (sec)"), *duration_menu)) ;

      imageframe_sub_items.push_back(SeparatorElem()) ;
      if(view)
      {
            imageframe_sub_items.push_back(MenuElem (_("Remove Frame"), bind(mem_fun (view, &ImageFrameTimeAxisView::remove_selected_imageframe_item), (void*)this))) ;
      }
      
      items.push_back(MenuElem(_("Image Frame"), *imageframe_item_menu)) ;
      items.push_back(MenuElem (_("Rename Track"), mem_fun(*this,&ImageFrameTimeAxis::start_time_axis_rename))) ;

      imageframe_menu->show_all() ;
}


Generated by  Doxygen 1.6.0   Back to index