toolbox.h \
valuelink.h \
workarea.h \
- zoomdial.h \
- framedial.h \
- keyframedial.h \
- toggleducksdial.h \
- resolutiondial.h
+ dials/zoomdial.h \
+ dials/framedial.h \
+ dials/keyframedial.h \
+ dials/toggleducksdial.h \
+ dials/resolutiondial.h
OTHER_CC = \
main.cpp \
toolbox.cpp \
valuelink.cpp \
workarea.cpp \
- zoomdial.cpp \
- framedial.cpp \
- keyframedial.cpp \
- toggleducksdial.cpp \
- resolutiondial.cpp
+ dials/zoomdial.cpp \
+ dials/framedial.cpp \
+ dials/keyframedial.cpp \
+ dials/toggleducksdial.cpp \
+ dials/resolutiondial.cpp
INCLUDES = \
-I$(top_srcdir)/src
#include "preview.h"
#include "audiocontainer.h"
#include "widgets/widget_timeslider.h"
-#include "keyframedial.h"
+#include "dials/keyframedial.h"
#include <synfigapp/main.h>
#include <synfigapp/inputdevice.h>
#include "dialogs/dialog_waypoint.h"
#include "dialogs/dialog_keyframe.h"
-#include "framedial.h"
-#include "toggleducksdial.h"
-#include "resolutiondial.h"
+#include "dials/framedial.h"
+#include "dials/toggleducksdial.h"
+#include "dials/resolutiondial.h"
#include "widgets/widget_keyframe_list.h"
#include "duckmatic.h"
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file framedial.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos López
+**
+** 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 <config.h>
+#endif
+
+#include "framedial.h"
+#include <gtkmm/image.h>
+#include <gtkmm/stock.h>
+
+#endif
+
+/* === U S I N G =========================================================== */
+
+using namespace std;
+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 ======================================================= */
+
+FrameDial::FrameDial(): Gtk::Table(5, 1, false)
+{
+ Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon");
+
+ seek_begin = create_icon(iconsize, Gtk::Stock::MEDIA_PREVIOUS,
+ _("Seek to Begin"));
+ seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND,
+ _("Previous Frame"));
+ play_stop = create_icon(iconsize, Gtk::Stock::MEDIA_PLAY,
+ _("Play"));
+ seek_next_frame = create_icon(iconsize, Gtk::Stock::MEDIA_FORWARD,
+ _("Next Frame"));
+ seek_end = create_icon(iconsize, Gtk::Stock::MEDIA_NEXT,
+ _("Seek to End"));
+
+ attach(*seek_begin, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*seek_prev_frame, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*play_stop, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*seek_next_frame, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*seek_end, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+}
+
+Gtk::Button *
+FrameDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
+ const char * tooltip)
+{
+ Gtk::Button *button = manage(new class Gtk::Button());
+ Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
+ button->add(*icon);
+ tooltips.set_tip(*button, tooltip);
+ icon->set_padding(0, 0);
+ icon->show();
+ button->set_relief(Gtk::RELIEF_NONE);
+ button->show();
+
+ return button;
+}
+
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file zoomdial.h
+** \brief Template Header
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos López
+**
+** 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
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_STUDIO_FRAMEDIAL_H
+#define __SYNFIG_STUDIO_FRAMEDIAL_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <gtkmm/tooltips.h>
+#include <gtkmm/table.h>
+#include <gtkmm/button.h>
+
+#include "general.h"
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace studio
+{
+
+class FrameDial : public Gtk::Table
+{
+ Gtk::Tooltips tooltips;
+
+ Gtk::Button *seek_begin;
+ Gtk::Button *seek_prev_frame;
+ Gtk::Button *play_stop;
+ Gtk::Button *seek_next_frame;
+ Gtk::Button *seek_end;
+
+ Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
+ const char * tooltip);
+
+public:
+ FrameDial();
+
+ Glib::SignalProxy0<void> signal_seek_begin() { return seek_begin->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_seek_prev_frame() { return seek_prev_frame->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_play_stop() { return play_stop->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_seek_next_frame() { return seek_next_frame->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_seek_end() { return seek_end->signal_clicked(); }
+
+ Gtk::Button *get_play_button() { return play_stop; }
+
+}; // END of class FrameDial
+
+}; // END of namespace studio
+
+
+/* === E N D =============================================================== */
+
+#endif
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file keyframedial.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos Lopez
+**
+** 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 <config.h>
+#endif
+
+#include "keyframedial.h"
+#include <gtkmm/image.h>
+#include <gtkmm/stock.h>
+
+#endif
+
+/* === U S I N G =========================================================== */
+
+using namespace std;
+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 ======================================================= */
+
+KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 3, false)
+{
+ Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon");
+
+ seek_prev_keyframe = create_icon(iconsize, Gtk::Stock::GO_BACK, _("Previous KeyFrame"));
+ seek_next_keyframe = create_icon(iconsize, Gtk::Stock::GO_FORWARD, _("Next KeyFrame"));
+ lock_keyframe = create_icon(Gtk::ICON_SIZE_BUTTON, "synfig-keyframe_lock_all",_("All Keyframes Locked"));
+
+ attach(*seek_prev_keyframe, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*seek_next_keyframe, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*lock_keyframe, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+}
+
+Gtk::Button *
+KeyFrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid,
+ const char * tooltip)
+{
+ Gtk::Button *button = manage(new class Gtk::Button());
+ Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize));
+ button->add(*icon);
+ tooltips.set_tip(*button, tooltip);
+ icon->set_padding(0, 0);
+ icon->show();
+ button->set_relief(Gtk::RELIEF_NONE);
+ button->show();
+
+ return button;
+}
+
+Gtk::Button *
+KeyFrameDial::create_icon(Gtk::IconSize iconsize, const Gtk::BuiltinStockID & stockid,
+ const char * tooltip)
+{
+ Gtk::Button *button = manage(new class Gtk::Button());
+ Gtk::Image *icon = manage(new Gtk::Image(stockid, iconsize));
+ button->add(*icon);
+ tooltips.set_tip(*button, tooltip);
+ icon->set_padding(0, 0);
+ icon->show();
+ button->set_relief(Gtk::RELIEF_NONE);
+ button->show();
+
+ return button;
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file keyframedial.h
+** \brief Template Header
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos Lopez
+**
+** 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
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_STUDIO_KEYFRAMEDIAL_H
+#define __SYNFIG_STUDIO_KEYFRAMEDIAL_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <gtkmm/tooltips.h>
+#include <gtkmm/table.h>
+#include <gtkmm/button.h>
+
+#include "general.h"
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace studio
+{
+
+class KeyFrameDial : public Gtk::Table
+{
+ Gtk::Tooltips tooltips;
+
+ Gtk::Button *seek_prev_keyframe;
+ Gtk::Button *seek_next_keyframe;
+ Gtk::Button *lock_keyframe;
+
+ Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip);
+ Gtk::Button *create_icon(Gtk::IconSize iconsize, const Gtk::BuiltinStockID & stockid, const char * tooltip);
+
+public:
+
+ KeyFrameDial();
+ Glib::SignalProxy0<void> signal_seek_prev_keyframe() { return seek_prev_keyframe->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_seek_next_keyframe() { return seek_next_keyframe->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_lock_keyframe() { return lock_keyframe->signal_clicked(); }
+ Gtk::Button *get_lock_button() { return lock_keyframe; }
+
+}; // END of class KeyFrameDial
+
+}; // END of namespace studio
+
+
+/* === E N D =============================================================== */
+
+#endif
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file resolutiondial.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos Lopez
+**
+** 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 <config.h>
+#endif
+
+#include "resolutiondial.h"
+#include <gtkmm/image.h>
+#include <gtkmm/stock.h>
+
+#endif
+
+/* === U S I N G =========================================================== */
+
+using namespace std;
+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 ======================================================= */
+
+ResolutionDial::ResolutionDial(Gtk::IconSize & size): Gtk::Table(3, 1, false)
+{
+
+ increase_resolution = create_icon(size, Gtk::StockID("synfig-increase_resolution"), _("Increase Display Resolution"));
+ decrease_resolution = create_icon(size, Gtk::StockID("synfig-decrease_resolution"), _("Decrease Display Resolution"));
+ use_low_resolution = create_check(_("Low Res"), _("Use Low Resolution when enabled"));
+
+ attach(*decrease_resolution, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*use_low_resolution, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*increase_resolution, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+}
+
+Gtk::Button *
+ResolutionDial::create_icon(Gtk::IconSize size, const Gtk::StockID & stockid,
+ const char * tooltip)
+{
+ Gtk::Button *button = manage(new class Gtk::Button());
+ Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
+ button->add(*icon);
+ tooltips.set_tip(*button, tooltip);
+ icon->set_padding(0, 0);
+ icon->show();
+ button->set_relief(Gtk::RELIEF_NONE);
+ button->show();
+
+ return button;
+}
+
+Gtk::CheckButton *
+ResolutionDial::create_check(const char *label, const char * tooltip)
+{
+ Gtk::CheckButton *cbutton = manage(new class Gtk::CheckButton());
+ cbutton->set_label(label);
+ tooltips.set_tip(*cbutton, tooltip);
+ cbutton->show();
+
+ return cbutton;
+}
+
+void
+ResolutionDial::update_lowres(bool flag)
+{
+ use_low_resolution->set_active(flag);
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file resolutiondial.h
+** \brief Template Header
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos Lopez
+**
+** 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
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_STUDIO_RESOLUTIONDIAL_H
+#define __SYNFIG_STUDIO_RESOLUTIONDIAL_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <gtkmm/tooltips.h>
+#include <gtkmm/table.h>
+#include <gtkmm/checkbutton.h>
+#include "duckmatic.h"
+
+#include "general.h"
+
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace studio
+{
+
+class ResolutionDial : public Gtk::Table
+{
+ Gtk::Tooltips tooltips;
+
+ Gtk::Button *increase_resolution;
+ Gtk::Button *decrease_resolution;
+ Gtk::CheckButton *use_low_resolution;
+
+ Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::StockID & stockid, const char * tooltip);
+ Gtk::CheckButton *create_check(const char *text, const char *tooltip);
+
+public:
+
+ ResolutionDial(Gtk::IconSize & size);
+
+ void update_lowres(bool flag);
+ Glib::SignalProxy0<void> signal_increase_resolution() { return increase_resolution->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_decrease_resolution() { return decrease_resolution->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_use_low_resolution() { return use_low_resolution-> signal_toggled(); }
+
+}; // END of class ResolutionDial
+
+}; // END of namespace studio
+
+
+/* === E N D =============================================================== */
+
+#endif
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file toggleducksdial.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos Lopez
+**
+** 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 <config.h>
+#endif
+
+#include "toggleducksdial.h"
+#include <gtkmm/image.h>
+#include <gtkmm/stock.h>
+
+#endif
+
+/* === U S I N G =========================================================== */
+
+using namespace std;
+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 ======================================================= */
+
+ToggleDucksDial::ToggleDucksDial(Gtk::IconSize & size): Gtk::Table(1, 6, false)
+{
+ ducks_position = create_label_button(size, "synfig-toggle_duck_position", _("Toggle position ducks"));
+ ducks_vertex = create_label_button(size, "synfig-toggle_duck_vertex", _("Toggle vertex ducks"));
+ ducks_tangent = create_label_button(size, "synfig-toggle_duck_tangent", _("Toggle tangent ducks"));
+ ducks_radius = create_label_button(size, "synfig-toggle_duck_radius", _("Toggle radius ducks"));
+ ducks_width = create_label_button(size, "synfig-toggle_duck_width", _("Toggle width ducks"));
+ ducks_angle = create_label_button(size, "synfig-toggle_duck_angle", _("Toggle angle ducks"));
+
+ attach(*ducks_position, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*ducks_vertex, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*ducks_tangent, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*ducks_radius, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*ducks_width, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*ducks_angle, 5, 6, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+}
+
+Gtk::ToggleButton *
+ToggleDucksDial::create_label_button(Gtk::IconSize iconsize, const char *stockid,
+ const char * tooltip)
+{
+ Gtk::ToggleButton *tbutton = manage(new class Gtk::ToggleButton());
+ Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize));
+ tooltips.set_tip(*tbutton, tooltip);
+ tbutton->add(*icon);
+ icon->set_padding(0, 0);
+ icon->show();
+ tbutton->set_relief(Gtk::RELIEF_NONE);
+ tbutton->show();
+
+ return tbutton;
+}
+
+void
+ToggleDucksDial::update_toggles(Duck::Type mask)
+{
+ ducks_position-> set_active((mask & Duck::TYPE_POSITION));
+ ducks_vertex -> set_active((mask & Duck::TYPE_VERTEX));
+ ducks_tangent -> set_active((mask & Duck::TYPE_TANGENT));
+ ducks_radius -> set_active((mask & Duck::TYPE_RADIUS));
+ ducks_width -> set_active((mask & Duck::TYPE_WIDTH));
+ ducks_angle -> set_active((mask & Duck::TYPE_ANGLE));
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file toggleducksdial.h
+** \brief Template Header
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos Lopez
+**
+** 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
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_STUDIO_TOOGLEDUCKSDIAL_H
+#define __SYNFIG_STUDIO_TOOGLEDUCKSDIAL_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <gtkmm/tooltips.h>
+#include <gtkmm/table.h>
+#include <gtkmm/togglebutton.h>
+#include "duckmatic.h"
+
+#include "general.h"
+
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace studio
+{
+
+class ToggleDucksDial : public Gtk::Table
+{
+ Gtk::Tooltips tooltips;
+
+ Gtk::ToggleButton *ducks_position;
+ Gtk::ToggleButton *ducks_vertex;
+ Gtk::ToggleButton *ducks_tangent;
+ Gtk::ToggleButton *ducks_radius;
+ Gtk::ToggleButton *ducks_width;
+ Gtk::ToggleButton *ducks_angle;
+
+ Gtk::ToggleButton *create_label_button(Gtk::IconSize iconsize, const char * stockid, const char * tooltip);
+
+public:
+
+ ToggleDucksDial(Gtk::IconSize & size);
+ void update_toggles(Duck::Type mask);
+ Glib::SignalProxy0<void> signal_ducks_position() { return ducks_position->signal_toggled(); }
+ Glib::SignalProxy0<void> signal_ducks_vertex() { return ducks_vertex-> signal_toggled(); }
+ Glib::SignalProxy0<void> signal_ducks_tangent() { return ducks_tangent-> signal_toggled(); }
+ Glib::SignalProxy0<void> signal_ducks_radius() { return ducks_radius-> signal_toggled(); }
+ Glib::SignalProxy0<void> signal_ducks_width() { return ducks_width-> signal_toggled(); }
+ Glib::SignalProxy0<void> signal_ducks_angle() { return ducks_angle-> signal_toggled(); }
+
+}; // END of class ToggleDucksDial
+
+}; // END of namespace studio
+
+
+/* === E N D =============================================================== */
+
+#endif
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file zoomdial.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \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 <config.h>
+#endif
+
+#include "zoomdial.h"
+#include <gtkmm/image.h>
+#include <gtkmm/stock.h>
+
+#include "general.h"
+
+#endif
+
+/* === U S I N G =========================================================== */
+
+using namespace std;
+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 ======================================================= */
+
+ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false)
+{
+ zoom_in = create_icon(size, Gtk::Stock::ZOOM_IN, _("Zoom In"));
+ zoom_out = create_icon(size, Gtk::Stock::ZOOM_OUT, _("Zoom Out"));
+ zoom_fit = create_icon(size, Gtk::Stock::ZOOM_FIT, _("Zoom to Fit"));
+ zoom_norm = create_icon(size, Gtk::Stock::ZOOM_100, _("Zoom to 100%"));
+
+ attach(*zoom_out, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*zoom_norm, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*zoom_fit, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ attach(*zoom_in, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+}
+
+Gtk::Button *
+ZoomDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
+ const char * tooltip)
+{
+ Gtk::Button *button = manage(new class Gtk::Button());
+ Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
+ button->add(*icon);
+ tooltips.set_tip(*button, tooltip);
+ icon->set_padding(0, 0);
+ icon->show();
+ button->set_relief(Gtk::RELIEF_NONE);
+ button->show();
+
+ return button;
+}
+
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file zoomdial.h
+** \brief Template Header
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
+**
+** 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
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_STUDIO_ZOOMDIAL_H
+#define __SYNFIG_STUDIO_ZOOMDIAL_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <gtkmm/tooltips.h>
+#include <gtkmm/table.h>
+#include <gtkmm/button.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace studio
+{
+
+class ZoomDial : public Gtk::Table
+{
+ Gtk::Tooltips tooltips;
+
+ Gtk::Button *zoom_in;
+ Gtk::Button *zoom_out;
+ Gtk::Button *zoom_fit;
+ Gtk::Button *zoom_norm;
+
+ Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
+ const char * tooltip);
+
+public:
+ ZoomDial(Gtk::IconSize &size);
+
+ Glib::SignalProxy0<void> signal_zoom_in() { return zoom_in->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_zoom_out() { return zoom_out->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_zoom_fit() { return zoom_fit->signal_clicked(); }
+ Glib::SignalProxy0<void> signal_zoom_norm() { return zoom_norm->signal_clicked(); }
+
+}; // END of class ZoomDial
+
+}; // END of namespace studio
+
+/* === E N D =============================================================== */
+
+#endif
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file framedial.cpp
-** \brief Template File
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 Chris Moore
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos López
-**
-** 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 <config.h>
-#endif
-
-#include "framedial.h"
-#include <gtkmm/image.h>
-#include <gtkmm/stock.h>
-
-#endif
-
-/* === U S I N G =========================================================== */
-
-using namespace std;
-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 ======================================================= */
-
-FrameDial::FrameDial(): Gtk::Table(5, 1, false)
-{
- Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon");
-
- seek_begin = create_icon(iconsize, Gtk::Stock::MEDIA_PREVIOUS,
- _("Seek to Begin"));
- seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND,
- _("Previous Frame"));
- play_stop = create_icon(iconsize, Gtk::Stock::MEDIA_PLAY,
- _("Play"));
- seek_next_frame = create_icon(iconsize, Gtk::Stock::MEDIA_FORWARD,
- _("Next Frame"));
- seek_end = create_icon(iconsize, Gtk::Stock::MEDIA_NEXT,
- _("Seek to End"));
-
- attach(*seek_begin, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*seek_prev_frame, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*play_stop, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*seek_next_frame, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*seek_end, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-}
-
-Gtk::Button *
-FrameDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
- const char * tooltip)
-{
- Gtk::Button *button = manage(new class Gtk::Button());
- Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
- button->add(*icon);
- tooltips.set_tip(*button, tooltip);
- icon->set_padding(0, 0);
- icon->show();
- button->set_relief(Gtk::RELIEF_NONE);
- button->show();
-
- return button;
-}
-
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file zoomdial.h
-** \brief Template Header
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 Chris Moore
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos López
-**
-** 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
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SYNFIG_STUDIO_FRAMEDIAL_H
-#define __SYNFIG_STUDIO_FRAMEDIAL_H
-
-/* === H E A D E R S ======================================================= */
-
-#include <gtkmm/tooltips.h>
-#include <gtkmm/table.h>
-#include <gtkmm/button.h>
-
-#include "general.h"
-
-/* === M A C R O S ========================================================= */
-
-/* === T Y P E D E F S ===================================================== */
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-namespace studio
-{
-
-class FrameDial : public Gtk::Table
-{
- Gtk::Tooltips tooltips;
-
- Gtk::Button *seek_begin;
- Gtk::Button *seek_prev_frame;
- Gtk::Button *play_stop;
- Gtk::Button *seek_next_frame;
- Gtk::Button *seek_end;
-
- Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
- const char * tooltip);
-
-public:
- FrameDial();
-
- Glib::SignalProxy0<void> signal_seek_begin() { return seek_begin->signal_clicked(); }
- Glib::SignalProxy0<void> signal_seek_prev_frame() { return seek_prev_frame->signal_clicked(); }
- Glib::SignalProxy0<void> signal_play_stop() { return play_stop->signal_clicked(); }
- Glib::SignalProxy0<void> signal_seek_next_frame() { return seek_next_frame->signal_clicked(); }
- Glib::SignalProxy0<void> signal_seek_end() { return seek_end->signal_clicked(); }
-
- Gtk::Button *get_play_button() { return play_stop; }
-
-}; // END of class FrameDial
-
-}; // END of namespace studio
-
-
-/* === E N D =============================================================== */
-
-#endif
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file keyframedial.cpp
-** \brief Template File
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos Lopez
-**
-** 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 <config.h>
-#endif
-
-#include "keyframedial.h"
-#include <gtkmm/image.h>
-#include <gtkmm/stock.h>
-
-#endif
-
-/* === U S I N G =========================================================== */
-
-using namespace std;
-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 ======================================================= */
-
-KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 3, false)
-{
- Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon");
-
- seek_prev_keyframe = create_icon(iconsize, Gtk::Stock::GO_BACK, _("Previous KeyFrame"));
- seek_next_keyframe = create_icon(iconsize, Gtk::Stock::GO_FORWARD, _("Next KeyFrame"));
- lock_keyframe = create_icon(Gtk::ICON_SIZE_BUTTON, "synfig-keyframe_lock_all",_("All Keyframes Locked"));
-
- attach(*seek_prev_keyframe, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*seek_next_keyframe, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*lock_keyframe, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-}
-
-Gtk::Button *
-KeyFrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid,
- const char * tooltip)
-{
- Gtk::Button *button = manage(new class Gtk::Button());
- Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize));
- button->add(*icon);
- tooltips.set_tip(*button, tooltip);
- icon->set_padding(0, 0);
- icon->show();
- button->set_relief(Gtk::RELIEF_NONE);
- button->show();
-
- return button;
-}
-
-Gtk::Button *
-KeyFrameDial::create_icon(Gtk::IconSize iconsize, const Gtk::BuiltinStockID & stockid,
- const char * tooltip)
-{
- Gtk::Button *button = manage(new class Gtk::Button());
- Gtk::Image *icon = manage(new Gtk::Image(stockid, iconsize));
- button->add(*icon);
- tooltips.set_tip(*button, tooltip);
- icon->set_padding(0, 0);
- icon->show();
- button->set_relief(Gtk::RELIEF_NONE);
- button->show();
-
- return button;
-}
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file keyframedial.h
-** \brief Template Header
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 Chris Moore
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos Lopez
-**
-** 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
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SYNFIG_STUDIO_KEYFRAMEDIAL_H
-#define __SYNFIG_STUDIO_KEYFRAMEDIAL_H
-
-/* === H E A D E R S ======================================================= */
-
-#include <gtkmm/tooltips.h>
-#include <gtkmm/table.h>
-#include <gtkmm/button.h>
-
-#include "general.h"
-
-/* === M A C R O S ========================================================= */
-
-/* === T Y P E D E F S ===================================================== */
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-namespace studio
-{
-
-class KeyFrameDial : public Gtk::Table
-{
- Gtk::Tooltips tooltips;
-
- Gtk::Button *seek_prev_keyframe;
- Gtk::Button *seek_next_keyframe;
- Gtk::Button *lock_keyframe;
-
- Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip);
- Gtk::Button *create_icon(Gtk::IconSize iconsize, const Gtk::BuiltinStockID & stockid, const char * tooltip);
-
-public:
-
- KeyFrameDial();
- Glib::SignalProxy0<void> signal_seek_prev_keyframe() { return seek_prev_keyframe->signal_clicked(); }
- Glib::SignalProxy0<void> signal_seek_next_keyframe() { return seek_next_keyframe->signal_clicked(); }
- Glib::SignalProxy0<void> signal_lock_keyframe() { return lock_keyframe->signal_clicked(); }
- Gtk::Button *get_lock_button() { return lock_keyframe; }
-
-}; // END of class KeyFrameDial
-
-}; // END of namespace studio
-
-
-/* === E N D =============================================================== */
-
-#endif
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file resolutiondial.cpp
-** \brief Template File
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos Lopez
-**
-** 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 <config.h>
-#endif
-
-#include "resolutiondial.h"
-#include <gtkmm/image.h>
-#include <gtkmm/stock.h>
-
-#endif
-
-/* === U S I N G =========================================================== */
-
-using namespace std;
-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 ======================================================= */
-
-ResolutionDial::ResolutionDial(Gtk::IconSize & size): Gtk::Table(3, 1, false)
-{
-
- increase_resolution = create_icon(size, Gtk::StockID("synfig-increase_resolution"), _("Increase Display Resolution"));
- decrease_resolution = create_icon(size, Gtk::StockID("synfig-decrease_resolution"), _("Decrease Display Resolution"));
- use_low_resolution = create_check(_("Low Res"), _("Use Low Resolution when enabled"));
-
- attach(*decrease_resolution, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*use_low_resolution, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*increase_resolution, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-}
-
-Gtk::Button *
-ResolutionDial::create_icon(Gtk::IconSize size, const Gtk::StockID & stockid,
- const char * tooltip)
-{
- Gtk::Button *button = manage(new class Gtk::Button());
- Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
- button->add(*icon);
- tooltips.set_tip(*button, tooltip);
- icon->set_padding(0, 0);
- icon->show();
- button->set_relief(Gtk::RELIEF_NONE);
- button->show();
-
- return button;
-}
-
-Gtk::CheckButton *
-ResolutionDial::create_check(const char *label, const char * tooltip)
-{
- Gtk::CheckButton *cbutton = manage(new class Gtk::CheckButton());
- cbutton->set_label(label);
- tooltips.set_tip(*cbutton, tooltip);
- cbutton->show();
-
- return cbutton;
-}
-
-void
-ResolutionDial::update_lowres(bool flag)
-{
- use_low_resolution->set_active(flag);
-}
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file resolutiondial.h
-** \brief Template Header
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 Chris Moore
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos Lopez
-**
-** 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
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SYNFIG_STUDIO_RESOLUTIONDIAL_H
-#define __SYNFIG_STUDIO_RESOLUTIONDIAL_H
-
-/* === H E A D E R S ======================================================= */
-
-#include <gtkmm/tooltips.h>
-#include <gtkmm/table.h>
-#include <gtkmm/checkbutton.h>
-#include "duckmatic.h"
-
-#include "general.h"
-
-
-/* === M A C R O S ========================================================= */
-
-/* === T Y P E D E F S ===================================================== */
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-namespace studio
-{
-
-class ResolutionDial : public Gtk::Table
-{
- Gtk::Tooltips tooltips;
-
- Gtk::Button *increase_resolution;
- Gtk::Button *decrease_resolution;
- Gtk::CheckButton *use_low_resolution;
-
- Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::StockID & stockid, const char * tooltip);
- Gtk::CheckButton *create_check(const char *text, const char *tooltip);
-
-public:
-
- ResolutionDial(Gtk::IconSize & size);
-
- void update_lowres(bool flag);
- Glib::SignalProxy0<void> signal_increase_resolution() { return increase_resolution->signal_clicked(); }
- Glib::SignalProxy0<void> signal_decrease_resolution() { return decrease_resolution->signal_clicked(); }
- Glib::SignalProxy0<void> signal_use_low_resolution() { return use_low_resolution-> signal_toggled(); }
-
-}; // END of class ResolutionDial
-
-}; // END of namespace studio
-
-
-/* === E N D =============================================================== */
-
-#endif
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file toggleducksdial.cpp
-** \brief Template File
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos Lopez
-**
-** 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 <config.h>
-#endif
-
-#include "toggleducksdial.h"
-#include <gtkmm/image.h>
-#include <gtkmm/stock.h>
-
-#endif
-
-/* === U S I N G =========================================================== */
-
-using namespace std;
-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 ======================================================= */
-
-ToggleDucksDial::ToggleDucksDial(Gtk::IconSize & size): Gtk::Table(1, 6, false)
-{
- ducks_position = create_label_button(size, "synfig-toggle_duck_position", _("Toggle position ducks"));
- ducks_vertex = create_label_button(size, "synfig-toggle_duck_vertex", _("Toggle vertex ducks"));
- ducks_tangent = create_label_button(size, "synfig-toggle_duck_tangent", _("Toggle tangent ducks"));
- ducks_radius = create_label_button(size, "synfig-toggle_duck_radius", _("Toggle radius ducks"));
- ducks_width = create_label_button(size, "synfig-toggle_duck_width", _("Toggle width ducks"));
- ducks_angle = create_label_button(size, "synfig-toggle_duck_angle", _("Toggle angle ducks"));
-
- attach(*ducks_position, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*ducks_vertex, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*ducks_tangent, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*ducks_radius, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*ducks_width, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*ducks_angle, 5, 6, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-}
-
-Gtk::ToggleButton *
-ToggleDucksDial::create_label_button(Gtk::IconSize iconsize, const char *stockid,
- const char * tooltip)
-{
- Gtk::ToggleButton *tbutton = manage(new class Gtk::ToggleButton());
- Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize));
- tooltips.set_tip(*tbutton, tooltip);
- tbutton->add(*icon);
- icon->set_padding(0, 0);
- icon->show();
- tbutton->set_relief(Gtk::RELIEF_NONE);
- tbutton->show();
-
- return tbutton;
-}
-
-void
-ToggleDucksDial::update_toggles(Duck::Type mask)
-{
- ducks_position-> set_active((mask & Duck::TYPE_POSITION));
- ducks_vertex -> set_active((mask & Duck::TYPE_VERTEX));
- ducks_tangent -> set_active((mask & Duck::TYPE_TANGENT));
- ducks_radius -> set_active((mask & Duck::TYPE_RADIUS));
- ducks_width -> set_active((mask & Duck::TYPE_WIDTH));
- ducks_angle -> set_active((mask & Duck::TYPE_ANGLE));
-}
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file toggleducksdial.h
-** \brief Template Header
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 Chris Moore
-** Copyright (c) 2009 Gerco Ballintijn
-** Copyright (c) 2009 Carlos Lopez
-**
-** 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
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SYNFIG_STUDIO_TOOGLEDUCKSDIAL_H
-#define __SYNFIG_STUDIO_TOOGLEDUCKSDIAL_H
-
-/* === H E A D E R S ======================================================= */
-
-#include <gtkmm/tooltips.h>
-#include <gtkmm/table.h>
-#include <gtkmm/togglebutton.h>
-#include "duckmatic.h"
-
-#include "general.h"
-
-
-/* === M A C R O S ========================================================= */
-
-/* === T Y P E D E F S ===================================================== */
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-namespace studio
-{
-
-class ToggleDucksDial : public Gtk::Table
-{
- Gtk::Tooltips tooltips;
-
- Gtk::ToggleButton *ducks_position;
- Gtk::ToggleButton *ducks_vertex;
- Gtk::ToggleButton *ducks_tangent;
- Gtk::ToggleButton *ducks_radius;
- Gtk::ToggleButton *ducks_width;
- Gtk::ToggleButton *ducks_angle;
-
- Gtk::ToggleButton *create_label_button(Gtk::IconSize iconsize, const char * stockid, const char * tooltip);
-
-public:
-
- ToggleDucksDial(Gtk::IconSize & size);
- void update_toggles(Duck::Type mask);
- Glib::SignalProxy0<void> signal_ducks_position() { return ducks_position->signal_toggled(); }
- Glib::SignalProxy0<void> signal_ducks_vertex() { return ducks_vertex-> signal_toggled(); }
- Glib::SignalProxy0<void> signal_ducks_tangent() { return ducks_tangent-> signal_toggled(); }
- Glib::SignalProxy0<void> signal_ducks_radius() { return ducks_radius-> signal_toggled(); }
- Glib::SignalProxy0<void> signal_ducks_width() { return ducks_width-> signal_toggled(); }
- Glib::SignalProxy0<void> signal_ducks_angle() { return ducks_angle-> signal_toggled(); }
-
-}; // END of class ToggleDucksDial
-
-}; // END of namespace studio
-
-
-/* === E N D =============================================================== */
-
-#endif
#include <synfig/renddesc.h>
#include <synfig/canvas.h>
-#include "zoomdial.h"
+#include "dials/zoomdial.h"
#include "duckmatic.h"
#include "instance.h"
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file zoomdial.cpp
-** \brief Template File
-**
-** $Id$
-**
-** \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 <config.h>
-#endif
-
-#include "zoomdial.h"
-#include <gtkmm/image.h>
-#include <gtkmm/stock.h>
-
-#include "general.h"
-
-#endif
-
-/* === U S I N G =========================================================== */
-
-using namespace std;
-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 ======================================================= */
-
-ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false)
-{
- zoom_in = create_icon(size, Gtk::Stock::ZOOM_IN, _("Zoom In"));
- zoom_out = create_icon(size, Gtk::Stock::ZOOM_OUT, _("Zoom Out"));
- zoom_fit = create_icon(size, Gtk::Stock::ZOOM_FIT, _("Zoom to Fit"));
- zoom_norm = create_icon(size, Gtk::Stock::ZOOM_100, _("Zoom to 100%"));
-
- attach(*zoom_out, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*zoom_norm, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*zoom_fit, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- attach(*zoom_in, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-}
-
-Gtk::Button *
-ZoomDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
- const char * tooltip)
-{
- Gtk::Button *button = manage(new class Gtk::Button());
- Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
- button->add(*icon);
- tooltips.set_tip(*button, tooltip);
- icon->set_padding(0, 0);
- icon->show();
- button->set_relief(Gtk::RELIEF_NONE);
- button->show();
-
- return button;
-}
-
+++ /dev/null
-/* === S Y N F I G ========================================================= */
-/*! \file zoomdial.h
-** \brief Template Header
-**
-** $Id$
-**
-** \legal
-** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2008 Chris Moore
-**
-** 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
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SYNFIG_STUDIO_ZOOMDIAL_H
-#define __SYNFIG_STUDIO_ZOOMDIAL_H
-
-/* === H E A D E R S ======================================================= */
-
-#include <gtkmm/tooltips.h>
-#include <gtkmm/table.h>
-#include <gtkmm/button.h>
-
-/* === M A C R O S ========================================================= */
-
-/* === T Y P E D E F S ===================================================== */
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-namespace studio
-{
-
-class ZoomDial : public Gtk::Table
-{
- Gtk::Tooltips tooltips;
-
- Gtk::Button *zoom_in;
- Gtk::Button *zoom_out;
- Gtk::Button *zoom_fit;
- Gtk::Button *zoom_norm;
-
- Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
- const char * tooltip);
-
-public:
- ZoomDial(Gtk::IconSize &size);
-
- Glib::SignalProxy0<void> signal_zoom_in() { return zoom_in->signal_clicked(); }
- Glib::SignalProxy0<void> signal_zoom_out() { return zoom_out->signal_clicked(); }
- Glib::SignalProxy0<void> signal_zoom_fit() { return zoom_fit->signal_clicked(); }
- Glib::SignalProxy0<void> signal_zoom_norm() { return zoom_norm->signal_clicked(); }
-
-}; // END of class ZoomDial
-
-}; // END of namespace studio
-
-/* === E N D =============================================================== */
-
-#endif