X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_normal.cpp;h=0072e55f95e28d757234f8042efe272d958c1ade;hb=e7e1794959f6b4af0d60d69b5501adcd305f2207;hp=00d0cdb13a95cfa53bcbaa30582519373c178051;hpb=3a3c4bca3a17137bec5d7960560934b91ef4146e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_normal.cpp b/synfig-studio/trunk/src/gtkmm/state_normal.cpp index 00d0cdb..0072e55 100644 --- a/synfig-studio/trunk/src/gtkmm/state_normal.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_normal.cpp @@ -1,20 +1,21 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file template.cpp ** \brief Template File ** ** $Id: state_normal.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $ ** ** \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 */ /* ========================================================================= */ @@ -36,9 +37,9 @@ #include "dialog_tooloptions.h" #include #include "widget_waypointmodel.h" -#include -#include -#include +#include +#include +#include #include "canvasview.h" #endif @@ -46,7 +47,7 @@ using namespace std; using namespace etl; -using namespace sinfg; +using namespace synfig; using namespace studio; /* === M A C R O S ========================================================= */ @@ -60,7 +61,7 @@ class studio::StateNormal_Context : public sigc::trackable CanvasView* get_canvas_view() { return canvas_view; } Canvas::Handle get_canvas() { return canvas_view->get_canvas(); } WorkArea* get_work_area() { return canvas_view->get_work_area(); } - etl::handle get_canvas_interface() { return canvas_view->canvas_interface(); } + etl::handle get_canvas_interface() { return canvas_view->canvas_interface(); } public: StateNormal_Context(CanvasView *canvas_view); @@ -84,7 +85,7 @@ public: Smach::event_result event_layer_click(const Smach::event& x); - void edit_several_waypoints(std::list value_desc_list); + void edit_several_waypoints(std::list value_desc_list); void refresh_tool_options(); }; // END of class StateNormal_Context @@ -118,12 +119,12 @@ StateNormal::~StateNormal() StateNormal_Context::StateNormal_Context(CanvasView *canvas_view): canvas_view(canvas_view) { - sinfg::info("Enterted Normal State"); + synfig::info("Enterted Normal State"); } StateNormal_Context::~StateNormal_Context() { - sinfg::info("Left Normal State"); + synfig::info("Left Normal State"); } void @@ -143,7 +144,7 @@ StateNormal_Context::event_refresh_tool_options(const Smach::event& x) Smach::event_result StateNormal_Context::event_stop_handler(const Smach::event& x) { - sinfg::info("STATE NORMAL: Received Stop Event"); + synfig::info("STATE NORMAL: Received Stop Event"); canvas_view->stop(); return Smach::RESULT_ACCEPT; } @@ -151,7 +152,7 @@ StateNormal_Context::event_stop_handler(const Smach::event& x) Smach::event_result StateNormal_Context::event_refresh_handler(const Smach::event& x) { - sinfg::info("STATE NORMAL: Received Refresh Event"); + synfig::info("STATE NORMAL: Received Refresh Event"); canvas_view->rebuild_tables(); canvas_view->work_area->queue_render_preview(); return Smach::RESULT_ACCEPT; @@ -160,7 +161,7 @@ StateNormal_Context::event_refresh_handler(const Smach::event& x) Smach::event_result StateNormal_Context::event_refresh_ducks_handler(const Smach::event& x) { - sinfg::info("STATE NORMAL: Received Refresh Ducks"); + synfig::info("STATE NORMAL: Received Refresh Ducks"); canvas_view->queue_rebuild_ducks(); return Smach::RESULT_ACCEPT; } @@ -168,7 +169,7 @@ StateNormal_Context::event_refresh_ducks_handler(const Smach::event& x) Smach::event_result StateNormal_Context::event_undo_handler(const Smach::event& x) { - sinfg::info("STATE NORMAL: Received Undo Event"); + synfig::info("STATE NORMAL: Received Undo Event"); canvas_view->get_instance()->undo(); return Smach::RESULT_ACCEPT; } @@ -176,7 +177,7 @@ StateNormal_Context::event_undo_handler(const Smach::event& x) Smach::event_result StateNormal_Context::event_redo_handler(const Smach::event& x) { - sinfg::info("STATE NORMAL: Received Redo Event"); + synfig::info("STATE NORMAL: Received Redo Event"); canvas_view->get_instance()->redo(); return Smach::RESULT_ACCEPT; } @@ -184,7 +185,7 @@ StateNormal_Context::event_redo_handler(const Smach::event& x) Smach::event_result StateNormal_Context::event_mouse_button_down_handler(const Smach::event& x) { - sinfg::info("STATE NORMAL: Received mouse button down Event"); + synfig::info("STATE NORMAL: Received mouse button down Event"); const EventMouse& event(*reinterpret_cast(&x)); @@ -205,11 +206,11 @@ StateNormal_Context::event_layer_click(const Smach::event& x) if(event.layer) { - sinfg::info("STATE NORMAL: Received layer click Event, \"%s\"",event.layer->get_name().c_str()); + synfig::info("STATE NORMAL: Received layer click Event, \"%s\"",event.layer->get_name().c_str()); } else { - sinfg::info("STATE NORMAL: Received layer click Event with an empty layer."); + synfig::info("STATE NORMAL: Received layer click Event with an empty layer."); } switch(event.button) @@ -244,7 +245,7 @@ StateNormal_Context::event_layer_click(const Smach::event& x) /* void -StateNormal_Context::edit_several_waypoints(std::list value_desc_list) +StateNormal_Context::edit_several_waypoints(std::list value_desc_list) { Gtk::Dialog dialog( "Edit Multiple Waypoints", // Title @@ -266,12 +267,12 @@ StateNormal_Context::edit_several_waypoints(std::list value if(dialog.run()==0) return; DEBUGPOINT(); - sinfgapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Set Waypoints")); + synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Set Waypoints")); - std::list::iterator iter; + std::list::iterator iter; for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter) { - sinfgapp::ValueDesc value_desc(*iter); + synfigapp::ValueDesc value_desc(*iter); if(!value_desc.is_valid()) continue; @@ -291,17 +292,17 @@ StateNormal_Context::edit_several_waypoints(std::list value value_node=ValueNode_Animated::create(value,get_canvas()->get_time()); - sinfgapp::Action::Handle action; + synfigapp::Action::Handle action; if(!value_desc.is_value_node()) { - action=sinfgapp::Action::create("value_desc_connect"); + action=synfigapp::Action::create("value_desc_connect"); action->set_param("dest",value_desc); action->set_param("src",ValueNode::Handle(value_node)); } else { - action=sinfgapp::Action::create("value_node_replace"); + action=synfigapp::Action::create("value_node_replace"); action->set_param("dest",value_desc.get_value_node()); action->set_param("src",ValueNode::Handle(value_node)); } @@ -327,7 +328,7 @@ StateNormal_Context::edit_several_waypoints(std::list value if(value_node) { - sinfgapp::Action::Handle action(sinfgapp::Action::create("waypoint_set_smart")); + synfigapp::Action::Handle action(synfigapp::Action::create("waypoint_set_smart")); if(!action) { @@ -364,18 +365,18 @@ StateNormal_Context::edit_several_waypoints(std::list value Smach::event_result StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& x) { - sinfg::info("STATE NORMAL: Received multiple duck click event"); + synfig::info("STATE NORMAL: Received multiple duck click event"); //const EventMouse& event(*reinterpret_cast(&x)); - std::list value_desc_list; + std::list value_desc_list; // Create a list of value_descs associated with selection const DuckList selected_ducks(get_work_area()->get_selected_ducks()); DuckList::const_iterator iter; for(iter=selected_ducks.begin();iter!=selected_ducks.end();++iter) { - sinfgapp::ValueDesc value_desc((*iter)->get_value_desc()); + synfigapp::ValueDesc value_desc((*iter)->get_value_desc()); if(!value_desc.is_valid()) continue; @@ -383,7 +384,7 @@ StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& x) if(value_desc.get_value_type()==ValueBase::TYPE_BLINEPOINT && value_desc.is_value_node() && ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node())) { value_desc_list.push_back( - sinfgapp::ValueDesc( + synfigapp::ValueDesc( ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node()) ,0 ) @@ -398,10 +399,10 @@ StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& x) canvas_view->get_instance()->make_param_menu(menu,canvas_view->get_canvas(),value_desc_list); /* - sinfgapp::Action::ParamList param_list; + synfigapp::Action::ParamList param_list; param_list=get_canvas_interface()->generate_param_list(value_desc_list); - canvas_view->add_actions_to_menu(menu, param_list,sinfgapp::Action::CATEGORY_VALUEDESC|sinfgapp::Action::CATEGORY_VALUENODE); + canvas_view->add_actions_to_menu(menu, param_list,synfigapp::Action::CATEGORY_VALUEDESC|synfigapp::Action::CATEGORY_VALUENODE); menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Edit Waypoints"), sigc::bind(