00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_DOCK_NAVIGATOR_H
00026 #define __SYNFIG_DOCK_NAVIGATOR_H
00027
00028
00029 #include "sigc++/signal.h"
00030
00031 #include <gtkmm/drawingarea.h>
00032 #include <gdkmm/pixbuf.h>
00033 #include <gtkmm/adjustment.h>
00034 #include <gtkmm/label.h>
00035
00036 #include <synfig/renddesc.h>
00037
00038 #include "canvasview.h"
00039 #include "dock_canvasspecific.h"
00040 #include "widget_distance.h"
00041
00042 #include <ETL/smart_ptr>
00043
00044
00045
00046
00047
00048
00049
00050 namespace studio {
00051 class AsyncRenderer;
00052
00053 class Widget_NavView : public Gtk::Table
00054 {
00055
00056 CanvasView::LooseHandle canvview;
00057
00058 Glib::RefPtr<Gdk::Pixbuf> prev;
00059 bool dirty;
00060
00061
00062 Gtk::DrawingArea drawto;
00063
00064
00065 Gtk::Adjustment adj_zoom;
00066 Gtk::Label zoom_print;
00067
00068
00069 bool scrolling;
00070
00071
00072 etl::handle<AsyncRenderer> renderer;
00073 etl::smart_ptr<synfig::Surface> surface;
00074 bool rendering;
00075
00076
00077 void on_start_render();
00078 void on_finish_render();
00079 void on_draw();
00080 void on_dirty_preview();
00081
00082
00083 void on_zoom_in();
00084 void on_zoom_out();
00085
00086
00087 bool on_scroll_event(GdkEvent *event);
00088 void on_number_modify();
00089
00090
00091 bool on_mouse_event(GdkEvent * e);
00092
00093
00094 bool on_expose_draw(GdkEventExpose *exp=0);
00095
00096
00097 void on_workarea_view_change();
00098
00099 public:
00100 Widget_NavView(CanvasView::LooseHandle cv = CanvasView::LooseHandle());
00101 ~Widget_NavView();
00102
00103 etl::loose_handle<studio::CanvasView> get_canvas_view() {return canvview;}
00104 };
00105
00106 class Dock_Navigator : public Dock_CanvasSpecific
00107 {
00108 Widget_NavView dummy;
00109
00110 public:
00111 Dock_Navigator();
00112 ~Dock_Navigator();
00113
00114 virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
00115 };
00116
00117 };
00118
00119
00120
00121 #endif