1 /* === S Y N F I G ========================================================= */
2 /*! \file widget_keyframe_list.h
3 ** \brief A custom widget to manage keyframes in the timeline.
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 ** Copyright (c) 2009 Carlos López
11 ** This package is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU General Public License as
13 ** published by the Free Software Foundation; either version 2 of
14 ** the License, or (at your option) any later version.
16 ** This package is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ** General Public License for more details.
22 /* ========================================================================= */
24 /* === S T A R T =========================================================== */
26 #ifndef __SYNFIG_STUDIO_WIDGET_KEYFRAME_LIST_H
27 #define __SYNFIG_STUDIO_WIDGET_KEYFRAME_LIST_H
29 /* === H E A D E R S ======================================================= */
31 #include <gtkmm/drawingarea.h>
32 #include <synfig/keyframe.h>
34 /* === M A C R O S ========================================================= */
36 /* === T Y P E D E F S ===================================================== */
38 /* === C L A S S E S & S T R U C T S ======================================= */
42 class Widget_Keyframe_List : public Gtk::DrawingArea
44 sigc::signal<void> signal_value_changed_;
45 sigc::signal<void> signal_clicked_;
47 sigc::signal<void,synfig::Keyframe> signal_keyframe_selected_;
49 synfig::KeyframeList kf_list_;
55 synfig::Keyframe selected_kf;
57 void popup_menu(float x);
59 //void insert_cpoint(float x);
61 //void remove_cpoint(float x);
65 Widget_Keyframe_List();
67 ~Widget_Keyframe_List();
69 sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
70 sigc::signal<void>& signal_clicked() { return signal_clicked_; }
72 sigc::signal<void,synfig::Keyframe>& signal_keyframe_selected() { return signal_keyframe_selected_; }
74 void set_value(const synfig::KeyframeList& x);
76 const synfig::KayframeList& get_value()const { return kf_list_; }
78 void set_editable(bool x=true) { editable_=x; }
80 bool get_editable()const { return editable_; }
84 void set_selected_keyframe(const synfig::Keyframe &x);
86 const synfig::Kayframe& get_selected_keyframe() { return selected_kf; }
88 void update_keyframe(const synfig::Keyframe &x);
92 bool redraw(GdkEventExpose*bleh=NULL);
94 bool on_event(GdkEvent *event);
95 }; // END of class Keyframe_List
97 }; // END of namespace studio
99 /* === E N D =============================================================== */