Add onion skin icon, and two spin buttons to control past and future onion skins
[synfig.git] / synfig-studio / trunk / src / gtkmm / canvasview.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file canvasview.h
3 **      \brief Template Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **      Copyright (c) 2007, 2008 Chris Moore
10 **      Copyright (c) 2009 Carlos López
11 **
12 **      This package is free software; you can redistribute it and/or
13 **      modify it under the terms of the GNU General Public License as
14 **      published by the Free Software Foundation; either version 2 of
15 **      the License, or (at your option) any later version.
16 **
17 **      This package is distributed in the hope that it will be useful,
18 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
19 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 **      General Public License for more details.
21 **      \endlegal
22 */
23 /* ========================================================================= */
24
25 /* === S T A R T =========================================================== */
26
27 #ifndef __SYNFIG_STUDIO_GTKMM_CANVASVIEW_H
28 #define __SYNFIG_STUDIO_GTKMM_CANVASVIEW_H
29
30 /* === H E A D E R S ======================================================= */
31
32 #include <gtkmm/window.h>
33 #include <gtkmm/image.h>
34 #include <gtkmm/tooltips.h>
35 #include <gtkmm/table.h>
36 #include <gtkmm/statusbar.h>
37 #include <gtkmm/progressbar.h>
38 #include <gtkmm/button.h>
39 #include <gtkmm/menu.h>
40 #include <gtkmm/treeview.h>
41 #include <gtkmm/treestore.h>
42 #include <gtkmm/scrolledwindow.h>
43 #include <gtkmm/notebook.h>
44 #include <gdkmm/device.h>
45 #include <gtkmm/spinbutton.h>
46
47 #include <synfigapp/canvasinterface.h>
48 #include <synfigapp/selectionmanager.h>
49
50 #include <synfig/canvas.h>
51 #include <synfig/string.h>
52 #include <synfig/time.h>
53
54 #include "instance.h"
55 #include "canvasproperties.h"
56 #include "canvasoptions.h"
57 #include "render.h"
58 #include "cellrenderer_timetrack.h"
59 #include "app.h"
60
61 #include "layertreestore.h"
62 #include "layertree.h"
63 #include "childrentreestore.h"
64 #include "childrentree.h"
65 #include "keyframetreestore.h"
66 #include "keyframetree.h"
67
68 #include "dialog_waypoint.h"
69 #include "dialog_keyframe.h"
70 #include "framedial.h"
71 #include "toggleducksdial.h"
72 #include "resolutiondial.h"
73
74 #include "duckmatic.h"
75 #include <gtkmm/scale.h>
76
77 #include <gtkmm/uimanager.h>
78
79 #include "smach.h"
80
81 #include <memory>
82 #include <set>
83 #include <map>
84 #include <gtkmm/toggleaction.h>
85 #include <gtkmm/radioaction.h>
86 #include <synfig/rect.h>
87
88 #include "adjust_window.h"
89
90 #include <synfig/transform.h>
91
92 /* === M A C R O S ========================================================= */
93
94 #ifndef DEBUGPOINT_CLASS
95 #if     _DEBUG
96 #define DEBUGPOINT_CLASS(x)             struct debugpointclass_ ## x { debugpointclass_ ## x () { DEBUGPOINT(); } ~debugpointclass_ ## x () { DEBUGPOINT(); } } badfthguae_ ## x ;
97 #else
98 #define DEBUGPOINT_CLASS(x)
99 #endif
100 #endif
101
102 /* === T Y P E D E F S ===================================================== */
103
104 /* === C L A S S E S & S T R U C T S ======================================= */
105
106 namespace synfig {
107         class TransformStack;
108 }
109
110 namespace studio {
111
112 class CanvasViewUIInterface;
113 class CanvasViewSelectionManager;
114
115 class CellRenderer_TimeTrack;
116 class CellRenderer_ValueBase;
117 class UniversalScrubber;
118 class WorkArea;
119
120 class Duckmatic;
121
122 class Preview;
123 struct PreviewInfo;
124 class AudioContainer;
125
126 class Widget_Sound;
127 class Widget_Timeslider;
128 class Widget_Time;
129
130 class Dialog_SoundSelect;
131 class Dialog_Preview;
132
133 class Dock_Layers;
134 class Dock_Children;
135 class Dock_Keyframes;
136
137 class CanvasView : public Gtk::Window, public etl::shared_object
138 {
139         friend class UniversalScrubber;
140         friend class Dock_Layers;
141         friend class Dock_Children;
142         friend class Dock_Keyframes;
143
144         friend class CanvasViewUIInterface;
145         friend class CanvasViewSelectionManager;
146
147         friend class Duckmatic;
148
149         /*
150  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
151         */
152
153 public:
154
155         typedef etl::handle<CanvasView> Handle;
156
157         typedef etl::handle<const CanvasView> ConstHandle;
158
159         typedef etl::loose_handle<CanvasView> LooseHandle;
160
161         typedef LayerTreeStore::Model LayerTreeModel;
162
163         typedef ChildrenTreeStore::Model ChildrenTreeModel;
164
165         //! Create an instance of this class whenever doing a longer task.
166         /*! Make sure that you check the bool value of this class occasionally
167         **      to make sure the action has not been canceled. */
168         class IsWorking
169         {
170                 CanvasView &canvas_view_;
171
172         public:
173                 IsWorking(CanvasView &canvas_view_);
174                 ~IsWorking();
175                 operator bool()const;
176         };
177         friend class IsWorking;
178
179         typedef synfigapp::CanvasInterface::Mode Mode;
180
181         void set_grid_snap_toggle(bool flag) { grid_snap_toggle->set_active(flag); }
182         void set_grid_show_toggle(bool flag) { grid_show_toggle->set_active(flag); }
183
184         /*
185  -- ** -- P R I V A T E   D A T A ---------------------------------------------
186         */
187
188 public:
189         std::auto_ptr<WorkArea> work_area;
190
191         WorkArea* get_work_area() { return work_area.get(); }
192 private:
193
194         synfig::TransformStack curr_transform_stack;
195         bool curr_transform_stack_set;
196
197         synfig::Rect bbox;
198
199         // DEBUGPOINT_CLASS(1);
200
201         //! State Machine
202         Smach smach_;
203
204         // DEBUGPOINT_CLASS(2);
205
206         etl::loose_handle<Instance> instance_;
207         etl::handle<synfigapp::CanvasInterface> canvas_interface_;
208
209         // DEBUGPOINT_CLASS(3);
210
211         //! Sound and information to play it
212         etl::handle<AudioContainer>             audio;
213         studio::Widget_Sound                    *disp_audio; //should this be put into thing too?
214
215         sigc::connection                                playcon;
216         sigc::connection                                stopcon;
217
218         std::auto_ptr<UniversalScrubber> universal_scrubber;
219
220         //! Tooltip controller
221         Gtk::Tooltips tooltips;
222
223         // DEBUGPOINT_CLASS(4);
224
225         //! TreeModel for the layers
226         LayerTreeModel layer_tree_model;
227
228         //! TreeModel for the the children
229         ChildrenTreeModel children_tree_model;
230
231         //Glib::RefPtr<LayerTreeStore> layer_tree_store_;
232
233         //Glib::RefPtr<ChildrenTreeStore> children_tree_store_;
234
235         //Glib::RefPtr<KeyframeTreeStore> keyframe_tree_store_;
236
237         // DEBUGPOINT_CLASS(5);
238
239         //std::map<synfig::String,Glib::RefPtr<Gtk::TreeModel> > tree_model_book_;
240         std::map<synfig::String,Glib::RefPtr<Glib::ObjectBase> > ref_obj_book_;
241         std::map<synfig::String,Gtk::Widget*> ext_widget_book_;
242
243         //! The time adjustment's scope is defined by the time_window adjustment
244         Gtk::Adjustment time_adjustment_;
245
246         //! The time_window adjustment governs the position of the time window on the whole time line
247         //Gtk::Adjustment time_window_adjustment_;
248         studio::Adjust_Window time_window_adjustment_;
249
250         LayerTree *layer_tree;
251
252         ChildrenTree *children_tree;
253
254         KeyframeTree *keyframe_tree;
255
256         Gtk::Widget *keyframe_tab_child;
257
258         Gtk::ProgressBar *progressbar;
259         Gtk::Statusbar *statusbar;
260
261         Gtk::TreeRow children_canvas_row;
262         Gtk::TreeRow children_valuenode_row;
263
264         Gtk::Button *stopbutton;
265         Gtk::Button *refreshbutton;
266         Gtk::Button *treetogglebutton;  // not used
267         Gtk::Notebook *notebook; // not used
268         Gtk::Table *timebar;
269         Gtk::Table *displaybar;
270         Gtk::Button *animatebutton;
271         Gtk::Button *keyframebutton;
272         FrameDial *framedial;
273         ToggleDucksDial *toggleducksdial;
274         bool toggling_ducks_;
275         ResolutionDial *resolutiondial;
276         bool changing_resolution_;
277         Gtk::Adjustment quality_adjustment_;
278         Gtk::SpinButton *quality_spin;
279         Gtk::Adjustment past_onion_adjustment_;
280         Gtk::SpinButton *past_onion_spin;
281         Gtk::Adjustment future_onion_adjustment_;
282         Gtk::SpinButton *future_onion_spin;
283         bool updating_quality_;
284         Gtk::ToggleButton *show_grid;
285         Gtk::ToggleButton *snap_grid;
286         Gtk::ToggleButton *onion_skin;
287         bool toggling_show_grid;
288         bool toggling_snap_grid;
289         bool toggling_onion_skin;
290         //! Shows current time and allows edition
291         Widget_Time *current_time_widget;
292         void on_current_time_widget_changed();
293
294         //! Time slider class. Same than the Time track panel
295         std::auto_ptr<Widget_Timeslider> timeslider;
296
297         std::list<sigc::connection> duck_changed_connections;
298
299 /*      DEBUGPOINT_CLASS(8);
300
301         Gtk::Menu duckmaskmenu;
302         DEBUGPOINT_CLASS(77);
303         Gtk::Menu qualitymenu;
304         DEBUGPOINT_CLASS(6);
305
306         Gtk::Menu filemenu;
307         DEBUGPOINT_CLASS(777);
308         Gtk::Menu editmenu;
309         DEBUGPOINT_CLASS(71);
310         Gtk::Menu canvasmenu;
311         DEBUGPOINT_CLASS(73);
312 public:
313         Gtk::Menu layermenu;
314 private:
315         DEBUGPOINT_CLASS(74);
316         Gtk::Menu newlayermenu;
317         DEBUGPOINT_CLASS(76);
318         Gtk::Menu viewmenu;
319
320         DEBUGPOINT_CLASS(99);
321         Gtk::Menu keyframemenu;
322
323         Gtk::Menu parammenu;
324         DEBUGPOINT_CLASS(9);
325         Gtk::Menu trackmenu;
326         DEBUGPOINT_CLASS(7);
327
328         Gtk::CheckMenuItem* duck_mask_position;
329         Gtk::CheckMenuItem* duck_mask_vertex;
330         Gtk::CheckMenuItem* duck_mask_tangent;
331         Gtk::CheckMenuItem* duck_mask_radius;
332         Gtk::CheckMenuItem* duck_mask_width;
333         Gtk::CheckMenuItem* duck_mask_angle;
334 */
335         //! Menu members
336         Gtk::Menu parammenu;
337
338         Glib::RefPtr<Gtk::ToggleAction> grid_snap_toggle;
339         Glib::RefPtr<Gtk::ToggleAction> grid_show_toggle;
340
341         Gtk::RadioButtonGroup quality_group;
342         Gtk::RadioButtonGroup low_res_pixel_size_group;
343
344         Glib::RefPtr<Gtk::ActionGroup> action_group;
345
346         etl::handle<synfigapp::UIInterface> ui_interface_;
347         etl::handle<synfigapp::SelectionManager> selection_manager_;
348
349         bool is_playing_;
350
351         sigc::signal<void> signal_deleted_;
352
353         bool rebuild_ducks_queued;
354         sigc::connection queue_rebuild_ducks_connection;
355
356         /*
357  -- ** -- P U B L I C   D A T A -----------------------------------------------
358         */
359
360 public:
361         void queue_rebuild_ducks();
362         sigc::signal<void>& signal_deleted() { return signal_deleted_; }
363
364         Gtk::Menu mainmenu;
365
366         bool duck_refresh_flag;
367         bool duck_refresh_needed;
368
369         //! This is for the IsWorking class.
370         int working_depth;
371
372         bool cancel;
373
374         /*
375  -- ** -- D I A L O G S -------------------------------------------------------
376         */
377
378 public:
379
380         CanvasProperties canvas_properties;
381         CanvasOptions canvas_options;
382         RenderSettings render_settings;
383         Dialog_Waypoint waypoint_dialog;
384         Dialog_Keyframe keyframe_dialog;
385
386         std::auto_ptr<Dialog_Preview>                   preview_dialog;
387         //std::auto_ptr<Dialog_PreviewOptions>  previewoption_dialog;
388         std::auto_ptr<Dialog_SoundSelect>               sound_dialog;
389
390         /*
391  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
392         */
393
394 private:
395
396         // Constructor is private to force the use of the "create()" constructor
397         CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigapp::CanvasInterface> canvas_interface);
398
399         //! Constructor Helper
400         // Gtk::Widget* create_layer_tree();
401
402         //! Constructor Helper
403         // Gtk::Widget* create_children_tree();
404
405         //! Constructor Helper
406         // Gtk::Widget* create_keyframe_tree();
407
408         //! Constructor Helper
409         Gtk::Widget* create_status_bar();
410
411         //! Constructor Helper - Initializes all of the menus
412         void init_menus();
413
414         bool duck_change_param(const synfig::Point &value,synfig::Layer::Handle layer, synfig::String param_name);
415
416         void refresh_time_window();
417
418         void time_was_changed();
419
420         void refresh_rend_desc();
421
422         void toggle_duck_mask(Duckmatic::Type type);
423
424         Gtk::Widget *create_work_area();
425
426         Gtk::Widget *create_time_bar();
427
428         Gtk::Widget *create_display_bar();
429
430         //! Pop up menu for the bezier (bline, draw) tool (?)
431         void popup_param_menu_bezier(float location, synfigapp::ValueDesc value_desc)
432         { popup_param_menu(value_desc,location,true); }
433
434         //! Pop up menu for the tools but not the bezier ones.
435         void popup_param_menu(synfigapp::ValueDesc value_desc, float location=0, bool bezier=false);
436
437         void workarea_layer_selected(synfig::Layer::Handle layer);
438
439         void selected_layer_color_set(synfig::Color color);
440
441         void register_layer_type(synfig::Layer::Book::value_type &lyr,std::map<synfig::String,Gtk::Menu*>*);
442
443         //! Rebuilds the "new layer" menu
444         void build_new_layer_menu(Gtk::Menu &menu);
445
446         void rebuild_ducks_layer_(synfig::TransformStack& transform_stack, synfig::Canvas::Handle canvas, std::set<synfig::Layer::Handle>& selected_list);
447
448         void decrease_low_res_pixel_size();
449         void increase_low_res_pixel_size();
450         void toggle_low_res_pixel_flag();
451         void set_quality(int x);
452         void set_onion_skins();
453         void toggle_show_grid();
454         void toggle_snap_grid();
455         void toggle_onion_skin();
456
457         /*
458  -- ** -- P U B L I C   M E T H O D S -----------------------------------------
459         */
460
461 public:
462         const synfig::TransformStack& get_curr_transform_stack()const { return curr_transform_stack; }
463
464         const synfig::Rect& get_bbox()const { return bbox; }
465
466         Glib::RefPtr<Glib::ObjectBase> get_ref_obj(const synfig::String& x);
467         Glib::RefPtr<const Glib::ObjectBase> get_ref_obj(const synfig::String& x)const;
468         void set_ref_obj(const synfig::String& x, Glib::RefPtr<Glib::ObjectBase> y);
469
470         Glib::RefPtr<Gtk::TreeModel> get_tree_model(const synfig::String& x);
471         Glib::RefPtr<const Gtk::TreeModel> get_tree_model(const synfig::String& x)const;
472         void set_tree_model(const synfig::String& x, Glib::RefPtr<Gtk::TreeModel> y);
473
474         Gtk::Widget* get_ext_widget(const synfig::String& x);
475         void set_ext_widget(const synfig::String& x, Gtk::Widget* y);
476
477         //std::map<synfig::String,Gtk::Widget*>& tree_view_book() { return tree_view_book_; }
478         //std::map<synfig::String,Gtk::Widget*>& ext_widget_book() { return tree_view_book_; }
479
480         void popup_main_menu();
481
482         Smach& get_smach() { return smach_; }
483
484         const Smach& get_smach()const { return smach_; }
485
486         Smach::event_result process_event_key(EventKey x);
487
488         void popup_layer_menu(synfig::Layer::Handle layer);
489
490         virtual ~CanvasView();
491
492         void set_mode(Mode x) { canvas_interface()->set_mode(x); }
493
494         Mode get_mode()const { return canvas_interface()->get_mode(); }
495
496         Gtk::Adjustment &time_adjustment() { return time_adjustment_; }
497
498         const Gtk::Adjustment &time_adjustment()const { return time_adjustment_; }
499
500         studio::Adjust_Window &time_window_adjustment() { return time_window_adjustment_; }
501
502         const studio::Adjust_Window &time_window_adjustment()const { return time_window_adjustment_; }
503
504         etl::handle<synfigapp::UIInterface> get_ui_interface() { return ui_interface_;}
505
506         etl::handle<synfigapp::SelectionManager> get_selection_manager() { return selection_manager_; }
507
508         Glib::RefPtr<Gtk::TreeModel> layer_tree_store() { return get_tree_model("layers"); }
509
510         Glib::RefPtr<const Gtk::TreeModel> layer_tree_store()const { return get_tree_model("layers"); }
511
512         Glib::RefPtr<Gtk::TreeModel> children_tree_store() { return get_tree_model("children"); }
513
514         Glib::RefPtr<const Gtk::TreeModel> children_tree_store()const { return get_tree_model("children"); }
515
516         Glib::RefPtr<Gtk::TreeModel> keyframe_tree_store() { return get_tree_model("keyframes"); }
517
518         Glib::RefPtr<const Gtk::TreeModel> keyframe_tree_store()const { return get_tree_model("keyframes"); }
519
520         void set_time(synfig::Time t) { canvas_interface_->set_time(t); }
521
522         synfig::Time get_time() { return canvas_interface_->get_time(); }
523
524         etl::handle<synfig::Canvas> get_canvas()const { return canvas_interface_->get_canvas(); }
525
526         etl::handle<Instance> get_instance()const { return instance_; }
527
528         etl::handle<synfigapp::CanvasInterface> canvas_interface() { return canvas_interface_; }
529
530         etl::handle<const synfigapp::CanvasInterface> canvas_interface()const { return canvas_interface_; }
531
532         void add_actions_to_menu(Gtk::Menu *menu,   const synfigapp::Action::ParamList &param_list, synfigapp::Action::Category category=synfigapp::Action::CATEGORY_ALL)const;
533
534         //! Updates the title of the window
535         void update_title();
536
537         //! Closes this document
538         bool close_instance();
539
540         //! Closes this canvas view
541         bool close_view();
542
543         //!     Stops the currently executing action
544         /*! \see get_cancel_status(), reset_cancel_status(), IsWorking */
545         void stop() { cancel=true; }
546
547         //! Returns the cancel status
548         /*! \see stop(), reset_cancel_status(), IsWorking */
549         bool get_cancel_status()const { return cancel; }
550
551         //! Resets the cancel status
552         /*! \see stop(), get_cancel_status(), IsWorking */
553         void reset_cancel_status() { cancel=false; }
554
555         void new_child_canvas();
556
557         //! Rebuilds layer_tree_store_ from the Canvas. Maintains selected items.
558         void rebuild_tables();
559
560         //! Builds layer_tree_store_ from the Canvas. Does not maintain selected items.
561         void build_tables();
562
563         //! Refreshes the data for the tables
564         void refresh_tables();
565
566         //void rebuild_layer_table();
567         //void build_layer_table();
568         //void refresh_layer_table();
569
570 //      void rebuild_canvas_table();
571 //      void build_canvas_table();
572 //      void refresh_canvas_table();
573
574 //      void rebuild_valuenode_table();
575 //      void build_valuenode_table();
576 //      void refresh_valuenode_table();
577
578         //! \writeme
579         void rebuild_ducks();
580
581         //bool add_to_ducks(synfigapp::ValueDesc value_desc, synfig::ParamDesc *param_desc=NULL);
582
583         //! Starts "playing" the animation in real-time
584         void play();
585
586         //! Shows the tables (Layer/Children)
587         void show_tables();
588
589         //! Hides the tables (Layer/Children)
590         void hide_tables();
591
592         //! Toggles the tables
593         void toggle_tables();
594
595         //! Gets the table status
596         bool tables_are_visible();
597
598         //! Shows the time bar
599         void show_timebar();
600
601         //! Hides the time bar
602         void hide_timebar();
603
604         //t Enables or disables interaction with the timebar
605         void set_sensitive_timebar(bool sensitive);
606
607         void time_zoom_in();
608         void time_zoom_out();
609
610         void add_layer(synfig::String x);
611
612         void show_keyframe_dialog();
613
614         void play_audio(float t);
615         void stop_audio();
616
617         void image_import();
618
619         void on_waypoint_clicked_canvasview(synfigapp::ValueDesc,std::set<synfig::Waypoint,std::less<synfig::UniqueID> >, int button);
620
621         void preview_option() {on_preview_option();}
622
623         void present();
624
625         bool is_playing() { return is_playing_; }
626
627         void update_quality();
628
629
630
631         /*
632  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
633         */
634
635 private:
636
637         void on_select_layers();
638         void on_unselect_layers();
639
640         void on_input_device_changed(GdkDevice*);
641
642         virtual void on_hide();
643
644         virtual bool on_focus_in_event(GdkEventFocus*);
645         virtual bool on_focus_out_event(GdkEventFocus*);
646
647         //bool on_children_tree_event(GdkEvent *event);
648
649         bool on_keyframe_tree_event(GdkEvent *event);
650
651         //void on_children_edited_value(const Glib::ustring&path_string,synfig::ValueBase value);
652
653         void on_dirty_preview();
654
655         bool on_children_user_click(int, Gtk::TreeRow, ChildrenTree::ColumnID);
656
657         bool on_layer_user_click(int, Gtk::TreeRow, LayerTree::ColumnID);
658
659 //      void on_layer_toggle(const Glib::ustring& path_string, Gtk::TreeModelColumn<bool> column);
660
661         void on_mode_changed(synfigapp::CanvasInterface::Mode mode);
662
663 //      void on_layer_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator);
664
665         //void on_children_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator);
666
667         void on_waypoint_changed();
668
669         void on_waypoint_delete();
670
671         void on_refresh_pressed();
672
673         void on_id_changed();
674
675         void on_time_changed();
676
677         /*
678         void on_layer_raise_pressed();
679         void on_layer_lower_pressed();
680         void on_layer_duplicate_pressed();
681         void on_layer_delete_pressed();
682         */
683
684         void on_keyframe_add_pressed();
685
686         void on_keyframe_duplicate_pressed();
687
688         void on_keyframe_remove_pressed();
689
690         void on_animate_button_pressed();
691
692         void on_keyframe_button_pressed();
693
694         void on_preview_option();
695         void on_preview_create(const PreviewInfo &);
696
697         void on_audio_option();
698         void on_audio_file_change(const std::string &f);
699         void on_audio_offset_change(const synfig::Time &t);
700
701         void on_audio_file_notify();
702         void on_audio_offset_notify();
703
704         bool on_duck_changed(const synfig::Point &value,const synfigapp::ValueDesc& value_desc);
705         bool on_duck_angle_changed(const synfig::Angle &rotation,const synfigapp::ValueDesc& value_desc);
706
707         void on_layer_toggle(synfig::Layer::Handle);
708
709         void on_edited_value(synfigapp::ValueDesc,synfig::ValueBase);
710
711         void on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time);
712
713         //void on_audio_play();
714         bool on_audio_scrub();
715
716         void on_play_stop_pressed();
717
718 protected:
719         bool close_instance_when_safe();
720         bool on_delete_event(GdkEventAny* event);
721
722         /*
723  -- ** -- S T A T I C   P U B L I C   M E T H O D S ---------------------------
724         */
725
726 public:
727
728         static etl::handle<studio::CanvasView> create(etl::loose_handle<Instance> instance,etl::handle<synfig::Canvas> canvas);
729         static std::list<int>& get_pixel_sizes();
730
731 }; // END of class CanvasView
732
733 }; // END of namespace studio
734
735 /* === E N D =============================================================== */
736
737 #endif