1 #include "compresspopup.h"
9 CompressPopup::CompressPopup(int x, int y, int use_dv, char *text)
10 : BC_PopupMenu(x, y, 80, File::compressiontostr(text))
13 this->use_dv = use_dv;
16 int CompressPopup::add_items()
18 if(!use_dv) add_item(format_items[0] = new CompressPopupItem(_("DV")));
19 add_item(format_items[1] = new CompressPopupItem(_("JPEG")));
20 add_item(format_items[2] = new CompressPopupItem(_("MJPA")));
21 add_item(format_items[3] = new CompressPopupItem(_("PNG")));
22 add_item(format_items[4] = new CompressPopupItem(_("PNG-Alpha")));
23 add_item(format_items[5] = new CompressPopupItem(_("RGB")));
24 add_item(format_items[6] = new CompressPopupItem(_("RGB-Alpha")));
25 add_item(format_items[7] = new CompressPopupItem(_("YUV420")));
26 add_item(format_items[8] = new CompressPopupItem(_("YUV422")));
30 CompressPopup::~CompressPopup()
32 for(int i = 0; i < COMPRESS_ITEMS; i++) delete format_items[i];
35 char* CompressPopup::get_compression()
38 return test_file.strtocompression(get_text());
41 char* CompressPopup::compression_to_text(char *compression)
44 return test_file.compressiontostr(compression);
47 CompressPopupItem::CompressPopupItem(char *text)
52 CompressPopupItem::~CompressPopupItem()
56 int CompressPopupItem::handle_event()
58 get_popup_menu()->set_text(get_text());
59 get_popup_menu()->handle_event();
64 // c-file-style: "linux"