add formatting trailer for emacs
[cinelerra_cv/ct.git] / cinelerra / assetedit.h
blobf5004fd8210862261a0e9630f6803ec3e64b95c6
1 #ifndef ASSETEDIT_H
2 #define ASSETEDIT_H
4 #include "asset.inc"
5 #include "awindow.inc"
6 #include "guicast.h"
7 #include "bitspopup.inc"
8 #include "browsebutton.h"
9 #include "formatpopup.h"
10 #include "language.h"
11 #include "mwindow.h"
12 #include "thread.h"
14 class AssetEditTCStartTextBox;
15 class AssetEditReelNumber;
16 class AssetEditReelName;
17 class AssetEditByteOrderHILO;
18 class AssetEditByteOrderLOHI;
19 class AssetEditPath;
20 class AssetEditPathText;
21 class AssetEditWindow;
23 class AssetEdit : public Thread
25 public:
26 AssetEdit(MWindow *mwindow);
27 ~AssetEdit();
29 void edit_asset(Asset_GC asset);
30 int set_asset(Asset_GC asset);
31 void run();
33 Asset_GC new_asset;
34 Asset_GC asset;
35 MWindow *mwindow;
36 AssetEditWindow *window;
41 // Pcm is the only format users should be able to fix.
42 // All other formats display information about the file in read-only.
44 class AssetEditWindow : public BC_Window
46 public:
47 AssetEditWindow(MWindow *mwindow, AssetEdit *asset_edit);
48 ~AssetEditWindow();
50 int create_objects();
51 Asset_GC asset;
52 AssetEditPathText *path_text;
53 AssetEditPath *path_button;
54 AssetEditByteOrderHILO *hilo;
55 AssetEditByteOrderLOHI *lohi;
56 BitsPopup *bitspopup;
57 int allow_edits;
58 MWindow *mwindow;
59 AssetEdit *asset_edit;
63 class AssetEditPath : public BrowseButton
65 public:
66 AssetEditPath(MWindow *mwindow,
67 AssetEditWindow *fwindow,
68 BC_TextBox *textbox,
69 int y,
70 char *text,
71 char *window_title = _(PROGRAM_NAME " Path"),
72 char *window_caption = _("Select a file"));
73 ~AssetEditPath();
75 AssetEditWindow *fwindow;
79 class AssetEditPathText : public BC_TextBox
81 public:
82 AssetEditPathText(AssetEditWindow *fwindow, int y);
83 ~AssetEditPathText();
84 int handle_event();
86 AssetEditWindow *fwindow;
91 class AssetEditFormat : public FormatPopup
93 public:
94 AssetEditFormat(AssetEditWindow *fwindow, char* default_, int y);
95 ~AssetEditFormat();
97 int handle_event();
98 AssetEditWindow *fwindow;
102 class AssetEditChannels : public BC_TumbleTextBox
104 public:
105 AssetEditChannels(AssetEditWindow *fwindow, char *text, int x, int y);
107 int handle_event();
109 AssetEditWindow *fwindow;
112 class AssetEditRate : public BC_TextBox
114 public:
115 AssetEditRate(AssetEditWindow *fwindow, char *text, int x, int y);
117 int handle_event();
119 AssetEditWindow *fwindow;
122 class AssetEditFRate : public BC_TextBox
124 public:
125 AssetEditFRate(AssetEditWindow *fwindow, char *text, int x, int y);
127 int handle_event();
129 AssetEditWindow *fwindow;
132 class Interlaceautofix : public BC_CheckBox
134 public:
135 Interlaceautofix(MWindow *mwindow,AssetEditWindow *fwindow, int x, int y);
136 ~Interlaceautofix();
137 int handle_event();
139 void showhideotherwidgets();
141 AssetEditWindow* fwindow;
142 MWindow *mwindow;
144 BC_TextBox *ilacemode_textbox;
145 BC_ListBox *ilacemode_listbox;
146 BC_TextBox *ilacefixmethod_textbox;
147 BC_ListBox *ilacefixmethod_listbox;
148 private:
149 char string[BCTEXTLEN];
152 class AssetEditILaceautofixoption : public BC_TextBox
154 public:
155 AssetEditILaceautofixoption(AssetEditWindow *fwindow, char *text, int thedefault, int x, int y, int w);
157 int handle_event();
158 int thedefault;
159 AssetEditWindow *fwindow;
162 class AssetEditILacemode : public BC_TextBox
164 public:
165 AssetEditILacemode(AssetEditWindow *fwindow, char *text, int thedefault, int x, int y, int w);
166 int handle_event();
167 int thedefault;
168 AssetEditWindow *fwindow;
171 class AssetEditInterlacemodePulldown : public BC_ListBox
173 public:
174 AssetEditInterlacemodePulldown(MWindow *mwindow,
175 BC_TextBox *output_text,
176 int *output_value,
177 ArrayList<BC_ListBoxItem*> *data,
178 Interlaceautofix *fixoption_chkbox,
179 int x,
180 int y);
181 int handle_event();
182 char* interlacemode_to_text();
183 MWindow *mwindow;
184 BC_TextBox *output_text;
185 int *output_value;
186 Interlaceautofix *fixoption_chkbox;
187 private:
188 char string[BCTEXTLEN];
191 class AssetEditILacefixmethod : public BC_TextBox
193 public:
194 AssetEditILacefixmethod(AssetEditWindow *fwindow, char *text, int thedefault, int x, int y, int w);
196 int handle_event();
197 int thedefault;
198 AssetEditWindow *fwindow;
201 class AssetEditHeader : public BC_TextBox
203 public:
204 AssetEditHeader(AssetEditWindow *fwindow, char *text, int x, int y);
206 int handle_event();
208 AssetEditWindow *fwindow;
211 class AssetEditByteOrderLOHI : public BC_Radial
213 public:
214 AssetEditByteOrderLOHI(AssetEditWindow *fwindow, int value, int x, int y);
216 int handle_event();
218 AssetEditWindow *fwindow;
221 class AssetEditByteOrderHILO : public BC_Radial
223 public:
224 AssetEditByteOrderHILO(AssetEditWindow *fwindow, int value, int x, int y);
226 int handle_event();
228 AssetEditWindow *fwindow;
231 class AssetEditSigned : public BC_CheckBox
233 public:
234 AssetEditSigned(AssetEditWindow *fwindow, int value, int x, int y);
236 int handle_event();
238 AssetEditWindow *fwindow;
241 class AssetEditReelName : public BC_TextBox
243 public:
244 AssetEditReelName(AssetEditWindow *fwindow, int x, int y);
245 ~AssetEditReelName();
247 int handle_event();
249 AssetEditWindow *fwindow;
252 class AssetEditReelNumber : public BC_TextBox
254 public:
255 AssetEditReelNumber(AssetEditWindow *fwindow, int x, int y);
256 ~AssetEditReelNumber();
258 int handle_event();
260 AssetEditWindow *fwindow;
263 class AssetEditTCStartTextBox : public BC_TextBox
265 public:
266 AssetEditTCStartTextBox(AssetEditWindow *fwindow, int value, int x, int y, int multiplier);
267 ~AssetEditTCStartTextBox();
268 int handle_event();
270 AssetEditWindow *fwindow;
271 // Multiplier is the # of frames for whatever unit of time this is.
272 // fps dependent, and unit dependent
273 int multiplier;
274 int previous;
276 #endif
278 // Local Variables:
279 // mode: C++
280 // c-file-style: "linux"
281 // End: