#include "audiocontainer.h"
#include "widget_timeslider.h"
#include "keyframedial.h"
-#include "toggleducksdial.h"
#include <synfigapp/main.h>
#include <synfigapp/inputdevice.h>
keyframebutton=keyframedial->get_lock_button();
// Setup the ToggleDuckDial widget
- ToggleDucksDial *toggleducksdial = Gtk::manage(new class ToggleDucksDial());
-
- toggleducksdial->get_position_toggle()-> set_active(work_area->get_type_mask()&Duck::TYPE_POSITION);
- toggleducksdial->get_vertex_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_VERTEX);
- toggleducksdial->get_tangent_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_TANGENT);
- toggleducksdial->get_radius_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_RADIUS);
- toggleducksdial->get_width_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_WIDTH);
- toggleducksdial->get_angle_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_ANGLE);
+ toggleducksdial = Gtk::manage(new class ToggleDucksDial());
+
+ Duck::Type m = work_area->get_type_mask();
+ toggleducksdial->update_toggles(m);
toggleducksdial->signal_ducks_position().connect(
sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION)
#include "dialog_waypoint.h"
#include "dialog_keyframe.h"
#include "framedial.h"
+#include "toggleducksdial.h"
#include "duckmatic.h"
#include <gtkmm/scale.h>
Gtk::Button *animatebutton;
Gtk::Button *keyframebutton;
FrameDial *framedial;
+ ToggleDucksDial *toggleducksdial;
//! Shows current time and allows edition
return tbutton;
}
+
+void
+ToggleDucksDial::initiate_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));
+}
#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 ===================================================== */
public:
ToggleDucksDial();
+ void initiate_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_width() { return ducks_width-> signal_toggled(); }
Glib::SignalProxy0<void> signal_ducks_angle() { return ducks_angle-> signal_toggled(); }
- Gtk::ToggleButton * get_position_toggle() { return ducks_position; }
- Gtk::ToggleButton * get_vertex_toggle() { return ducks_vertex; }
- Gtk::ToggleButton * get_tangent_toggle() { return ducks_tangent; }
- Gtk::ToggleButton * get_radius_toggle() { return ducks_radius; }
- Gtk::ToggleButton * get_width_toggle() { return ducks_width; }
- Gtk::ToggleButton * get_angle_toggle() { return ducks_angle; }
-
}; // END of class ToggleDucksDial
}; // END of namespace studio