#include <wx/wx.h>
#include <wx/tglbtn.h>
-using boost::shared_ptr;
+using std::shared_ptr;
StandardControls::StandardControls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool editor_controls)
: Controls (parent, viewer, editor_controls)
, _play_button (new wxToggleButton(this, wxID_ANY, _("Play")))
{
- _button_sizer->Add (_play_button, 0, wxEXPAND);
+ _button_sizer->Add (_play_button, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
_play_button->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&StandardControls::play_clicked, this));
}
bool const active_job = _active_job && *_active_job != "examine_content";
_play_button->Enable (_film && !_film->content().empty() && !active_job);
}
+
+void
+StandardControls::play ()
+{
+ _play_button->SetValue (true);
+ play_clicked ();
+}
+
+void
+StandardControls::stop ()
+{
+ _play_button->SetValue (false);
+ play_clicked ();
+}