/*! \file cellrenderer_timetrack.h
** \brief Template Header
**
-** $Id: cellrenderer_timetrack.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
+** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007, 2008 Chris Moore
**
** 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_ValueBase;
-enum Side
-{
- SIDE_LEFT,
- SIDE_RIGHT
-};
-
/*! \class CellRenderer_TimeTrack
** \brief A cell renderer that displays the waypoints for Animated ValueNodes.
*/
private:
//! Time adjustment window
Gtk::Adjustment adjustment_;
-
+
//! Signal for when the user clicks on a waypoint
- sigc::signal<void, const Glib::ustring&,synfig::Waypoint, int> signal_waypoint_clicked_;
+ sigc::signal<void, const etl::handle<synfig::Node>&, const synfig::Time&, const synfig::Time&, int, synfig::Waypoint::Side> signal_waypoint_clicked_cellrenderer_;
sigc::signal<void, synfig::Waypoint, synfig::ValueNode::Handle> signal_waypoint_changed_;
//! Iterator for selected waypoint. (Should this be an UniqueID instead?)
synfig::ValueNode_Animated::WaypointList::iterator selected_waypoint;
-
+
synfig::UniqueID selected;
//! selected information for time... (will work for way points etc...)
//! ???
synfig::Time selected_time;
-
+
//! The path to the current item in the tree model
Glib::ustring path;
-
+
//! ???
bool selection;
bool dragging;
synfig::Time drag_time;
-
+
etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_;
/*
*/
private:
-
+
//! ValueBase Desc
Glib::Property<synfigapp::ValueDesc> property_valuedesc_;
public:
- sigc::signal<void, const Glib::ustring&,synfig::Waypoint,int> &signal_waypoint_clicked()
- {return signal_waypoint_clicked_; }
+ sigc::signal<void, const etl::handle<synfig::Node>&, const synfig::Time&, const synfig::Time&, int, synfig::Waypoint::Side> &signal_waypoint_clicked_cellrenderer()
+ {return signal_waypoint_clicked_cellrenderer_; }
sigc::signal<void, synfig::Waypoint, synfig::ValueNode::Handle> &signal_waypoint_changed()
{return signal_waypoint_changed_; }
CellRenderer_TimeTrack();
~CellRenderer_TimeTrack();
-
- void show_timepoint_menu(const etl::handle<synfig::Node>& node, const synfig::Time& time, Side side=SIDE_RIGHT);
+
+ void show_timepoint_menu(const etl::handle<synfig::Node>&, const synfig::Time&, const synfig::Time&, synfig::Waypoint::Side side=synfig::Waypoint::SIDE_RIGHT);
void set_adjustment(Gtk::Adjustment &x);
Gtk::Adjustment *get_adjustment();
etl::loose_handle<synfigapp::CanvasInterface> canvas_interface()const {return canvas_interface_;}
void set_canvas_interface(etl::loose_handle<synfigapp::CanvasInterface> h); //this should only be called by smart people
-
+
synfig::Canvas::Handle get_canvas()const;
-
+
bool is_selected(const synfig::Waypoint& waypoint)const;
synfig::ValueNode_Animated::WaypointList::iterator find_waypoint(const synfig::Time& t, const synfig::Time& scope=synfig::Time::end());