Adonthell
0.4
|
00001 /* 00002 (C) Copyright 2000 Joel Vennin 00003 Part of the Adonthell Project http://adonthell.linuxgames.com 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License. 00007 This program is distributed in the hope that it will be useful, 00008 but WITHOUT ANY WARRANTY. 00009 00010 See the COPYING file for more details 00011 */ 00012 00013 #ifndef WIN_BORDER_H_ 00014 #define WIN_BORDER_H_ 00015 00016 #include <string.h> 00017 #include "win_types.h" 00018 #include "image.h" 00019 00020 class win_theme; 00021 class win_base; 00022 00023 #define NB_BORDER_IMAGE 6 00024 00025 class win_border 00026 { 00027 public: 00028 00029 win_border(); 00030 00031 win_border(win_base * wb); 00032 00033 win_border(win_border &); 00034 00035 win_border(char *rep ,const char *size=WIN_BORDER_NORMAL_SIZE); 00036 00037 ~win_border(); 00038 00039 void load(char *,const char *); 00040 00041 void update(); 00042 00043 void destroy(); 00044 00045 void draw(drawing_area * da); 00046 00047 void set_visible_border(bool b){visible_border_=b;} 00048 00049 void set_brightness_border(bool b); 00050 00051 void set_border(win_border & ); 00052 00053 void set_border(win_theme & wth, u_int8 size = win_border::NORMAL); 00054 00055 void set_trans_border(bool b); 00056 00057 u_int16 length_border(); 00058 00059 u_int16 height_border(); 00060 00061 #ifdef SWIG 00062 #define win_border_MINI 0 00063 #define win_border_NORMAL 1 00064 #else 00065 const static u_int8 MINI = 0; 00066 const static u_int8 NORMAL = 1; 00067 #endif 00068 private: 00069 00070 void init(); 00071 00072 void refresh(); 00073 00074 win_border & operator=(win_border &); 00075 00076 image * h_border_template_; 00077 00078 image * v_border_template_; 00079 00080 image * border_[NB_BORDER_IMAGE]; 00081 00082 image * border_brightness_[NB_BORDER_IMAGE]; 00083 00084 image ** border_draw_; 00085 00086 bool visible_border_; 00087 00088 bool brightness_; 00089 00090 u_int8 trans_; 00091 00092 win_base * wb_; 00093 }; 00094 #endif 00095 00096