00001 #ifndef BCTHEME_H
00002 #define BCTHEME_H
00003
00004 #include "arraylist.h"
00005 #include "bcresources.inc"
00006 #include "bcwindowbase.inc"
00007 #include "vframe.inc"
00008 #include <stdarg.h>
00009
00010 class BC_ThemeSet;
00011
00012
00013
00014
00015 class BC_Theme
00016 {
00017 public:
00018 BC_Theme();
00019 virtual ~BC_Theme();
00020
00021
00022
00023 void set_data(unsigned char *ptr);
00024
00025
00026
00027
00028 VFrame** new_button(char *overlay_path,
00029 char *up_path,
00030 char *hi_path,
00031 char *dn_path,
00032 char *title = 0);
00033 VFrame** new_button4(char *overlay_path,
00034 char *up_path,
00035 char *hi_path,
00036 char *dn_path,
00037 char *disabled_path,
00038 char *title = 0);
00039 VFrame** new_button(char *overlay_path,
00040 VFrame *up,
00041 VFrame *hi,
00042 VFrame *dn,
00043 char *title = 0);
00044 VFrame** new_toggle(char *overlay_path,
00045 char *up_path,
00046 char *hi_path,
00047 char *checked_path,
00048 char *dn_path,
00049 char *checkedhi_path,
00050 char *title = 0);
00051 VFrame** new_toggle(char *overlay_path,
00052 VFrame *up,
00053 VFrame *hi,
00054 VFrame *checked,
00055 VFrame *dn,
00056 VFrame *checkedhi,
00057 char *title = 0);
00058
00059
00060
00061
00062
00063
00064 VFrame** new_image_set(char *title, int total, va_list *args);
00065 VFrame** new_image_set(char *title, int total, ...);
00066 VFrame** new_image_set(int total, ...);
00067
00068
00069
00070 VFrame** new_image_set_images(char *title, int total, ...);
00071
00072
00073 VFrame* new_image(char *title, char *path);
00074 VFrame* new_image(char *path);
00075
00076
00077
00078 VFrame* get_image(char *title, int use_default = 1);
00079 VFrame** get_image_set(char *title, int use_default = 1);
00080 BC_ThemeSet* get_image_set_object(char *title);
00081
00082
00083 unsigned char* get_image_data(char *title);
00084
00085
00086 void check_used();
00087
00088 void dump();
00089 BC_Resources* get_resources();
00090
00091 private:
00092 void overlay(VFrame *dst, VFrame *src, int in_x1 = -1, int in_x2 = -1, int shift = 0);
00093 void init_contents();
00094
00095
00096
00097
00098
00099 ArrayList<BC_ThemeSet*> image_sets;
00100
00101
00102 char *data_ptr;
00103 char *contents_ptr;
00104 ArrayList<char*> contents;
00105 ArrayList<unsigned char*> pointers;
00106 ArrayList<int> used;
00107 char *last_image;
00108 unsigned char *last_pointer;
00109 };
00110
00111 class BC_ThemeSet
00112 {
00113 public:
00114
00115 BC_ThemeSet(int total, int is_reference, char *title);
00116 ~BC_ThemeSet();
00117
00118 VFrame **data;
00119 char *title;
00120 int total;
00121 int is_reference;
00122 };
00123
00124
00125
00126 #endif