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

void MarkerTimeAxis::build_marker_menu (  )  [private]

handles the building of the MarkerView sub menu

Definition at line 216 of file marker_time_axis.cc.

References sigc::bind(), Gtk::MenuShell::items(), marker_item_menu, marker_menu, sigc::mem_fun(), MarkerTimeAxisView::remove_selected_marker_view(), MarkerTimeAxisView::set_marker_duration_sec(), Gtk::Widget::set_name(), Gtk::Widget::show_all(), VisualTimeAxis::start_time_axis_rename(), and view.

Referenced by popup_marker_time_axis_edit_menu().

{
      using namespace Menu_Helpers;
      using Gtk::Menu;

      marker_menu = manage(new Menu) ;
      marker_menu->set_name ("ArdourContextMenu");
      MenuList& items = marker_menu->items();
      
      marker_item_menu = manage(new Menu) ;
      marker_item_menu->set_name ("ArdourContextMenu");
      MenuList& marker_sub_items = marker_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 (_("1 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 1.0))) ;
            duration_items.push_back(MenuElem (_("1.5 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 1.5))) ;
            duration_items.push_back(MenuElem (_("2 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 2.0))) ;
            duration_items.push_back(MenuElem (_("2.5 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 2.5))) ;
            duration_items.push_back(MenuElem (_("3 seconds"), bind (mem_fun (view, &MarkerTimeAxisView::set_marker_duration_sec), 3.0))) ;
      }
      //duration_items.push_back(SeparatorElem()) ;
      //duration_items.push_back(MenuElem (_("custom"), mem_fun(*this, &ImageFrameTimeAxis::set_marker_duration_custom))) ;

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

      marker_sub_items.push_back(SeparatorElem()) ;
      marker_sub_items.push_back(MenuElem (_("Remove Marker"), bind(mem_fun(view, &MarkerTimeAxisView::remove_selected_marker_view),(void*)this))) ;
      
      items.push_back(MenuElem(_("Marker"), *marker_item_menu)) ;
      items.push_back(MenuElem (_("Rename Track"), mem_fun(*this,&MarkerTimeAxis::start_time_axis_rename))) ;

      marker_menu->show_all() ;
}


Generated by  Doxygen 1.6.0   Back to index