2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /** @file src/film_editor.h
21 * @brief A wx widget to edit a film's metadata, and perform various functions.
25 #include <wx/spinctrl.h>
26 #include "lib/trim_action.h"
32 * @brief A wx widget to edit a film's metadata, and perform various functions.
34 class FilmEditor : public wxPanel
37 FilmEditor (Film *, wxWindow *);
39 void set_film (Film *);
40 void setup_visibility ();
42 sigc::signal1<void, std::string> FileChanged;
45 /* Handle changes to the view */
46 void name_changed (wxCommandEvent &);
47 void left_crop_changed (wxCommandEvent &);
48 void right_crop_changed (wxCommandEvent &);
49 void top_crop_changed (wxCommandEvent &);
50 void bottom_crop_changed (wxCommandEvent &);
51 void content_changed (wxCommandEvent &);
52 void frames_per_second_changed (wxCommandEvent &);
53 void format_changed (wxCommandEvent &);
54 void dcp_range_changed (int, TrimAction);
55 void dcp_content_type_changed (wxCommandEvent &);
56 void dcp_ab_toggled (wxCommandEvent &);
57 void scaler_changed (wxCommandEvent &);
58 void audio_gain_changed (wxCommandEvent &);
59 void audio_delay_changed (wxCommandEvent &);
60 void still_duration_changed (wxCommandEvent &);
62 /* Handle changes to the model */
63 void film_changed (Film::Property);
66 void edit_filters_clicked (wxCommandEvent &);
67 void change_dcp_range_clicked (wxCommandEvent &);
69 void set_things_sensitive (bool);
71 wxControl* video_control (wxControl *);
72 wxControl* still_control (wxControl *);
74 /** The film we are editing */
76 /** The Film's name */
78 /** The Film's frames per second */
79 wxSpinCtrl* _frames_per_second;
80 /** The Film's format */
82 /** The Film's content file */
84 /** The Film's left crop */
85 wxSpinCtrl* _left_crop;
86 /** The Film's right crop */
87 wxSpinCtrl* _right_crop;
88 /** The Film's top crop */
89 wxSpinCtrl* _top_crop;
90 /** The Film's bottom crop */
91 wxSpinCtrl* _bottom_crop;
92 /** Currently-applied filters */
93 wxStaticText* _filters;
94 /** Button to open the filters dialogue */
95 wxButton* _filters_button;
96 /** The Film's scaler */
98 /** The Film's audio gain */
99 wxSpinCtrl* _audio_gain;
100 /** The Film's audio delay */
101 wxSpinCtrl* _audio_delay;
102 /** The Film's DCP content type */
103 wxComboBox* _dcp_content_type;
104 /** The Film's original size */
105 wxStaticText* _original_size;
106 /** The Film's length */
107 wxStaticText* _length;
108 /** The Film's audio details */
109 wxStaticText* _audio;
110 /** The Film's duration for still sources */
111 wxSpinCtrl* _still_duration;
113 /** Display of the range of frames that will be used */
114 wxStaticText* _dcp_range;
115 /** Button to change the range */
116 wxButton* _change_dcp_range_button;
117 /** Selector to generate an A/B comparison DCP */
120 std::list<wxControl*> _video_controls;
121 std::list<wxControl*> _still_controls;