#include "layerparamtreestore.h"
#include "workarea.h"
#include "widget_timeslider.h"
+#include "widget_keyframe_list.h"
#include "layerparamtreestore.h"
#include "general.h"
#include <synfig/timepointcollect.h>
{
table_=0;
widget_timeslider_= new Widget_Timeslider();
+ widget_kf_list_= new Widget_Keyframe_List();
int header_height = 0;
if(getenv("SYNFIG_TIMETRACK_HEADER_HEIGHT"))
header_height = 22;
widget_timeslider_->set_size_request(-1,header_height);
+ widget_kf_list_->set_size_request(-1,header_height);
+
hscrollbar_=new Gtk::HScrollbar();
vscrollbar_=new Gtk::VScrollbar();
}
delete hscrollbar_;
delete vscrollbar_;
delete widget_timeslider_;
+ delete widget_kf_list_;
}
void
assert(tree_view);
+
widget_timeslider_->set_time_adjustment(&canvas_view->time_adjustment());
widget_timeslider_->set_bounds_adjustment(&canvas_view->time_window_adjustment());
widget_timeslider_->set_global_fps(canvas_view->get_canvas()->rend_desc().get_frame_rate());
+ widget_kf_list_->set_time_adjustment(&canvas_view->time_adjustment());
+ widget_kf_list_->set_fps(canvas_view->get_canvas()->rend_desc().get_frame_rate());
+ widget_kf_list_->set_kf_list(canvas_view->get_canvas()->keyframe_list());
+
vscrollbar_->set_adjustment(*tree_view->get_vadjustment());
hscrollbar_->set_adjustment(canvas_view->time_window_adjustment());
table_=new Gtk::Table(2,2);
table_->attach(*widget_timeslider_, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::SHRINK);
+ table_->attach(*widget_kf_list_, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::SHRINK);
table_->attach(*tree_view, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
table_->attach(*hscrollbar_, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::SHRINK);
table_->attach(*vscrollbar_, 1, 2, 0, 2, Gtk::FILL|Gtk::SHRINK, Gtk::FILL|Gtk::EXPAND);
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Carlos López
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
namespace studio {
class Widget_Timeslider;
+class Widget_Keyframe_List;
class Dock_Timetrack : public Dock_CanvasSpecific
{
Gtk::HScrollbar* hscrollbar_;
Gtk::VScrollbar* vscrollbar_;
Widget_Timeslider* widget_timeslider_;
+ Widget_Keyframe_List* widget_kf_list_;
Gtk::Table* table_;
protected:
Dock_Timetrack();
~Dock_Timetrack();
-}; // END of Dock_Keyframes
+}; // END of Dock_Timetrack
}; // END of namespace studio
t = floor(t*fps + 0.5)/fps;
}
bool stat=perform_move_kf();
- synfig::info("Dropping keyframe at: %s", t.get_string());
+ synfig::info("Dropping keyframe at: %s", t.get_string().c_str());
return stat;
}
default:
time_other_change = x->signal_changed().connect(sigc::mem_fun(*this,&Widget_Keyframe_List::queue_draw));
}
}
+
+void
+Widget_Keyframe_List::set_fps(float d)
+{
+ if(fps != d)
+ {
+ fps = d;
+ //update everything since we need to redraw already
+ queue_draw();
+ }
+}