- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# cellrenderer_timetrack.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00022 /* ========================================================================= */
    00023
    00024 /* === S T A R T =========================================================== */
    00025
    00026 #ifndef __SYNFIG_GTKMM_CELLRENDERER_TIMETRACK_H
    00027 #define __SYNFIG_GTKMM_CELLRENDERER_TIMETRACK_H
    00028
    00029 /* === H E A D E R S ======================================================= */
    00030
    00031 #include <gtk/gtk.h>
    00032 #include <gtkmm/ruler.h>
    00033 #include <gtkmm/arrow.h>
    00034 #include <gtkmm/image.h>
    00035 #include <gdkmm/pixbufloader.h>
    00036 #include <gtkmm/viewport.h>
    00037 #include <gtkmm/adjustment.h>
    00038 #include <gtkmm/scrolledwindow.h>
    00039 #include <gtkmm/table.h>
    00040 #include <gtkmm/statusbar.h>
    00041 #include <gtkmm/button.h>
    00042 #include <gtkmm/progressbar.h>
    00043 #include <gtkmm/paned.h>
    00044 #include <gtkmm/treeview.h>
    00045 #include <gtkmm/treestore.h>
    00046 #include <gtkmm/adjustment.h>
    00047 #include <gtkmm/box.h>
    00048 #include <gtkmm/scrollbar.h>
    00049 #include <gtkmm/cellrenderer.h>
    00050
    00051 #include <gtkmm/dialog.h>
    00052 #include <gtkmm/menu.h>
    00053
    00054
    00055 #include <synfigapp/canvasinterface.h>
    00056 #include <synfigapp/value_desc.h>
    00057 #include <synfig/valuenode_animated.h>
    00058 #include <synfig/valuenode_dynamiclist.h>
    00059 #include <synfig/string.h>
    00060 #include <synfig/time.h>
    00061
    00062 /* === M A C R O S ========================================================= */
    00063
    00064 /* === T Y P E D E F S ===================================================== */
    00065
    00066
    00067 /* === C L A S S E S & S T R U C T S ======================================= */
    00068
    00069 namespace studio {
    00070 class Widget_ValueBase;
    00071
    00075 class CellRenderer_TimeTrack :
    00076     public Gtk::CellRenderer
    00077 {
    00078
    00079     /*
    00080  -- ** -- P R I V A T E   D A T A ---------------------------------------------
    00081     */
    00082
    00083 private:
    00085     Gtk::Adjustment adjustment_;
    00086
    00088     sigc::signal<void, const etl::handle<synfig::Node>&, const synfig::Time&, const synfig::Time&, int> signal_waypoint_clicked_cellrenderer_;
    00089
    00090     sigc::signal<void, synfig::Waypoint, synfig::ValueNode::Handle> signal_waypoint_changed_;
    00091
    00093     synfig::ValueNode_Animated::WaypointList::iterator selected_waypoint;
    00094
    00095     synfig::UniqueID selected;
    00096
    00098     //TODO: make multiple... on both time and value select...
    00099     std::set<synfig::Time>  sel_times;
    00100     synfigapp::ValueDesc        sel_value;
    00101     synfig::Time                actual_time;
    00102     synfig::Time                actual_dragtime;
    00103     int                     mode;
    00104
    00106     synfig::Time selected_time;
    00107
    00109     Glib::ustring path;
    00110
    00112     bool selection;
    00113
    00114     bool dragging;
    00115
    00116     synfig::Time drag_time;
    00117
    00118     etl::loose_handle<synfigapp::CanvasInterface>   canvas_interface_;
    00119
    00120     /*
    00121  -- ** -- P R O P E R T I E S -------------------------------------------------
    00122     */
    00123
    00124 private:
    00125
    00127     Glib::Property<synfigapp::ValueDesc> property_valuedesc_;
    00128
    00130     Glib::Property<synfig::Canvas::Handle> property_canvas_;
    00131
    00133     Glib::Property<Gtk::Adjustment* > property_adjustment_;
    00134
    00136     Glib::Property<bool> property_enable_timing_info_;
    00137
    00138     /*
    00139  -- ** -- P R O P E R T Y   I N T E R F A C E S -------------------------------
    00140     */
    00141
    00142 public:
    00143
    00144     Glib::PropertyProxy<synfigapp::ValueDesc> property_value_desc();
    00145
    00146     Glib::PropertyProxy<synfig::Canvas::Handle> property_canvas();
    00147
    00148     Glib::PropertyProxy<Gtk::Adjustment* > property_adjustment();
    00149
    00150     /*
    00151  -- ** -- S I G N A L   I N T E R F A C E S -----------------------------------
    00152     */
    00153
    00154 public:
    00155
    00156     sigc::signal<void, const etl::handle<synfig::Node>&, const synfig::Time&, const synfig::Time&, int> &signal_waypoint_clicked_cellrenderer()
    00157     {return signal_waypoint_clicked_cellrenderer_; }
    00158
    00159     sigc::signal<void, synfig::Waypoint, synfig::ValueNode::Handle> &signal_waypoint_changed()
    00160     {return signal_waypoint_changed_; }
    00161
    00162     /*
    00163  -- ** -- P U B L I C   M E T H O D S -----------------------------------------
    00164     */
    00165
    00166 public:
    00167
    00168     CellRenderer_TimeTrack();
    00169     ~CellRenderer_TimeTrack();
    00170
    00171     void set_adjustment(Gtk::Adjustment &x);
    00172     Gtk::Adjustment *get_adjustment();
    00173     const Gtk::Adjustment *get_adjustment()const;
    00174
    00175     etl::loose_handle<synfigapp::CanvasInterface>   canvas_interface()const {return canvas_interface_;}
    00176     void set_canvas_interface(etl::loose_handle<synfigapp::CanvasInterface> h); //this should only be called by smart people
    00177
    00178     synfig::Canvas::Handle get_canvas()const;
    00179
    00180     bool is_selected(const synfig::Waypoint& waypoint)const;
    00181
    00182     synfig::ValueNode_Animated::WaypointList::iterator find_waypoint(const synfig::Time& t, const synfig::Time& scope=synfig::Time::end());
    00183
    00184     virtual void
    00185     render_vfunc(
    00186         const Glib::RefPtr<Gdk::Drawable>& window,
    00187         Gtk::Widget& widget,
    00188         const Gdk::Rectangle& background_area,
    00189         const Gdk::Rectangle& ca,
    00190         const Gdk::Rectangle& expose_area,
    00191         Gtk::CellRendererState flags);
    00192
    00193     virtual bool
    00194     activate_vfunc( GdkEvent* event,
    00195                     Gtk::Widget& widget,
    00196                     const Glib::ustring& path,
    00197                     const Gdk::Rectangle& background_area,
    00198                     const Gdk::Rectangle& cell_area,
    00199                     Gtk::CellRendererState flags);
    00200
    00201 }; // END of class CellRenderer_TimeTrack
    00202
    00203 }; // END of namespace studio
    00204
    00205 /* === E N D =============================================================== */
    00206
    00207 #endif