/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "apatchgui.h"
#include "autos.h"
#include "bcwindowbase.h"
#include "cpanel.h"
-#include "cwindowgui.h"
+#include "cwindowgui.h"
#include "cwindow.h"
#include "edl.h"
#include "edlsession.h"
#include "mwindowgui.h"
#include "mwindow.h"
#include "patchbay.h"
-#include "patchgui.h"
+#include "patchgui.h"
#include "timelinepane.h"
#include "track.h"
#include "vtrack.h"
mwindow->edl->local_session->set_selectionstart(new_position);
mwindow->edl->local_session->set_selectionend(new_position);
mwindow->gui->lock_window();
- mwindow->gui->update(1, 1, 1, 1, 1, 1, 0);
+ mwindow->gui->update(1, 1, 1, 1, 1, 1, 0);
mwindow->gui->unlock_window();
}
return 0;
int KeyframePopupDelete::handle_event()
{
mwindow->undo->update_undo_before(_("delete keyframe"), 0);
+ mwindow->speed_before();
delete popup->keyframe_auto;
+ mwindow->speed_after(1);
mwindow->undo->update_undo_after(_("delete keyframe"), LOAD_ALL);
mwindow->save_backup();
{
}
-PatchGUI *KeyframePopupShow::get_patchgui(Track *track)
-{
- PatchGUI *patchgui = 0;
- TimelinePane **panes = mwindow->gui->pane;
- for( int i=0; i<TOTAL_PANES && !patchgui; ++i ) {
- if( !panes[i] ) continue;
- PatchBay *patchbay = panes[i]->patchbay;
- if( !patchbay ) continue;
- for( int j=0; j<patchbay->patches.total && !patchgui; ++j ) {
- if( patchbay->patches.values[j]->track == track )
- patchgui = patchbay->patches.values[j];
- }
- }
- return patchgui;
-}
-
int KeyframePopupShow::handle_event()
{
MWindowGUI *mgui = mwindow->gui;
case AUTOMATION_PROJECTOR_X:
case AUTOMATION_PROJECTOR_Y:
case AUTOMATION_PROJECTOR_Z: {
- cgui->set_operation(CWINDOW_PROJECTOR);
+ cgui->set_operation(CWINDOW_PROJECTOR);
break; }
case AUTOMATION_MASK: {
default: {
show_window = 0;
- PatchGUI *patchgui = get_patchgui(popup->keyframe_automation->track);
+ PatchGUI *patchgui = mwindow->get_patchgui(popup->keyframe_automation->track);
if( !patchgui ) break;
switch( popup->keyframe_autos->autoidx ) {
file.terminate_string();
mwindow->gui->lock_window();
- mwindow->gui->get_clipboard()->to_clipboard(file.string,
- strlen(file.string),
- SECONDARY_SELECTION);
+ mwindow->gui->to_clipboard(file.string, strlen(file.string), SECONDARY_SELECTION);
mwindow->gui->unlock_window();
} else
KeyframePopupCurveMode::KeyframePopupCurveMode(
- MWindow *mwindow,
- KeyframePopup *popup,
+ MWindow *mwindow,
+ KeyframePopup *popup,
int curve_mode)
: BC_MenuItem( get_labeltext(curve_mode))
{
int KeyframePopupCurveMode::handle_event()
{
- if (popup->keyframe_autos &&
+ if (popup->keyframe_autos &&
popup->keyframe_autos->get_type() == AUTOMATION_TYPE_FLOAT)
{
mwindow->undo->update_undo_before(_("change keyframe curve mode"), 0);
((FloatAuto*)popup->keyframe_auto)->
change_curve_mode((FloatAuto::t_mode)curve_mode);
-
+
// if we switched to some "auto" mode, this may imply a
// real change to parameters, so this needs to be undoable...
mwindow->undo->update_undo_after(_("change keyframe curve mode"), LOAD_ALL);
mwindow->save_backup();
-
+
mwindow->gui->update(0, 1, 0,0,0,0,0); // incremental redraw for canvas
mwindow->cwindow->update(0,0, 1, 0,0); // redraw tool window in compositor
mwindow->update_plugin_guis();
key_speed_patch->mwindow->get_float_auto(key_speed_patch->patch, AUTOMATION_SPEED)->get_value())
{
this->key_speed_patch = key_speed_patch;
+ key_speed_patch->mwindow->speed_before();
set_precision(0.01);
}
int KeySpeedValue::button_release_event()
{
BC_FSlider::button_release_event();
+ key_speed_patch->mwindow->speed_after(1);
+ key_speed_patch->mwindow->resync_guis();
return 0;
}
mwindow->undo->update_undo_before(_("speed"), need_undo ? 0 : this);
FloatAuto *current = (FloatAuto*)speed_autos->get_auto_for_editing(position);
current->set_value(get_value());
- mwindow->undo->update_undo_after(_("speed"), LOAD_AUTOMATION);
+ mwindow->undo->update_undo_after(_("speed"), LOAD_AUTOMATION+LOAD_EDITS);
}
int KeySpeedValue::handle_event()