X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fcanvasview.h;h=1ba3dcfb81da0f0bd875fd349e3287dade20ac56;hb=040dd7baf4cee0e19161af0f0a33963ddcfae634;hp=aea06f37940cf1e175861de37aaaf2a42f5e46d5;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index aea06f3..1ba3dcf 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -2,19 +2,20 @@ /*! \file canvasview.h ** \brief Template Header ** -** $Id: canvasview.h,v 1.2 2005/01/13 18:37:30 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -88,7 +89,7 @@ #if _DEBUG #define DEBUGPOINT_CLASS(x) struct debugpointclass_ ## x { debugpointclass_ ## x () { DEBUGPOINT(); } ~debugpointclass_ ## x () { DEBUGPOINT(); } } badfthguae_ ## x ; #else -#define DEBUGPOINT_CLASS(x) +#define DEBUGPOINT_CLASS(x) #endif #endif @@ -111,11 +112,11 @@ class Duckmatic; class Preview; struct PreviewInfo; class AudioContainer; - + class Widget_Sound; class Widget_Timeslider; class Widget_Time; - + class Dialog_SoundSelect; class Dialog_Preview; @@ -123,29 +124,29 @@ class synfig::TransformStack; class Dock_Layers; class Dock_Children; class Dock_Keyframes; - + class CanvasView : public Gtk::Window, public etl::shared_object { friend class UniversalScrubber; friend class Dock_Layers; friend class Dock_Children; friend class Dock_Keyframes; - + friend class CanvasViewUIInterface; friend class CanvasViewSelectionManager; friend class Duckmatic; - + /* -- ** -- P U B L I C T Y P E S --------------------------------------------- */ - + public: typedef etl::handle Handle; - + typedef etl::handle ConstHandle; - + typedef etl::loose_handle LooseHandle; typedef LayerTreeStore::Model LayerTreeModel; @@ -201,9 +202,9 @@ private: SigC::Connection playcon; SigC::Connection stopcon; - + std::auto_ptr universal_scrubber; - + //! Tooltip controler Gtk::Tooltips tooltips; @@ -222,7 +223,7 @@ private: //Glib::RefPtr keyframe_tree_store_; DEBUGPOINT_CLASS(5); - + //std::map > tree_model_book_; std::map > ref_obj_book_; std::map ext_widget_book_; @@ -230,14 +231,14 @@ private: //! The time adjustment's scope is defined by the time_window adjustment Gtk::Adjustment time_adjustment_; - + //! The time_window adjustment governs the position of the time window on the whole time line //Gtk::Adjustment time_window_adjustment_; studio::Adjust_Window time_window_adjustment_; - - + + LayerTree *layer_tree; - + ChildrenTree *children_tree; KeyframeTree *keyframe_tree; @@ -246,10 +247,10 @@ private: Gtk::ProgressBar *progressbar; Gtk::Statusbar *statusbar; - + Gtk::TreeRow children_canvas_row; Gtk::TreeRow children_valuenode_row; - + Gtk::Button *stopbutton; Gtk::Button *refreshbutton; Gtk::Button *treetogglebutton; @@ -258,7 +259,7 @@ private: Widget_Time *current_time_widget; void on_current_time_widget_changed(); - + std::auto_ptr timeslider; std::list duck_changed_connections; @@ -267,7 +268,7 @@ private: Gtk::Button *animatebutton; Gtk::Button *keyframebutton; - + /* DEBUGPOINT_CLASS(8); Gtk::Menu duckmaskmenu; @@ -315,13 +316,13 @@ private: Glib::RefPtr duck_mask_angle; Gtk::RadioButtonGroup quality_group; - + Glib::RefPtr action_group; etl::handle ui_interface_; etl::handle selection_manager_; - + bool is_playing_; sigc::signal signal_deleted_; @@ -369,7 +370,7 @@ public: */ private: - + // Constructor is private to force the use of the "create()" constructor CanvasView(etl::loose_handle instance,etl::handle canvas_interface); @@ -394,8 +395,8 @@ private: void time_was_changed(); - void refresh_rend_desc(); - + void refresh_rend_desc(); + void toggle_duck_mask(Duckmatic::Type type); Gtk::Widget *create_work_area(); @@ -406,14 +407,14 @@ private: 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); 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*); @@ -442,7 +443,7 @@ public: Gtk::Widget* get_ext_widget(const synfig::String& x); void set_ext_widget(const synfig::String& x, Gtk::Widget* y); - + //std::map& tree_view_book() { return tree_view_book_; } //std::map& ext_widget_book() { return tree_view_book_; } @@ -451,23 +452,23 @@ public: Smach& get_smach() { return smach_; } const Smach& get_smach()const { return smach_; } - + Smach::event_result process_event_key(EventKey x); - + void popup_layer_menu(synfig::Layer::Handle layer); virtual ~CanvasView(); void set_mode(Mode x) { canvas_interface()->set_mode(x); } - + Mode get_mode()const { return canvas_interface()->get_mode(); } - + Gtk::Adjustment &time_adjustment() { return time_adjustment_; } - + const Gtk::Adjustment &time_adjustment()const { return time_adjustment_; } studio::Adjust_Window &time_window_adjustment() { return time_window_adjustment_; } - + const studio::Adjust_Window &time_window_adjustment()const { return time_window_adjustment_; } etl::handle get_ui_interface() { return ui_interface_;} @@ -475,19 +476,19 @@ public: etl::handle get_selection_manager() { return selection_manager_; } Glib::RefPtr layer_tree_store() { return get_tree_model("layers"); } - + Glib::RefPtr layer_tree_store()const { return get_tree_model("layers"); } Glib::RefPtr children_tree_store() { return get_tree_model("children"); } - + Glib::RefPtr children_tree_store()const { return get_tree_model("children"); } Glib::RefPtr keyframe_tree_store() { return get_tree_model("keyframes"); } - + Glib::RefPtr keyframe_tree_store()const { return get_tree_model("keyframes"); } void set_time(synfig::Time t) { canvas_interface_->set_time(t); } - + synfig::Time get_time() { return canvas_interface_->get_time(); } etl::handle get_canvas()const { return canvas_interface_->get_canvas(); } @@ -543,62 +544,57 @@ public: //! \writeme void rebuild_ducks(); - + //bool add_to_ducks(synfigapp::ValueDesc value_desc, synfig::ParamDesc *param_desc=NULL); - + //! Starts "playing" the animation in real-time void play(); //! Shows the tables (Layer/Children) void show_tables(); - + //! Hides the tables (Layer/Children) void hide_tables(); - + //! Toggles the tables void toggle_tables(); //! Gets the table status bool tables_are_visible(); - + //! Shows the time bar void show_timebar(); //! Hides the time bar void hide_timebar(); - void do_rotoscope_bline(); - - void do_rotoscope(); - - void do_rotoscope_poly(); - - void do_eyedrop(); + //t Enables or disables interaction with the timebar + void set_sensitive_timebar(bool sensitive); void time_zoom_in(); void time_zoom_out(); - + void add_layer(synfig::String x); - + void show_keyframe_dialog(); - + void play_audio(float t); void stop_audio(); - + void image_import(); void on_waypoint_clicked(synfigapp::ValueDesc,synfig::Waypoint, int button); - + void preview_option() {on_preview_option();} - + void present(); - + /* -- ** -- S I G N A L T E R M I N A L S ------------------------------------- */ private: - + void on_unselect_layers(); void on_input_device_changed(GdkDevice*); @@ -607,7 +603,7 @@ private: virtual bool on_focus_in_event(GdkEventFocus*); virtual bool on_focus_out_event(GdkEventFocus*); - + //bool on_children_tree_event(GdkEvent *event); bool on_keyframe_tree_event(GdkEvent *event); @@ -621,21 +617,21 @@ private: bool on_layer_user_click(int, Gtk::TreeRow, LayerTree::ColumnID); // void on_layer_toggle(const Glib::ustring& path_string, Gtk::TreeModelColumn column); - + void on_mode_changed(synfigapp::CanvasInterface::Mode mode); // void on_layer_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator); - + //void on_children_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator); void on_waypoint_changed(); - + void on_waypoint_delete(); void on_refresh_pressed(); void on_id_changed(); - + void on_time_changed(); /* @@ -644,7 +640,7 @@ private: void on_layer_duplicate_pressed(); void on_layer_delete_pressed(); */ - + void on_keyframe_add_pressed(); void on_keyframe_duplicate_pressed(); @@ -654,17 +650,17 @@ private: void on_animate_button_pressed(); void on_keyframe_button_pressed(); - + void on_preview_option(); void on_preview_create(const PreviewInfo &); - + void on_audio_option(); void on_audio_file_change(const std::string &f); void on_audio_offset_change(const synfig::Time &t); - + void on_audio_file_notify(); void on_audio_offset_notify(); - + bool on_duck_changed(const synfig::Point &value,const synfigapp::ValueDesc& value_desc); void on_layer_toggle(synfig::Layer::Handle); @@ -674,19 +670,19 @@ private: //void on_waypoint_clicked(synfigapp::ValueDesc,synfig::ValueNode_Animated::WaypointList::iterator, int button); void on_drop_drag_data_received(const Glib::RefPtr& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time); - + //void on_audio_play(); bool on_audio_scrub(); protected: bool on_delete_event(GdkEventAny* event); - + /* -- ** -- S T A T I C P U B L I C M E T H O D S --------------------------- */ public: - + static etl::handle create(etl::loose_handle instance,etl::handle canvas); }; // END of class CanvasView