#include "preview.h"
#include "audiocontainer.h"
#include "widget_timeslider.h"
+#include "framedial.h"
#include <synfigapp/main.h>
#include <synfigapp/inputdevice.h>
//view->progressbar->set_fraction(0);
}
+ virtual Response confirmation(const std::string &title,
+ const std::string &primaryText,
+ const std::string &secondaryText,
+ const std::string &confirmPhrase,
+ const std::string &cancelPhrase,
+ Response defaultResponse=RESPONSE_OK)
+ {
+ view->present();
+ //while(studio::App::events_pending())studio::App::iteration(false);
+ Gtk::MessageDialog dialog(
+ *view, // Parent
+ primaryText, // Message
+ false, // Markup
+ Gtk::MESSAGE_WARNING, // Type
+ Gtk::BUTTONS_NONE, // Buttons
+ true // Modal
+ );
+
+ if (! title.empty())
+ dialog.set_title(title);
+ if (! secondaryText.empty())
+ dialog.set_secondary_text(secondaryText);
+
+ dialog.add_button(cancelPhrase, RESPONSE_CANCEL);
+ dialog.add_button(confirmPhrase, RESPONSE_OK);
+ dialog.set_default_response(defaultResponse);
+
+ dialog.show_all();
+ return (Response) dialog.run();
+ }
+
virtual Response yes_no(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)
{
view->present();
keyframebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed));
keyframebutton->show();
- Gtk::Table *table= manage(new class Gtk::Table(2, 3, false));
-
//setup the audio display
disp_audio->set_size_request(-1,32); //disp_audio->show();
disp_audio->set_time_adjustment(&time_adjustment());
sigc::mem_fun(*audio,&AudioContainer::stop_scrubbing)
);
- table->attach(*manage(disp_audio), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
- table->attach(*timeslider, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0);
- table->attach(*time_window_scroll, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0);
+ FrameDial *framedial = manage(new class FrameDial());
+ framedial->signal_seek_begin().connect(
+ sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::begin())
+ );
+ framedial->signal_seek_prev_frame().connect(
+ sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), -1)
+ );
+ framedial->signal_seek_next_frame().connect(
+ sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), 1)
+ );
+ framedial->signal_seek_end().connect(
+ sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::end())
+ );
+ framedial->show();
+
+ Gtk::Table *table = manage(new class Gtk::Table(4, 3, false));
+ timebar = table;
- table->attach(*animatebutton, 1, 2, 0, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- table->attach(*keyframebutton, 2, 3, 0, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
- timebar=table;
+ table->attach(*manage(disp_audio), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
+ table->attach(*framedial, 0, 1, 1, 2,Gtk::SHRINK, Gtk::SHRINK);
+ table->attach(*timeslider, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
+ table->attach(*time_window_scroll, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
+ table->attach(*animatebutton, 2, 3, 0, 3, Gtk::SHRINK, Gtk::SHRINK);
+ table->attach(*keyframebutton, 3, 4, 0, 3, Gtk::SHRINK, Gtk::SHRINK);
table->show();
+
return table;
}