1 /* === S Y N F I G ========================================================= */
2 /*! \file dock_navigator.h
3 ** \brief Navigator Dock Header
5 ** $Id: dock_navigator.h,v 1.3 2005/01/12 00:31:11 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_DOCK_NAVIGATOR_H
25 #define __SYNFIG_DOCK_NAVIGATOR_H
27 /* === H E A D E R S ======================================================= */
28 #include "sigc++/signal.h"
30 #include <gtkmm/drawingarea.h>
31 #include <gdkmm/pixbuf.h>
32 #include <gtkmm/adjustment.h>
33 #include <gtkmm/label.h>
35 #include <synfig/renddesc.h>
37 #include "canvasview.h"
38 #include "dock_canvasspecific.h"
39 #include "widget_distance.h"
41 #include <ETL/smart_ptr>
43 /* === M A C R O S ========================================================= */
45 /* === T Y P E D E F S ===================================================== */
47 /* === C L A S S E S & S T R U C T S ======================================= */
52 class Widget_NavView : public Gtk::Table
54 //handle to out parent canvas
55 CanvasView::LooseHandle canvview;
57 Glib::RefPtr<Gdk::Pixbuf> prev;
61 Gtk::DrawingArea drawto;
64 Gtk::Adjustment adj_zoom;
65 Gtk::Label zoom_print;
70 //asyncronous rendering stuff
71 etl::handle<AsyncRenderer> renderer;
72 etl::smart_ptr<synfig::Surface> surface;
75 //drawing functionality
76 void on_start_render(); //breaks out into asynchronous rendering
77 void on_finish_render();
78 void on_draw(); //renders the small thing we have
79 void on_dirty_preview(); //dirties the preview for rerender
81 //for the zoom buttons
85 //handles the zoom scroller
86 bool on_scroll_event(GdkEvent *event);
87 void on_number_modify();
90 bool on_mouse_event(GdkEvent * e);
92 //draws the gotten bitmap on the draw area
93 bool on_expose_draw(GdkEventExpose *exp=0);
95 //for when the canvasview view changes (boolean value scrolling solves cyclic problems)
96 void on_workarea_view_change();
99 Widget_NavView(CanvasView::LooseHandle cv = CanvasView::LooseHandle());
102 etl::loose_handle<studio::CanvasView> get_canvas_view() {return canvview;}
105 class Dock_Navigator : public Dock_CanvasSpecific
107 Widget_NavView dummy;
113 virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
116 }; // END of namespace studio
118 /* === E N D =============================================================== */