1 /* === S Y N F I G ========================================================= */
2 /*! \file cellrenderer_time.h
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_STUDIO_CELLRENDERER_TIME_H
26 #define __SYNFIG_STUDIO_CELLRENDERER_TIME_H
28 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/entry.h>
31 #include <gtkmm/cellrenderertext.h>
33 #include <sigc++/signal.h>
34 #include <sigc++/slot.h>
36 #include <synfig/time.h>
38 /* === M A C R O S ========================================================= */
40 /* === T Y P E D E F S ===================================================== */
42 /* === C L A S S E S & S T R U C T S ======================================= */
44 namespace Gtk { class Entry; class Button; };
48 class CellRenderer_Time : public Gtk::CellRendererText
50 sigc::signal<void, const Glib::ustring&> signal_secondary_click_;
51 sigc::signal<void, const Glib::ustring&, synfig::Time> signal_edited_;
53 Glib::Property<synfig::Time> property_time_;
54 Glib::Property<synfig::Time> property_fps_;
56 void string_edited_(const Glib::ustring&,const Glib::ustring&);
58 void on_value_editing_done();
61 sigc::signal<void, const Glib::ustring&, synfig::Time> &signal_edited()
62 {return signal_edited_; }
64 Glib::PropertyProxy<synfig::Time> property_time() { return property_time_.get_proxy();}
65 Glib::PropertyProxy<synfig::Time> property_fps() { return property_fps_.get_proxy();}
74 const Glib::RefPtr<Gdk::Drawable>& window,
76 const Gdk::Rectangle& background_area,
77 const Gdk::Rectangle& ca,
78 const Gdk::Rectangle& expose_area,
79 Gtk::CellRendererState flags);
81 virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
83 const Glib::ustring& path,
84 const Gdk::Rectangle& background_area,
85 const Gdk::Rectangle& cell_area,
86 Gtk::CellRendererState flags);
88 }; // END of class CellRenderer_Time
90 }; // END of namespace studio
92 /* === E N D =============================================================== */