X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-studio%2Ftags%2Fsynfigstudio_0_61_03%2Fsynfig-studio%2Fsrc%2Fgtkmm%2Fdock_canvasspecific.cpp;fp=synfig-studio%2Ftags%2Fsynfigstudio_0_61_03%2Fsynfig-studio%2Fsrc%2Fgtkmm%2Fdock_canvasspecific.cpp;h=0000000000000000000000000000000000000000;hb=3a6643238c67c043fc3592837a05d6d2861967f1;hp=aa49bf8e9eb5c0a64c13099fbbfb69733ecf8ebb;hpb=47fce282611fbba1044921d22ca887f9b53ad91a;p=synfig.git diff --git a/synfig-studio/tags/synfigstudio_0_61_03/synfig-studio/src/gtkmm/dock_canvasspecific.cpp b/synfig-studio/tags/synfigstudio_0_61_03/synfig-studio/src/gtkmm/dock_canvasspecific.cpp deleted file mode 100644 index aa49bf8..0000000 --- a/synfig-studio/tags/synfigstudio_0_61_03/synfig-studio/src/gtkmm/dock_canvasspecific.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file dock_canvasspecific.cpp -** \brief Template File -** -** $Id: dock_canvasspecific.cpp,v 1.3 2005/01/13 20:23:01 darco Exp $ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** 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. -** -** 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 -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "app.h" -#include "dock_canvasspecific.h" - -#include -#include -#include "instance.h" -#include -#include -//#include -#include -#include "metadatatreestore.h" -#include "canvasview.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; -using namespace studio; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Dock_CanvasSpecific::Dock_CanvasSpecific(const synfig::String& name,const synfig::String& local_name,Gtk::StockID stock_id_): - Dockable(name,local_name,stock_id_) -{ - App::signal_instance_created().connect(sigc::mem_fun(*this,&Dock_CanvasSpecific::init_instance)); -} - -Dock_CanvasSpecific::~Dock_CanvasSpecific() -{ -} - -etl::loose_handle -Dock_CanvasSpecific::get_canvas_view() -{ - return App::get_selected_canvas_view(); -} - -etl::loose_handle -Dock_CanvasSpecific::get_canvas_interface() -{ - if(get_canvas_view()) - return get_canvas_view()->canvas_interface(); - return 0; -} - -void -Dock_CanvasSpecific::init_canvas_view_vfunc(etl::loose_handle canvas_view) -{ -} - -void -Dock_CanvasSpecific::init_instance_vfunc(etl::loose_handle instance) -{ -} - -void -Dock_CanvasSpecific::changed_canvas_view_vfunc(etl::loose_handle canvas_view) -{ -} - -void -Dock_CanvasSpecific::init_instance(etl::handle instance) -{ - etl::clock timer;timer.reset(); - instance->signal_canvas_view_created().connect(sigc::mem_fun(*this,&Dock_CanvasSpecific::init_canvas_view)); - init_instance_vfunc(instance); - synfig::info("%s init_instance() took %f seconds",get_local_name().c_str(),float(timer())); -} - -void -Dock_CanvasSpecific::delete_instance(etl::handle instance) -{ - changed_canvas_view_vfunc(0); -} - -void -Dock_CanvasSpecific::init_canvas_view(CanvasView* canvas_view) -{ - /* - canvas_view->signal_focus_in_event().connect( - sigc::hide( - sigc::bind_return( - sigc::mem_fun( - *this, - &Dock_CanvasSpecific::canvas_view_changed - ), - false - ) - ) - ); - */ - synfig::info("%s init_canvas_view() Starting init...",get_local_name().c_str()); - etl::clock timer;timer.reset(); - App::signal_canvas_view_focus().connect( - sigc::hide( - sigc::mem_fun( - *this, - &Dock_CanvasSpecific::canvas_view_changed - ) - ) - ); - init_canvas_view_vfunc(canvas_view); - synfig::info("%s init_canvas_view() took %f seconds",get_local_name().c_str(),float(timer())); -} - -void -Dock_CanvasSpecific::canvas_view_changed() -{ - etl::loose_handle canvas_view(App::get_selected_canvas_view()); -/* if(canvas_view) - { - canvas_delete_connection.disconnect(); - canvas_delete_connection=canvas_view->signal_deleted().connect( - sigc::bind( - sigc::mem_fun( - *this, - &Dock_CanvasSpecific::changed_canvas_view - ), - etl::loose_handle(0) - ) - ); - } -*/ - -#ifdef _DEBUG - synfig::info("%s canvas_view_changed: start",get_local_name().c_str()); -#endif - changed_canvas_view_vfunc(canvas_view); -#ifdef _DEBUG - synfig::info("%s canvas_view_changed: end",get_local_name().c_str()); -#endif -}