Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-studio / trunk / src / gtkmm / canvasview.h
index cb0c0f3..cddcbe2 100644 (file)
@@ -7,6 +7,7 @@
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **     Copyright (c) 2007, 2008 Chris Moore
+**     Copyright (c) 2009 Carlos López
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -41,6 +42,7 @@
 #include <gtkmm/scrolledwindow.h>
 #include <gtkmm/notebook.h>
 #include <gdkmm/device.h>
+#include <gtkmm/spinbutton.h>
 
 #include <synfigapp/canvasinterface.h>
 #include <synfigapp/selectionmanager.h>
 
 #include "dialog_waypoint.h"
 #include "dialog_keyframe.h"
+#include "framedial.h"
+#include "toggleducksdial.h"
+#include "resolutiondial.h"
+#include "widget_keyframe_list.h"
 
 #include "duckmatic.h"
 #include <gtkmm/scale.h>
@@ -173,6 +179,9 @@ public:
 
        typedef synfigapp::CanvasInterface::Mode Mode;
 
+       void set_grid_snap_toggle(bool flag) { grid_snap_toggle->set_active(flag); }
+       void set_grid_show_toggle(bool flag) { grid_show_toggle->set_active(flag); }
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -232,7 +241,6 @@ private:
        std::map<synfig::String,Glib::RefPtr<Glib::ObjectBase> > ref_obj_book_;
        std::map<synfig::String,Gtk::Widget*> ext_widget_book_;
 
-
        //! The time adjustment's scope is defined by the time_window adjustment
        Gtk::Adjustment time_adjustment_;
 
@@ -240,7 +248,6 @@ private:
        //Gtk::Adjustment time_window_adjustment_;
        studio::Adjust_Window time_window_adjustment_;
 
-
        LayerTree *layer_tree;
 
        ChildrenTree *children_tree;
@@ -257,21 +264,41 @@ private:
 
        Gtk::Button *stopbutton;
        Gtk::Button *refreshbutton;
-       Gtk::Button *treetogglebutton;
-       Gtk::Notebook *notebook;
-       Gtk::Widget *timebar;
-
+       Gtk::Button *treetogglebutton;  // not used
+       Gtk::Notebook *notebook; // not used
+       Gtk::Table *timebar;
+       Gtk::Table *displaybar;
+       Gtk::Button *animatebutton;
+       Gtk::Button *keyframebutton;
+       FrameDial *framedial;
+       ToggleDucksDial *toggleducksdial;
+       bool toggling_ducks_;
+       ResolutionDial *resolutiondial;
+       bool changing_resolution_;
+       Gtk::Adjustment quality_adjustment_;
+       Gtk::SpinButton *quality_spin;
+       Gtk::Adjustment past_onion_adjustment_;
+       Gtk::SpinButton *past_onion_spin;
+       Gtk::Adjustment future_onion_adjustment_;
+       Gtk::SpinButton *future_onion_spin;
+       bool updating_quality_;
+       Gtk::ToggleButton *show_grid;
+       Gtk::ToggleButton *snap_grid;
+       Gtk::ToggleButton *onion_skin;
+       bool toggling_show_grid;
+       bool toggling_snap_grid;
+       bool toggling_onion_skin;
+       //! Shows current time and allows edition
        Widget_Time *current_time_widget;
        void on_current_time_widget_changed();
 
-       std::auto_ptr<Widget_Timeslider>                timeslider;
-
-       std::list<sigc::connection> duck_changed_connections;
-
+       //! Time slider class. Same than the Time track panel
+       std::auto_ptr<Widget_Timeslider> timeslider;
 
+       //!Keyframe list slider
+       std::auto_ptr<Widget_Keyframe_List> widget_kf_list;
 
-       Gtk::Button *animatebutton;
-       Gtk::Button *keyframebutton;
+       std::list<sigc::connection> duck_changed_connections;
 
 /*     DEBUGPOINT_CLASS(8);
 
@@ -309,22 +336,17 @@ private:
        Gtk::CheckMenuItem* duck_mask_width;
        Gtk::CheckMenuItem* duck_mask_angle;
 */
