+CWindowProjectorAddKeyframe::CWindowProjectorAddKeyframe(MWindow *mwindow,
+ CWindowToolGUI *gui, int x, int y)
+ : BC_Button(x, y, mwindow->theme->get_image_set("keyframe_button"))
+{
+ this->mwindow = mwindow;
+ this->gui = gui;
+ set_tooltip(_("Add Keyframe: Shift-F12"));
+}
+
+int CWindowProjectorAddKeyframe::handle_event()
+{
+ return gui->press(&CWindowCanvas::projector_keyframe);
+}
+
+CWindowProjectorReset::CWindowProjectorReset(MWindow *mwindow,
+ CWindowToolGUI *gui, int x, int y)
+ : BC_Button(x, y, mwindow->theme->get_image_set("reset_button"))
+{
+ this->mwindow = mwindow;
+ this->gui = gui;
+ set_tooltip(_("Reset Projector: F12"));
+}
+
+int CWindowProjectorReset::handle_event()
+{
+ return gui->press(&CWindowCanvas::reset_projector);
+}
+
+int CWindowToolGUI::press(void (CWindowCanvas::*fn)())
+{
+ unlock_window();
+ CWindowGUI *cw_gui = thread->gui;
+ cw_gui->lock_window("CWindowGUI::press");
+ (cw_gui->canvas->*fn)();
+ cw_gui->unlock_window();
+ lock_window("CWindowToolGUI::press");
+ return 1;
+}