- _v_sizer = new wxBoxSizer (wxVERTICAL);
- SetSizer (_v_sizer);
-
- _v_sizer->Add (_panel, 1, wxEXPAND);
-
- wxBoxSizer* view_options = new wxBoxSizer (wxHORIZONTAL);
- if (outline_content) {
- _outline_content = new wxCheckBox (this, wxID_ANY, _("Outline content"));
- view_options->Add (_outline_content, 0, wxRIGHT, DCPOMATIC_SIZER_GAP);
- }
- view_options->Add (_left_eye, 0, wxLEFT | wxRIGHT, DCPOMATIC_SIZER_GAP);
- view_options->Add (_right_eye, 0, wxLEFT | wxRIGHT, DCPOMATIC_SIZER_GAP);
- if (jump_to_selected) {
- _jump_to_selected = new wxCheckBox (this, wxID_ANY, _("Jump to selected content"));
- view_options->Add (_jump_to_selected, 0, wxLEFT | wxRIGHT, DCPOMATIC_SIZER_GAP);
- }
- _v_sizer->Add (view_options, 0, wxALL, DCPOMATIC_SIZER_GAP);
-
- wxBoxSizer* h_sizer = new wxBoxSizer (wxHORIZONTAL);
-
- wxBoxSizer* time_sizer = new wxBoxSizer (wxVERTICAL);
- time_sizer->Add (_frame_number, 0, wxEXPAND);
- time_sizer->Add (_timecode, 0, wxEXPAND);
-
- h_sizer->Add (_back_button, 0, wxALL, 2);
- h_sizer->Add (time_sizer, 0, wxEXPAND);
- h_sizer->Add (_forward_button, 0, wxALL, 2);
- h_sizer->Add (_play_button, 0, wxEXPAND);
- h_sizer->Add (_slider, 1, wxEXPAND);
-
- _v_sizer->Add (h_sizer, 0, wxEXPAND | wxALL, 6);
-
- _frame_number->SetMinSize (wxSize (84, -1));
- _back_button->SetMinSize (wxSize (32, -1));
- _forward_button->SetMinSize (wxSize (32, -1));
-
- _panel->Bind (wxEVT_PAINT, boost::bind (&FilmViewer::paint_panel, this));
- _panel->Bind (wxEVT_SIZE, boost::bind (&FilmViewer::panel_sized, this, _1));
- if (_outline_content) {
- _outline_content->Bind (wxEVT_CHECKBOX, boost::bind (&FilmViewer::refresh_panel, this));
- }
- _left_eye->Bind (wxEVT_RADIOBUTTON, boost::bind (&FilmViewer::refresh, this));
- _right_eye->Bind (wxEVT_RADIOBUTTON, boost::bind (&FilmViewer::refresh, this));
- _slider->Bind (wxEVT_SCROLL_THUMBTRACK, boost::bind (&FilmViewer::slider_moved, this, false));
- _slider->Bind (wxEVT_SCROLL_PAGEUP, boost::bind (&FilmViewer::slider_moved, this, false));
- _slider->Bind (wxEVT_SCROLL_PAGEDOWN, boost::bind (&FilmViewer::slider_moved, this, false));
- _slider->Bind (wxEVT_SCROLL_CHANGED, boost::bind (&FilmViewer::slider_moved, this, true));
- _play_button->Bind (wxEVT_TOGGLEBUTTON, boost::bind (&FilmViewer::play_clicked, this));
- _timer.Bind (wxEVT_TIMER, boost::bind (&FilmViewer::timer, this));
- _back_button->Bind (wxEVT_LEFT_DOWN, boost::bind (&FilmViewer::back_clicked, this, _1));
- _forward_button->Bind (wxEVT_LEFT_DOWN, boost::bind (&FilmViewer::forward_clicked, this, _1));
- _frame_number->Bind (wxEVT_LEFT_DOWN, boost::bind (&FilmViewer::frame_number_clicked, this));
- _timecode->Bind (wxEVT_LEFT_DOWN, boost::bind (&FilmViewer::timecode_clicked, this));
- if (_jump_to_selected) {
- _jump_to_selected->Bind (wxEVT_CHECKBOX, boost::bind (&FilmViewer::jump_to_selected_clicked, this));
- _jump_to_selected->SetValue (Config::instance()->jump_to_selected ());
- }