Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / newpresets.C
blobd408d980be740c08ccdefc07392ccb97ab0df965
1 #include "newpresets.h"
6 NewPresetsText::NewPresetsText(MWindow *mwindow, 
7         NewWindow *new_gui, 
8         SetFormatWindow *format_gui,
9         int x, 
10         int y)
11  : BC_TextBox(x, y, 200, 1, window->get_preset_text())
13         this->mwindow = mwindow;
14         this->new_gui = new_gui;
15         this->format_gui = format_gui;
18 int NewPresetsText::handle_event()
20         return 1;
27 NewPresetsPulldown::NewPresetsPulldown(MWindow *mwindow, NewWindow *window, int x, int y)
28  : BC_ListBox(x, 
29                 y, 
30                 200, 
31                 200,
32                 LISTBOX_TEXT,                   // Display text list or icons
33                 (ArrayList<BC_ListBoxItem*>*)&window->preset_items, // Each column has an ArrayList of BC_ListBoxItems.
34                 0,             // Titles for columns.  Set to 0 for no titles
35                 0,                // width of each column
36                 1,                      // Total columns.
37                 0,                    // Pixel of top of window.
38                 1)
40         this->mwindow = mwindow;
41         this->window = window;
43 int NewPresetsPulldown::handle_event()
45         NewPresetItem *preset = ((NewPresetItem*)get_selection(0, 0));
46         window->new_edl->copy_all(preset->edl);
47         window->update();
48         window->presets_text->update(preset->get_text());
49         return 1;
52 NewPresetItem::NewPresetItem(MWindow *mwindow, NewWindow *window, char *text)
53  : BC_ListBoxItem(text)
55         this->mwindow = mwindow;
56         this->window = window;
57         edl = new EDL;
58         edl->create_objects();
59         edl->copy_all(window->new_edl);
62 NewPresetItem::~NewPresetItem()
64         delete edl;
69 //      Local Variables:
70 //      mode: C++
71 //      c-file-style: "linux"
72 //      End: