projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor fix
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
state_smoothmove.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp
b/synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp
index
3cda4f8
..
f1f3fdb
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp
@@
-1,20
+1,21
@@
-/* === S
I N F G ==
========================================================= */
+/* === S
Y N F I G
========================================================= */
/*! \file state_smooth_move.cpp
** \brief Template File
**
** $Id: state_smoothmove.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
**
** \legal
/*! \file state_smooth_move.cpp
** \brief Template File
**
** $Id: state_smoothmove.cpp,v 1.1.1.1 2005/01/07 03:34:37 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
*/
/* ========================================================================= */
** \endlegal
*/
/* ========================================================================= */
@@
-31,15
+32,15
@@
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
-#include <s
inf
g/valuenode_dynamiclist.h>
-#include <s
inf
gapp/action_system.h>
+#include <s
ynfi
g/valuenode_dynamiclist.h>
+#include <s
ynfi
gapp/action_system.h>
#include "state_smoothmove.h"
#include "canvasview.h"
#include "workarea.h"
#include "app.h"
#include "state_smoothmove.h"
#include "canvasview.h"
#include "workarea.h"
#include "app.h"
-#include <s
inf
gapp/action.h>
+#include <s
ynfi
gapp/action.h>
#include "event_mouse.h"
#include "event_layerclick.h"
#include "toolbox.h"
#include "event_mouse.h"
#include "event_layerclick.h"
#include "toolbox.h"
@@
-47,7
+48,7
@@
#include <gtkmm/optionmenu.h>
#include "duck.h"
#include "onemoment.h"
#include <gtkmm/optionmenu.h>
#include "duck.h"
#include "onemoment.h"
-#include <s
inf
gapp/main.h>
+#include <s
ynfi
gapp/main.h>
#endif
#endif
@@
-55,7
+56,7
@@
using namespace std;
using namespace etl;
using namespace std;
using namespace etl;
-using namespace s
inf
g;
+using namespace s
ynfi
g;
using namespace studio;
/* === M A C R O S ========================================================= */
using namespace studio;
/* === M A C R O S ========================================================= */
@@
-70,18
+71,18
@@
class DuckDrag_SmoothMove : public DuckDrag_Base
{
float radius;
{
float radius;
- s
inf
g::Vector last_translate_;
- s
inf
g::Vector drag_offset_;
- s
inf
g::Vector snap;
+ s
ynfi
g::Vector last_translate_;
+ s
ynfi
g::Vector drag_offset_;
+ s
ynfi
g::Vector snap;
- std::vector<s
inf
g::Vector> last_;
- std::vector<s
inf
g::Vector> positions;
+ std::vector<s
ynfi
g::Vector> last_;
+ std::vector<s
ynfi
g::Vector> positions;
public:
DuckDrag_SmoothMove();
public:
DuckDrag_SmoothMove();
- void begin_duck_drag(Duckmatic* duckmatic, const s
inf
g::Vector& begin);
+ void begin_duck_drag(Duckmatic* duckmatic, const s
ynfi
g::Vector& begin);
bool end_duck_drag(Duckmatic* duckmatic);
bool end_duck_drag(Duckmatic* duckmatic);
- void duck_drag(Duckmatic* duckmatic, const s
inf
g::Vector& vector);
+ void duck_drag(Duckmatic* duckmatic, const s
ynfi
g::Vector& vector);
void set_radius(float x) { radius=x; }
float get_radius()const { return radius; }
void set_radius(float x) { radius=x; }
float get_radius()const { return radius; }
@@
-94,7
+95,7
@@
class studio::StateSmoothMove_Context : public sigc::trackable
//Duckmatic::Push duckmatic_push;
//Duckmatic::Push duckmatic_push;
- s
inf
gapp::Settings& settings;
+ s
ynfi
gapp::Settings& settings;
etl::handle<DuckDrag_SmoothMove> duck_dragger_;
etl::handle<DuckDrag_SmoothMove> duck_dragger_;
@@
-122,8
+123,8
@@
public:
~StateSmoothMove_Context();
const etl::handle<CanvasView>& get_canvas_view()const{return canvas_view_;}
~StateSmoothMove_Context();
const etl::handle<CanvasView>& get_canvas_view()const{return canvas_view_;}
- etl::handle<s
inf
gapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
- s
inf
g::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
+ etl::handle<s
ynfi
gapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
+ s
ynfi
g::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
void load_settings();
WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
void load_settings();
@@
-162,7
+163,7
@@
StateSmoothMove_Context::save_settings()
StateSmoothMove_Context::StateSmoothMove_Context(CanvasView* canvas_view):
canvas_view_(canvas_view),
// duckmatic_push(get_work_area()),
StateSmoothMove_Context::StateSmoothMove_Context(CanvasView* canvas_view):
canvas_view_(canvas_view),
// duckmatic_push(get_work_area()),
- settings(s
inf
gapp::Main::get_selected_input_device()->settings()),
+ settings(s
ynfi
gapp::Main::get_selected_input_device()->settings()),
duck_dragger_(new DuckDrag_SmoothMove()),
adj_radius(1,0,100000,0.01,0.1),
spin_radius(adj_radius,0.1,3)
duck_dragger_(new DuckDrag_SmoothMove()),
adj_radius(1,0,100000,0.01,0.1),
spin_radius(adj_radius,0.1,3)
@@
-229,7
+230,7
@@
DuckDrag_SmoothMove::DuckDrag_SmoothMove():radius(1.0f)
}
void
}
void
-DuckDrag_SmoothMove::begin_duck_drag(Duckmatic* duckmatic, const s
inf
g::Vector& offset)
+DuckDrag_SmoothMove::begin_duck_drag(Duckmatic* duckmatic, const s
ynfi
g::Vector& offset)
{
last_translate_=Vector(0,0);
drag_offset_=duckmatic->find_duck(offset)->get_trans_point();
{
last_translate_=Vector(0,0);
drag_offset_=duckmatic->find_duck(offset)->get_trans_point();
@@
-251,11
+252,11
@@
DuckDrag_SmoothMove::begin_duck_drag(Duckmatic* duckmatic, const sinfg::Vector&
}
void
}
void
-DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const s
inf
g::Vector& vector)
+DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const s
ynfi
g::Vector& vector)
{
const DuckList selected_ducks(duckmatic->get_selected_ducks());
DuckList::const_iterator iter;
{
const DuckList selected_ducks(duckmatic->get_selected_ducks());
DuckList::const_iterator iter;
- s
inf
g::Vector vect(duckmatic->snap_point_to_grid(vector)-drag_offset_+snap);
+ s
ynfi
g::Vector vect(duckmatic->snap_point_to_grid(vector)-drag_offset_+snap);
int i;
int i;
@@
-292,7
+293,7
@@
DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const sinfg::Vector& vector
bool
DuckDrag_SmoothMove::end_duck_drag(Duckmatic* duckmatic)
{
bool
DuckDrag_SmoothMove::end_duck_drag(Duckmatic* duckmatic)
{
- //s
inf
g::info("end_duck_drag(): Diff= %f",last_translate_.mag());
+ //s
ynfi
g::info("end_duck_drag(): Diff= %f",last_translate_.mag());
if(last_translate_.mag()>0.0001)
{
const DuckList selected_ducks(duckmatic->get_selected_ducks());
if(last_translate_.mag()>0.0001)
{
const DuckList selected_ducks(duckmatic->get_selected_ducks());