X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fgtkmm%2Fwidget_waypointmodel.cpp;h=fcad21999ee4d883adedf9b6e12b72a94f3a288f;hb=a42ee14a3397a3fbb31d14e6eece4236620ae2db;hp=20584f10f8bab2c493dbb2b06c7d72e08ffbfbf0;hpb=7c6d5426922cb3cda793f688dcd4d534b02765c8;p=synfig.git diff --git a/synfig-studio/tags/stable/src/gtkmm/widget_waypointmodel.cpp b/synfig-studio/tags/stable/src/gtkmm/widget_waypointmodel.cpp index 20584f1..fcad219 100644 --- a/synfig-studio/tags/stable/src/gtkmm/widget_waypointmodel.cpp +++ b/synfig-studio/tags/stable/src/gtkmm/widget_waypointmodel.cpp @@ -1,20 +1,21 @@ -/* === S I N F G =========================================================== */ -/*! \file dialog_waypointmodel.cpp +/* === S Y N F I G ========================================================= */ +/*! \file widget_waypointmodel.cpp ** \brief Template Header ** -** $Id: widget_waypointmodel.cpp,v 1.1.1.1 2005/01/07 03:34:37 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 */ /* ========================================================================= */ @@ -39,7 +40,7 @@ #include "widget_waypointmodel.h" #endif -using namespace sinfg; +using namespace synfig; using namespace std; using namespace etl; using namespace studio; @@ -102,7 +103,7 @@ Widget_WaypointModel::Widget_WaypointModel(): checkbutton_continuity.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); checkbutton_bias.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); checkbutton_temporal_tension.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); - + adj_tension.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); adj_continuity.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); adj_bias.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); @@ -110,19 +111,19 @@ Widget_WaypointModel::Widget_WaypointModel(): before->signal_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); after->signal_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); - - attach(checkbutton_before, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + attach(checkbutton_before, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*before, 1, 2, 0,1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_after, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_after, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*after, 3, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_tension, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_tension, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_tension, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_continuity, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_continuity, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_continuity, 3, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_bias, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_bias, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_bias, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_temporal_tension, 2, 3, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_temporal_tension, 2, 3, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_temporal_tension, 3, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); show_all(); @@ -136,7 +137,7 @@ Widget_WaypointModel::on_change() { if(updating) return; - + waypoint_model.set_before((Waypoint::Interpolation)before->get_history()); waypoint_model.set_after((Waypoint::Interpolation)after->get_history()); @@ -151,7 +152,7 @@ Widget_WaypointModel::on_change() waypoint_model.set_continuity_flag(checkbutton_continuity.get_active()); waypoint_model.set_bias_flag(checkbutton_bias.get_active()); waypoint_model.set_temporal_tension_flag(checkbutton_temporal_tension.get_active()); - + before->set_sensitive(checkbutton_before.get_active()); after->set_sensitive(checkbutton_after.get_active()); spin_tension->set_sensitive(checkbutton_tension.get_active()); @@ -161,11 +162,11 @@ Widget_WaypointModel::on_change() } void -Widget_WaypointModel::set_waypoint_model(sinfg::Waypoint::Model &x) +Widget_WaypointModel::set_waypoint_model(synfig::Waypoint::Model &x) { waypoint_model=x; updating=true; - + before->set_history((int)waypoint_model.get_before()); after->set_history((int)waypoint_model.get_after()); @@ -173,15 +174,15 @@ Widget_WaypointModel::set_waypoint_model(sinfg::Waypoint::Model &x) adj_continuity.set_value(waypoint_model.get_continuity()); adj_bias.set_value(waypoint_model.get_bias()); adj_temporal_tension.set_value(waypoint_model.get_temporal_tension()); - + checkbutton_before.set_active(waypoint_model.get_before_flag()); checkbutton_after.set_active(waypoint_model.get_after_flag()); checkbutton_tension.set_active(waypoint_model.get_tension_flag()); checkbutton_continuity.set_active(waypoint_model.get_continuity_flag()); checkbutton_bias.set_active(waypoint_model.get_bias_flag()); checkbutton_temporal_tension.set_active(waypoint_model.get_temporal_tension_flag()); - + updating=false; - + on_change(); }