#include <gtkmm/drawingarea.h>
#include <gtkmm/adjustment.h>
+#include <gtkmm/tooltips.h>
#include <synfig/keyframe.h>
#include <sigc++/connection.h>
+#include <synfigapp/canvasinterface.h>
/* === M A C R O S ========================================================= */
class Widget_Keyframe_List : public Gtk::DrawingArea
{
+ //! Tooltips class. It is deprecated since gtkmm 2.12
+ //! replace with Tooltip class or use the own tooltip widget's members
+ Gtk::Tooltips tooltips;
+
+ //! The canvas interface being watched
+ etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_;
+
//! Time adjustment window
Gtk::Adjustment adj_default;
Gtk::Adjustment *adj_timescale;
//!The list of keyframes to be drawn on the widget and moved with mouse
- synfig::KeyframeList kf_list_;
+ synfig::KeyframeList default_kf_list_;
+ mutable synfig::KeyframeList* kf_list_;
//! The frames per second of the canvas
float fps;
+ //! Time radius to click a keyframe
+ synfig::Time time_ratio;
+
//!True if it is editable. Keyframes can be moved.
bool editable_;
//!Holds the selected keyframe of the keyframe list
synfig::Keyframe selected_kf;
+ synfig::Keyframe selected_none;
+ bool selected_;
//!The time of the selected keyframe
synfig::Time selected_kf_time;
~Widget_Keyframe_List();
//!Loads a new keyframe list on the widget.
- void set_kf_list(const synfig::KeyframeList& x);
+ void set_kf_list(synfig::KeyframeList* x);
//!Member for private data.
- const synfig::KeyframeList& get_kf_list()const { return kf_list_; }
+ synfig::KeyframeList* get_kf_list()const { return kf_list_; }
//!Member for private data
void set_editable(bool x=true) { editable_=x; }
//! Set the fps
void set_fps(float x);
+ //! Set the canvas interface
+ void set_canvas_interface(etl::loose_handle<synfigapp::CanvasInterface> h);
+
//! Performs the keyframe movement. Returns true if it was sucessful
- bool perform_move_kf();
+ //! @return true: if success otherwise false
+ //! |delta=false: permorm normal move. true: perform delta movement
+ bool perform_move_kf(bool delta);
}; // END of namespace studio
+
/* === E N D =============================================================== */
#endif