r1049: Order the format list alphabetically
[cinelerra_cv.git] / cinelerra / formatpopup.C
blob2977d94b343da171ee9ab8f65a3bfa2ceba9ea3b
1 #include "bcsignals.h"
2 #include "file.inc"
3 #include "formatpopup.h"
4 #include "language.h"
5 #include "pluginserver.h"
9 FormatPopup::FormatPopup(ArrayList<PluginServer*> *plugindb, 
10         int x, 
11         int y,
12         int use_brender)
13  : BC_ListBox(x, 
14         y, 
15         200, 
16         200,
17         LISTBOX_TEXT,
18         0,
19         0,
20         0,
21         1,
22         0,
23         1)
25         this->plugindb = plugindb;
26         this->use_brender = use_brender;
27         set_tooltip(_("Change file format"));
30 int FormatPopup::create_objects()
32         if(!use_brender)
33         {
34                 format_items.append(new BC_ListBoxItem(_(AC3_NAME)));
35                 format_items.append(new BC_ListBoxItem(_(AIFF_NAME)));
36                 format_items.append(new BC_ListBoxItem(_(EXR_NAME)));
37                 format_items.append(new BC_ListBoxItem(_(EXR_LIST_NAME)));
38                 format_items.append(new BC_ListBoxItem(_(JPEG_NAME)));
39         }
41         format_items.append(new BC_ListBoxItem(_(JPEG_LIST_NAME)));
43         if(!use_brender)
44         {
45                 format_items.append(new BC_ListBoxItem(_(AVI_NAME)));
46                 format_items.append(new BC_ListBoxItem(_(WAV_NAME)));
47                 format_items.append(new BC_ListBoxItem(_(AMPEG_NAME)));
48                 format_items.append(new BC_ListBoxItem(_(VMPEG_NAME)));
49                 format_items.append(new BC_ListBoxItem(_(OGG_NAME)));
50                 format_items.append(new BC_ListBoxItem(_(VORBIS_NAME)));
51                 format_items.append(new BC_ListBoxItem(_(PNG_NAME)));
52         }
54         format_items.append(new BC_ListBoxItem(_(PNG_LIST_NAME)));
56         if(!use_brender)
57         {
58                 format_items.append(new BC_ListBoxItem(_(MOV_NAME)));
59                 format_items.append(new BC_ListBoxItem(_(RAWDV_NAME)));
60                 format_items.append(new BC_ListBoxItem(_(PCM_NAME)));
61                 format_items.append(new BC_ListBoxItem(_(AU_NAME))); 
62                 format_items.append(new BC_ListBoxItem(_(TGA_NAME)));
63         }
65         format_items.append(new BC_ListBoxItem(_(TGA_LIST_NAME)));
67         if(!use_brender)
68         {
69                 format_items.append(new BC_ListBoxItem(_(TIFF_NAME)));
70         }
72         format_items.append(new BC_ListBoxItem(_(TIFF_LIST_NAME)));
74         if(!use_brender)
75         {
76                 format_items.append(new BC_ListBoxItem(_(YUV_NAME)));
77         }
78         update(&format_items,
79                 0,
80                 0,
81                 1);
82         return 0;
85 FormatPopup::~FormatPopup()
87         for(int i = 0; i < format_items.total; i++) delete format_items.values[i];
90 int FormatPopup::handle_event()