Gtk::Menu* waypoint_menu(manage(new Gtk::Menu()));
waypoint_menu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), waypoint_menu));
- Waypoint::Model model;
- String side_string(String(" ") + (side==Waypoint::SIDE_LEFT ? _("In") : _("Out")));
+ Gtk::Menu* interp_menu_in(manage(new Gtk::Menu()));
+ Gtk::Menu* interp_menu_out(manage(new Gtk::Menu()));
+ Gtk::Menu* interp_menu_both(manage(new Gtk::Menu()));
+
+ waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_In"), *interp_menu_in));
+ waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Out"), *interp_menu_out));
+ waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Both"), *interp_menu_both));
// ------------------------------------------------------------------------
- if(side==Waypoint::SIDE_LEFT) model.set_before(INTERPOLATION_TCB);
- else model.set_after(INTERPOLATION_TCB);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB") + side_string,
- sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
+ Waypoint::Model model;
- if(side==Waypoint::SIDE_LEFT) model.set_before(INTERPOLATION_LINEAR);
- else model.set_after(INTERPOLATION_LINEAR);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear") + side_string,
+ model.reset(); model.set_before(INTERPOLATION_TCB);
+ interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"),
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
-
- if(side==Waypoint::SIDE_LEFT) model.set_before(INTERPOLATION_HALT);
- else model.set_after(INTERPOLATION_HALT);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease") + side_string,
+ model.reset(); model.set_after(INTERPOLATION_TCB);
+ interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"),
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
-
- if(side==Waypoint::SIDE_LEFT) model.set_before(INTERPOLATION_CONSTANT);
- else model.set_after(INTERPOLATION_CONSTANT);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant") + side_string,
+ model.set_before(INTERPOLATION_TCB);
+ interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"),
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
- // ------------------------------------------------------------------------
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());
-
- model.set_after(INTERPOLATION_TCB); model.set_before(INTERPOLATION_TCB);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("TC_B Both"),
+ model.reset(); model.set_before(INTERPOLATION_LINEAR);
+ interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"),
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
-
- model.set_after(INTERPOLATION_LINEAR); model.set_before(INTERPOLATION_LINEAR);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Li_near Both"),
+ model.reset(); model.set_after(INTERPOLATION_LINEAR);
+ interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"),
+ sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
+ model.set_before(INTERPOLATION_LINEAR);
+ interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"),
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
- model.set_after(INTERPOLATION_HALT); model.set_before(INTERPOLATION_HALT);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Ea_se Both"),
+ model.reset(); model.set_before(INTERPOLATION_HALT);
+ interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In"),
+ sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
+ model.reset(); model.set_after(INTERPOLATION_HALT);
+ interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease Out"),
+ sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
+ model.set_before(INTERPOLATION_HALT);
+ interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In/Out"),
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
- model.set_after(INTERPOLATION_CONSTANT); model.set_before(INTERPOLATION_CONSTANT);
- waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("C_onstant Both"),
+ model.reset(); model.set_before(INTERPOLATION_CONSTANT);
+ interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"),
+ sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
+ model.reset(); model.set_after(INTERPOLATION_CONSTANT);
+ interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"),
+ sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
+ model.set_before(INTERPOLATION_CONSTANT);
+ interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"),
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())));
// ------------------------------------------------------------------------