Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

compresspopup.C

Go to the documentation of this file.
00001 #include "compresspopup.h"
00002 #include "file.h"
00003 #include "language.h"
00004 #include "quicktime.h"
00005 #include <string.h>
00006 
00007 
00008 
00009 CompressPopup::CompressPopup(int x, int y, int use_dv, char *text)
00010  : BC_PopupMenu(x, y, 80, File::compressiontostr(text))
00011 {
00012         strcpy(format, text);
00013         this->use_dv = use_dv;
00014 }
00015 
00016 int CompressPopup::add_items()
00017 {
00018         if(!use_dv) add_item(format_items[0] = new CompressPopupItem(_("DV")));
00019         add_item(format_items[1] = new CompressPopupItem(_("JPEG")));
00020         add_item(format_items[2] = new CompressPopupItem(_("MJPA")));
00021         add_item(format_items[3] = new CompressPopupItem(_("PNG")));
00022         add_item(format_items[4] = new CompressPopupItem(_("PNG-Alpha")));
00023         add_item(format_items[5] = new CompressPopupItem(_("RGB")));
00024         add_item(format_items[6] = new CompressPopupItem(_("RGB-Alpha")));
00025         add_item(format_items[7] = new CompressPopupItem(_("YUV420")));
00026         add_item(format_items[8] = new CompressPopupItem(_("YUV422")));
00027         return 0;
00028 }
00029 
00030 CompressPopup::~CompressPopup()
00031 {
00032         for(int i = 0; i < COMPRESS_ITEMS; i++) delete format_items[i];
00033 }
00034 
00035 char* CompressPopup::get_compression()
00036 {
00037         File test_file;
00038         return test_file.strtocompression(get_text());
00039 }
00040 
00041 char* CompressPopup::compression_to_text(char *compression)
00042 {
00043         File test_file;
00044         return test_file.compressiontostr(compression);
00045 }
00046 
00047 CompressPopupItem::CompressPopupItem(char *text)
00048  : BC_MenuItem(text)
00049 {
00050 }
00051 
00052 CompressPopupItem::~CompressPopupItem()
00053 {
00054 }
00055         
00056 int CompressPopupItem::handle_event()
00057 {
00058         get_popup_menu()->set_text(get_text());
00059         get_popup_menu()->handle_event();
00060 }

Generated on Sun Jan 8 13:38:51 2006 for Cinelerra-svn by  doxygen 1.4.4