4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "newpresets.h"
27 NewPresetsText::NewPresetsText(MWindow *mwindow,
29 SetFormatWindow *format_gui,
32 : BC_TextBox(x, y, 200, 1, window->get_preset_text())
34 this->mwindow = mwindow;
35 this->new_gui = new_gui;
36 this->format_gui = format_gui;
39 int NewPresetsText::handle_event()
48 NewPresetsPulldown::NewPresetsPulldown(MWindow *mwindow, NewWindow *window, int x, int y)
53 LISTBOX_TEXT, // Display text list or icons
54 (ArrayList<BC_ListBoxItem*>*)&window->preset_items, // Each column has an ArrayList of BC_ListBoxItems.
55 0, // Titles for columns. Set to 0 for no titles
56 0, // width of each column
58 0, // Pixel of top of window.
61 this->mwindow = mwindow;
62 this->window = window;
64 int NewPresetsPulldown::handle_event()
66 NewPresetItem *preset = ((NewPresetItem*)get_selection(0, 0));
67 window->new_edl->copy_all(preset->edl);
69 window->presets_text->update(preset->get_text());
73 NewPresetItem::NewPresetItem(MWindow *mwindow, NewWindow *window, char *text)
74 : BC_ListBoxItem(text)
76 this->mwindow = mwindow;
77 this->window = window;
79 edl->create_objects();
80 edl->copy_all(window->new_edl);
83 NewPresetItem::~NewPresetItem()
85 edl->Garbage::remove_user();