- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# dock_navigator.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00021 /* ========================================================================= */
    00022
    00023 /* === S T A R T =========================================================== */
    00024
    00025 #ifndef __SYNFIG_DOCK_NAVIGATOR_H
    00026 #define __SYNFIG_DOCK_NAVIGATOR_H
    00027
    00028 /* === H E A D E R S ======================================================= */
    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 /* === M A C R O S ========================================================= */
    00045
    00046 /* === T Y P E D E F S ===================================================== */
    00047
    00048 /* === C L A S S E S & S T R U C T S ======================================= */
    00049
    00050 namespace studio {
    00051 class AsyncRenderer;
    00052
    00053 class Widget_NavView : public Gtk::Table
    00054 {
    00055     //handle to out parent canvas
    00056     CanvasView::LooseHandle     canvview;
    00057
    00058     Glib::RefPtr<Gdk::Pixbuf>   prev;
    00059     bool dirty;
    00060
    00061     //The drawing stuff
    00062     Gtk::DrawingArea    drawto;
    00063
    00064     //The input stuff
    00065     Gtk::Adjustment     adj_zoom;
    00066     Gtk::Label          zoom_print;
    00067
    00068     //zoom window stuff
    00069     bool                scrolling;
    00070
    00071     //asynchronous rendering stuff
    00072     etl::handle<AsyncRenderer>  renderer;
    00073     etl::smart_ptr<synfig::Surface> surface;
    00074     bool                        rendering;
    00075
    00076     //drawing functionality
    00077     void on_start_render(); //breaks out into asynchronous rendering
    00078     void on_finish_render();
    00079     void on_draw(); //renders the small thing we have
    00080     void on_dirty_preview(); //dirties the preview for rerender
    00081
    00082     //for the zoom buttons
    00083     void on_zoom_in();
    00084     void on_zoom_out();
    00085
    00086     //handles the zoom scroller
    00087     bool on_scroll_event(GdkEvent *event);
    00088     void on_number_modify();
    00089
    00090     //
    00091     bool on_mouse_event(GdkEvent * e);
    00092
    00093     //draws the gotten bitmap on the draw area
    00094     bool on_expose_draw(GdkEventExpose *exp=0);
    00095
    00096     //for when the canvasview view changes (boolean value scrolling solves cyclic problems)
    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 }; // END of namespace studio
    00118
    00119 /* === E N D =============================================================== */
    00120
    00121 #endif