26 #ifndef __SYNFIG_STUDIO_KEYFRAMETREESTORE_H 
   27 #define __SYNFIG_STUDIO_KEYFRAMETREESTORE_H 
   31 #include <gtkmm/liststore.h> 
   33 #include <gdkmm/pixbuf.h> 
   34 #include <synfig/keyframe.h> 
   49 class KeyframeTreeStore_Class;
 
   50 #if GLIB_CHECK_VERSION(2, 37, 5) 
   51 class KeyframeTreeStore :
 
   52     public Gtk::TreeModel,
 
   53     public Gtk::TreeDragSource,
 
   54     public Gtk::TreeDragDest,
 
   59     public Gtk::TreeModel,
 
   60     public Gtk::TreeDragSource,
 
   61     public Gtk::TreeDragDest
 
   70     class Model : 
public Gtk::TreeModel::ColumnRecord
 
   73         Gtk::TreeModelColumn<synfig::Time> 
time;
 
   75         Gtk::TreeModelColumn<synfig::Keyframe> 
keyframe;
 
  103     etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_;
 
  110     synfig::KeyframeList old_keyframe_list;
 
  118     void add_keyframe(synfig::Keyframe);
 
  120     void remove_keyframe(synfig::Keyframe);
 
  122     void change_keyframe(synfig::Keyframe);
 
  124     static int sorter(
const Gtk::TreeModel::iterator &,
const Gtk::TreeModel::iterator &);
 
  126     bool iterator_sane(
const GtkTreeIter* iter)
const;
 
  128     bool iterator_sane(
const Gtk::TreeModel::iterator& iter)
const;
 
  130     void dump_iterator(
const GtkTreeIter* iter, 
const Glib::ustring &name)
const;
 
  132     void dump_iterator(
const Gtk::TreeModel::iterator& iter, 
const Glib::ustring &name)
const;
 
  148     virtual void set_value_impl (
const Gtk::TreeModel::iterator& row, 
int column, 
const Glib::ValueBase& value);
 
  155     virtual bool iter_next_vfunc (
const iterator& iter, iterator& iter_next) 
const;
 
  156     virtual bool  get_iter_vfunc (
const Gtk::TreeModel::Path& path, iterator& iter_next)
const;
 
  158     virtual Gtk::TreeModel::Path  
get_path_vfunc (
const iterator& iter)
const;
 
  163     virtual void  get_value_vfunc (
const Gtk::TreeModel::iterator& iter, 
int column, Glib::ValueBase& value)
const;
 
  193     KeyframeTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
 
  196     etl::loose_handle<synfigapp::CanvasInterface> 
canvas_interface() { 
return canvas_interface_; }
 
  197     etl::loose_handle<const synfigapp::CanvasInterface> 
canvas_interface()
const { 
return canvas_interface_; }
 
  202     Gtk::TreeModel::Row 
find_row(
const synfig::Keyframe &keyframe);
 
  204     bool find_keyframe_path(
const synfig::Keyframe &keyframe, Gtk::TreeModel::Path &path);
 
  211     static Glib::RefPtr<KeyframeTreeStore> 
create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
 
  213     static int time_sorter(
const Gtk::TreeModel::iterator &rhs,
const Gtk::TreeModel::iterator &lhs);
 
  214     static int description_sorter(
const Gtk::TreeModel::iterator &rhs,
const Gtk::TreeModel::iterator &lhs);