-Interlaceautofix::Interlaceautofix(MWindow *mwindow,AssetEditWindow *fwindow, int x, int y)
- : BC_CheckBox(x, y,
- fwindow->asset_edit->changed_params->interlace_autofixoption,
- _("Automatically Fix Interlacing"))
-{
- this->fwindow = fwindow;
- this->mwindow = mwindow;
-}
-
-Interlaceautofix::~Interlaceautofix()
-{
-}
-
-int Interlaceautofix::handle_event()
-{
- Asset *asset = fwindow->asset_edit->changed_params;
- asset->interlace_autofixoption = get_value();
- showhideotherwidgets();
- return 1;
-}
-
-void Interlaceautofix::showhideotherwidgets()
-{
- int thevalue = get_value();
-
- Asset *asset = fwindow->asset_edit->changed_params;
- if( thevalue == ILACE_AUTOFIXOPTION_AUTO ) {
- this->ilacemode_textbox->enable();
- this->ilacemode_listbox->enable();
- this->ilacefixmethod_textbox->disable();
- this->ilacefixmethod_listbox->disable();
- int xx = ilaceautofixmethod(mwindow->edl->session->interlace_mode,asset->interlace_mode);
- ilacefixmethod_to_text(string, xx);
- this->ilacefixmethod_textbox->update(string);
- }
- if( thevalue == ILACE_AUTOFIXOPTION_MANUAL ) {
- this->ilacemode_textbox->disable();
- this->ilacemode_listbox->disable();
- this->ilacefixmethod_textbox->enable();
- this->ilacefixmethod_listbox->enable();
- ilacefixmethod_to_text(string, asset->interlace_fixmethod);
- this->ilacefixmethod_textbox->update(string);
- }
-}
-
-InterlacefixmethodItem::InterlacefixmethodItem(const char *text, int value)
- : BC_ListBoxItem(text)
-{
- this->value = value;
-}
-
-InterlacefixmethodPulldown::InterlacefixmethodPulldown(MWindow *mwindow,
- BC_TextBox *output_text, int *output_value,
- ArrayList<BC_ListBoxItem*> *data, int x, int y)
- : BC_ListBox(x, y, 200, 150, LISTBOX_TEXT, data, 0, 0, 1, 0, 1)
-{
- this->mwindow = mwindow;
- this->output_text = output_text;
- this->output_value = output_value;
- output_text->update(interlacefixmethod_to_text());
-}
-
-int InterlacefixmethodPulldown::handle_event()
-{
- output_text->update(get_selection(0, 0)->get_text());
- *output_value = ((InterlacefixmethodItem*)get_selection(0, 0))->value;
- return 1;
-}
-
-const char* InterlacefixmethodPulldown::interlacefixmethod_to_text()
-{
- ilacefixmethod_to_text(this->string,*output_value);
- return (this->string);
-}
-
-AssetEditILaceautofixoption::AssetEditILaceautofixoption(AssetEditWindow *fwindow, char *text, int thedefault, int x, int y, int w)
- : BC_TextBox(x, y, w, 1, text)
-{
- this->fwindow = fwindow;
- this->thedefault = thedefault;
-}
-
-int AssetEditILaceautofixoption::handle_event()
-{
- Asset *asset = fwindow->asset_edit->changed_params;
- asset->interlace_autofixoption = ilaceautofixoption_from_text(get_text(), this->thedefault);
- return 1;
-}
-