r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / guicast / bctheme.h
blobe0c33e0f5fba66e4da0edc244dcc709277216e16
1 #ifndef BCTHEME_H
2 #define BCTHEME_H
4 #include "arraylist.h"
5 #include "bcresources.inc"
6 #include "bcwindowbase.inc"
7 #include "vframe.inc"
9 class BC_ThemeSet;
14 class BC_Theme
16 public:
17 BC_Theme();
18 virtual ~BC_Theme();
20 // Must set path of resource file before loading first image.
21 // Path defaults to executable path.
22 void set_path(char *path);
24 // These create image sets which are stored in the set table.
25 // Takes comma delimited char* pointers to filenames.
26 VFrame** new_image_set(int total, ...);
27 VFrame** new_button(char *overlay_path,
28 char *up_path,
29 char *hi_path,
30 char *dn_path);
31 VFrame** new_button(char *overlay_path,
32 VFrame *up,
33 VFrame *hi,
34 VFrame *dn);
35 VFrame** new_toggle(char *overlay_path,
36 char *up_path,
37 char *hi_path,
38 char *checked_path,
39 char *dn_path,
40 char *checkedhi_path);
41 VFrame** new_toggle(char *overlay_path,
42 VFrame *up,
43 VFrame *hi,
44 VFrame *checked,
45 VFrame *dn,
46 VFrame *checkedhi);
47 // Decompresses image and puts on images table before returning it.
48 VFrame* new_image(char *title);
49 // Verify all images have been used after initialization.
50 void check_used();
52 void dump();
53 BC_Resources* get_resources();
55 private:
56 void overlay(VFrame *dst, VFrame *src, int in_x1 = -1, int in_x2 = -1);
57 void init_contents();
60 // Loads compressed data into temporary
61 unsigned char* get_image_data(char *title);
63 // Decompressed image storage
64 ArrayList<VFrame*> images;
65 ArrayList<BC_ThemeSet*> image_sets;
66 char path[BCTEXTLEN];
68 // Compressed images are loaded in here.
69 char *data_buffer;
70 char *contents_buffer;
71 ArrayList<char*> contents;
72 ArrayList<int> offsets;
73 ArrayList<int> used;
74 char *last_image;
75 int last_offset;
78 class BC_ThemeSet
80 public:
81 BC_ThemeSet(int total);
82 ~BC_ThemeSet();
84 VFrame **data;
87 #endif