r105: This commit was manufactured by cvs2svn to create tag
[cinelerra_cv/mob.git] / hvirtual / cinelerra / formatpopup.C
blob79a34976df5fe320b94f09b6c4faa0921b31a523
1 #include "file.inc"
2 #include "formatpopup.h"
3 #include "pluginserver.h"
5 #include <libintl.h>
6 #define _(String) gettext(String)
7 #define gettext_noop(String) String
8 #define N_(String) gettext_noop (String)
11 FormatPopup::FormatPopup(ArrayList<PluginServer*> *plugindb, 
12         int x, 
13         int y,
14         int use_brender)
15  : BC_ListBox(x, 
16         y, 
17         200, 
18         200,
19         LISTBOX_TEXT,
20         0,
21         0,
22         0,
23         1,
24         0,
25         1)
27         this->plugindb = plugindb;
28         this->use_brender = use_brender;
29         set_tooltip(_("Change file format"));
32 int FormatPopup::create_objects()
34         if(!use_brender)
35         {
36                 format_items.append(new BC_ListBoxItem(_(AIFF_NAME)));
37                 format_items.append(new BC_ListBoxItem(_(AU_NAME)));
38 //              format_items.append(new BC_ListBoxItem(_(AVI_ARNE1_NAME)));
39 //              format_items.append(new BC_ListBoxItem(_(AVI_ARNE2_NAME)));
40 #ifdef USE_AVIFILE
41                 format_items.append(new BC_ListBoxItem(_(AVI_AVIFILE_NAME)));
42 #endif
43 //              format_items.append(new BC_ListBoxItem(_(AVI_LAVTOOLS_NAME)));
44                 format_items.append(new BC_ListBoxItem(_(JPEG_NAME)));
45         }
47         format_items.append(new BC_ListBoxItem(_(JPEG_LIST_NAME)));
49         if(!use_brender)
50         {
51                 format_items.append(new BC_ListBoxItem(_(AVI_NAME)));
52                 format_items.append(new BC_ListBoxItem(_(WAV_NAME)));
53                 format_items.append(new BC_ListBoxItem(_(MOV_NAME)));
54                 format_items.append(new BC_ListBoxItem(_(AMPEG_NAME)));
55                 format_items.append(new BC_ListBoxItem(_(VMPEG_NAME)));
56                 format_items.append(new BC_ListBoxItem(_(VORBIS_NAME)));
57                 format_items.append(new BC_ListBoxItem(_(PCM_NAME)));
58                 format_items.append(new BC_ListBoxItem(_(PNG_NAME)));
59         }
61         format_items.append(new BC_ListBoxItem(_(PNG_LIST_NAME)));
63         if(!use_brender)
64         {
65                 format_items.append(new BC_ListBoxItem(_(TGA_NAME)));
66         }
68         format_items.append(new BC_ListBoxItem(_(TGA_LIST_NAME)));
70         if(!use_brender)
71         {
72                 format_items.append(new BC_ListBoxItem(_(TIFF_NAME)));
73         }
75         format_items.append(new BC_ListBoxItem(_(TIFF_LIST_NAME)));
76 //      for(i = 0; i < plugindb->total; i++)
77 //      {
78 //              if(plugindb->values[i]->fileio)
79 //              {
80 //                      add_item(format_items[total_items++] = new FormatPopupItem(this, plugindb->values[i]->title));
81 //              }
82 //      }
83         update(&format_items,
84                 0,
85                 0,
86                 1);
87         return 0;
90 FormatPopup::~FormatPopup()
92         for(int i = 0; i < format_items.total; i++) delete format_items.values[i];
95 int FormatPopup::handle_event()