+       //! Menu members
        Gtk::Menu parammenu;
 
-
-       Glib::RefPtr<Gtk::ToggleAction> duck_mask_position;
-       Glib::RefPtr<Gtk::ToggleAction> duck_mask_vertex;
-       Glib::RefPtr<Gtk::ToggleAction> duck_mask_tangent;
-       Glib::RefPtr<Gtk::ToggleAction> duck_mask_radius;
-       Glib::RefPtr<Gtk::ToggleAction> duck_mask_width;
-       Glib::RefPtr<Gtk::ToggleAction> duck_mask_angle;
+       Glib::RefPtr<Gtk::ToggleAction> grid_snap_toggle;
+       Glib::RefPtr<Gtk::ToggleAction> grid_show_toggle;
 
        Gtk::RadioButtonGroup quality_group;
        Gtk::RadioButtonGroup low_res_pixel_size_group;
 
        Glib::RefPtr<Gtk::ActionGroup> action_group;
 
-
        etl::handle<synfigapp::UIInterface> ui_interface_;
        etl::handle<synfigapp::SelectionManager> selection_manager_;
 
@@ -353,7 +375,6 @@ public:
 
        bool cancel;
 
-
        /*
  -- ** -- D I A L O G S -------------------------------------------------------
        */
@@ -408,20 +429,19 @@ private:
 
        Gtk::Widget *create_time_bar();
 
+       Gtk::Widget *create_display_bar();
 
-
+       //! Pop up menu for the bezier (bline, draw) tool (?)
        void popup_param_menu_bezier(float location, synfigapp::ValueDesc value_desc)
-       { popup_param_menu(value_desc,location); }
-
-       void popup_param_menu(synfigapp::ValueDesc value_desc, float location=0);
+       { popup_param_menu(value_desc,location,true); }
 
+       //! Pop up menu for the tools but not the bezier ones.
+       void popup_param_menu(synfigapp::ValueDesc value_desc, float location=0, bool bezier=false);
 
        void workarea_layer_selected(synfig::Layer::Handle layer);
 
        void selected_layer_color_set(synfig::Color color);
 
-
-
        void register_layer_type(synfig::Layer::Book::value_type &lyr,std::map<synfig::String,Gtk::Menu*>*);
 
        //! Rebuilds the "new layer" menu
@@ -431,6 +451,12 @@ private:
 
        void decrease_low_res_pixel_size();
        void increase_low_res_pixel_size();
+       void toggle_low_res_pixel_flag();
+       void set_quality(int x);
+       void set_onion_skins();
+       void toggle_show_grid();
+       void toggle_snap_grid();
+       void toggle_onion_skin();
 
        /*
  -- ** -- P U B L I C   M E T H O D S -----------------------------------------
@@ -594,7 +620,7 @@ public:
 
        void image_import();
 
-       void on_waypoint_clicked_canvasview(synfigapp::ValueDesc,std::set<synfig::Waypoint,std::less<synfig::UniqueID> >, int button, synfig::Waypoint::Side side);
+       void on_waypoint_clicked_canvasview(synfigapp::ValueDesc,std::set<synfig::Waypoint,std::less<synfig::UniqueID> >, int button);
 
        void preview_option() {on_preview_option();}
 
@@ -602,12 +628,17 @@ public:
 
        bool is_playing() { return is_playing_; }
 
+       void update_quality();
+
+
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
 
 private:
 
+       void on_select_layers();
        void on_unselect_layers();
 
        void on_input_device_changed(GdkDevice*);
@@ -686,6 +717,8 @@ private:
        //void on_audio_play();
        bool on_audio_scrub();
 
+       void on_play_stop_pressed();
+
 protected:
        bool close_instance_when_safe();
        bool on_delete_event(GdkEventAny* event);