1 /* === S Y N F I G ========================================================= */
2 /*! \file keyframetree.h
3 ** \brief Template Header
5 ** $Id: keyframetree.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_STUDIO_KEYFRAMETREE_H
25 #define __SYNFIG_STUDIO_KEYFRAMETREE_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/treeview.h>
30 #include <gtkmm/treestore.h>
31 #include <synfigapp/canvasinterface.h>
32 #include <synfigapp/value_desc.h>
33 #include "keyframetreestore.h"
34 #include <synfig/keyframe.h>
36 /* === M A C R O S ========================================================= */
38 /* === T Y P E D E F S ===================================================== */
40 /* === C L A S S E S & S T R U C T S ======================================= */
44 class CellRenderer_Time;
46 class KeyframeTree : public Gtk::TreeView
49 -- ** -- P U B L I C T Y P E S ---------------------------------------------
60 COLUMNID_END //!< \internal
64 -- ** -- P U B L I C D A T A ------------------------------------------------
69 KeyframeTreeStore::Model model;
72 -- ** -- P R I V A T E D A T A ---------------------------------------------
77 Glib::RefPtr<KeyframeTreeStore> keyframe_tree_store_;
79 CellRenderer_Time *cell_renderer_time;
81 CellRenderer_Time *cell_renderer_time_delta;
83 Gtk::CellRendererText *cell_renderer_description;
85 sigc::signal<void,synfig::Keyframe> signal_edited_;
87 sigc::signal<void,synfig::Keyframe,synfig::Time> signal_edited_time_;
89 sigc::signal<void,synfig::Keyframe,synfig::String> signal_edited_description_;
91 sigc::signal<void, int, Gtk::TreeRow, ColumnID> signal_user_click_;
96 -- ** -- P R I V A T E M E T H O D S ---------------------------------------
102 -- ** -- S I G N A L T E R M I N A L S -------------------------------------
107 void on_edited_time(const Glib::ustring&path_string,synfig::Time time);
109 void on_edited_time_delta(const Glib::ustring&path_string,synfig::Time time);
111 void on_edited_description(const Glib::ustring&path_string,const Glib::ustring &description);
113 bool on_event(GdkEvent *event);
115 void on_rend_desc_changed();
118 -- ** -- P U B L I C M E T H O D S -----------------------------------------
126 void set_model(Glib::RefPtr<KeyframeTreeStore> keyframe_tree_store_);
128 void set_editable(bool x=true);
130 bool get_editable()const { return editable_; }
132 //! Signal called when a keyframe has been edited in any way
133 sigc::signal<void,synfig::Keyframe>& signal_edited() { return signal_edited_; }
135 //! Signal called when a time has been edited.
136 sigc::signal<void,synfig::Keyframe,synfig::Time>& signal_edited_time() { return signal_edited_time_; }
138 //! Signal called when a description has been edited.
139 sigc::signal<void,synfig::Keyframe,synfig::String>& signal_edited_description() { return signal_edited_description_; }
141 sigc::signal<void,int, Gtk::TreeRow, ColumnID>& signal_user_click() { return signal_user_click_; }
142 }; // END of KeyframeTree
144 }; // END of namespace studio
146 /* === E N D =============================================================== */