00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_STUDIO_WIDGET_DISTANCE_H
00026 #define __SYNFIG_STUDIO_WIDGET_DISTANCE_H
00027
00028
00029
00030 #include <sigc++/signal.h>
00031 #include <sigc++/slot.h>
00032 #include <gtkmm/spinbutton.h>
00033 #include <gtkmm/adjustment.h>
00034 #include <synfig/distance.h>
00035
00036
00037
00038
00039
00040
00041
00042 namespace Gtk { class Entry; class Button; };
00043
00044 namespace studio {
00045
00046 class Widget_Distance : public Gtk::SpinButton
00047 {
00048
00049
00050 mutable synfig::Distance distance_;
00051
00052 Gtk::Adjustment adjustment;
00053
00054 protected:
00055
00056 int on_input(double* new_value);
00057 bool on_output();
00058
00059 public:
00060
00061
00062 void set_value(const synfig::Distance &data);
00063 synfig::Distance get_value()const;
00064 Widget_Distance();
00065 ~Widget_Distance();
00066 };
00067
00068 };
00069
00070
00071
00072 #endif