X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_eyedrop.cpp;h=bafaab0a54043572166b33f49003a80469dd3b0f;hb=a66acbda1399cfa8cb2c3a177f79b98d848ec628;hp=f6f106a605e2eb1aaa4b8e5fe58ab3fd5fbd7423;hpb=3a3c4bca3a17137bec5d7960560934b91ef4146e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_eyedrop.cpp b/synfig-studio/trunk/src/gtkmm/state_eyedrop.cpp index f6f106a..bafaab0 100644 --- a/synfig-studio/trunk/src/gtkmm/state_eyedrop.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_eyedrop.cpp @@ -1,20 +1,21 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file state_eyedrop.cpp ** \brief Template File ** -** $Id: state_eyedrop.cpp,v 1.1.1.1 2005/01/07 03:34:36 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 */ /* ========================================================================= */ @@ -30,14 +31,14 @@ #include "state_eyedrop.h" #include "workarea.h" -#include +#include #include "app.h" #include "dialog_color.h" #include "event_mouse.h" #include "event_layerclick.h" #include "toolbox.h" #include "canvasview.h" -#include +#include #endif @@ -45,7 +46,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::StateEyedrop_Context public: StateEyedrop_Context(CanvasView *canvas_view); ~StateEyedrop_Context(); - + Smach::event_result event_stop_handler(const Smach::event& x); Smach::event_result event_refresh_handler(const Smach::event& x); @@ -84,7 +85,7 @@ StateEyedrop::StateEyedrop(): insert(event_def(EVENT_STOP,&StateEyedrop_Context::event_stop_handler)); insert(event_def(EVENT_REFRESH,&StateEyedrop_Context::event_refresh_handler)); insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateEyedrop_Context::event_workarea_mouse_button_down_handler)); -} +} StateEyedrop::~StateEyedrop() { @@ -94,32 +95,32 @@ StateEyedrop_Context::StateEyedrop_Context(CanvasView *canvas_view): canvas_view(canvas_view), is_working(*canvas_view) { - sinfg::info("Enterted Eyedrop State"); + synfig::info("Entered Eyedrop State"); canvas_view->work_area->set_cursor(Gdk::Cursor(Gdk::CROSSHAIR)); - + App::toolbox->refresh(); } StateEyedrop_Context::~StateEyedrop_Context() { - sinfg::info("Left Eyedrop State"); + synfig::info("Left Eyedrop State"); canvas_view->work_area->reset_cursor(); App::toolbox->refresh(); } Smach::event_result -StateEyedrop_Context::event_stop_handler(const Smach::event& x) +StateEyedrop_Context::event_stop_handler(const Smach::event& /*x*/) { - sinfg::info("STATE EYEDROP: Received Stop Event"); + synfig::info("STATE EYEDROP: Received Stop Event"); throw Smach::egress_exception(); // canvas_view->get_smach().pop_state(); // return Smach::RESULT_ACCEPT; } Smach::event_result -StateEyedrop_Context::event_refresh_handler(const Smach::event& x) +StateEyedrop_Context::event_refresh_handler(const Smach::event& /*x*/) { - sinfg::info("STATE EYEDROP: Received Refresh Event"); + synfig::info("STATE EYEDROP: Received Refresh Event"); canvas_view->work_area->queue_render_preview(); return Smach::RESULT_ACCEPT; } @@ -127,12 +128,12 @@ StateEyedrop_Context::event_refresh_handler(const Smach::event& x) Smach::event_result StateEyedrop_Context::event_workarea_mouse_button_down_handler(const Smach::event& x) { - sinfg::info("STATE EYEDROP: Received mouse button down Event"); + synfig::info("STATE EYEDROP: Received mouse button down Event"); const EventMouse& event(*reinterpret_cast(&x)); if(event.button==BUTTON_LEFT) { Color color(canvas_view->get_canvas()->get_context().get_color(event.pos)); - sinfgapp::Main::set_foreground_color(color); + synfigapp::Main::set_foreground_color(color); studio::App::dialog_color->set_color(color); return Smach::RESULT_ACCEPT; }