X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbctheme.h;h=c9addd3c9d918bda1ff7de2adcc9a4e6ef994538;hp=d36f1ca26ca02820b0f8340377cccc90b8e48b7a;hb=7e5a0760f40ff787cc3d93cb7768a901ebe52809;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd diff --git a/cinelerra-5.1/guicast/bctheme.h b/cinelerra-5.1/guicast/bctheme.h index d36f1ca2..c9addd3c 100644 --- a/cinelerra-5.1/guicast/bctheme.h +++ b/cinelerra-5.1/guicast/bctheme.h @@ -29,8 +29,18 @@ #include class BC_ThemeSet; +class BC_ImageData; +class BC_ImageData { +public: + char *name; + unsigned char *data; + int used; + BC_ImageData(char *nm, unsigned char *dp) { + name = nm; data = dp; used = 0; + } +}; class BC_Theme @@ -50,32 +60,32 @@ public: const char *up_path, const char *hi_path, const char *dn_path, - const char *title = 0); + const char *title); VFrame** new_button4(const char *overlay_path, const char *up_path, const char *hi_path, const char *dn_path, const char *disabled_path, - const char *title = 0); + const char *title); VFrame** new_button(const char *overlay_path, VFrame *up, VFrame *hi, VFrame *dn, - const char *title = 0); + const char *title); VFrame** new_toggle(const char *overlay_path, const char *up_path, const char *hi_path, const char *checked_path, const char *dn_path, const char *checkedhi_path, - const char *title = 0); + const char *title); VFrame** new_toggle(const char *overlay_path, VFrame *up, VFrame *hi, VFrame *checked, VFrame *dn, VFrame *checkedhi, - const char *title = 0); + const char *title); // The two main routines for creating images are new_image_set and new_image. @@ -101,13 +111,11 @@ public: BC_ThemeSet* get_image_set_object(const char *title); // Loads compressed data into temporary - unsigned char* get_image_data(const char *title); + unsigned char* get_image_data(const char *title, int log_errs=1); // Verify all images have been used after initialization. void check_used(); - - - + void sort_image_sets(); void dump(); BC_Resources* get_resources(); @@ -121,15 +129,16 @@ private: // Decompressed image storage. // Sets of images. ArrayList image_sets; + BC_ThemeSet *last_image_set; + int image_sets_start; + static int image_set_cmpr(const void *ap, const void *bp); + void add_image_set(BC_ThemeSet *image_set); // Compressed images are loaded in here. - char *data_ptr; - char *contents_ptr; - ArrayList contents; - ArrayList pointers; - ArrayList used; - char *last_image; - unsigned char *last_pointer; + ArrayList data_items; + ArrayList images; + BC_ImageData *last_image_data; + static int images_cmpr(const void *ap, const void *bp); }; class BC_ThemeSet