00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_STUDIO_WIDGET_TIME_H
00026 #define __SYNFIG_STUDIO_WIDGET_TIME_H
00027
00028
00029
00030 #include <sigc++/signal.h>
00031 #include <sigc++/slot.h>
00032 #include <gtkmm/entry.h>
00033 #include <synfig/time.h>
00034
00035
00036
00037
00038
00039
00040
00041 namespace Gtk { class Entry; class Button; };
00042
00043 namespace studio {
00044
00045 class Widget_Time : public Gtk::Entry
00046 {
00047
00048
00049 sigc::signal<void> signal_value_changed_;
00050
00051 float fps_;
00052
00053 synfig::Time time_;
00054
00055 protected:
00056 bool on_focus_out_event(GdkEventFocus* event);
00057
00058 bool on_focus_in_event(GdkEventFocus* event);
00059
00060
00061
00062 void refresh_text();
00063
00064 void refresh_value();
00065
00066 bool on_event(GdkEvent* event);
00067
00068 public:
00069 sigc::signal<void> &signal_value_changed() { return signal_value_changed_; }
00070
00071
00072
00073 void set_value(const synfig::Time &data);
00074 synfig::Time get_value()const;
00075 void set_fps(float x);
00076 Widget_Time();
00077 ~Widget_Time();
00078 };
00079
00080 };
00081
00082
00083
00084 #endif