Adonthell  0.4
win_border.h
1 /*
2  (C) Copyright 2000 Joel Vennin
3  Part of the Adonthell Project http://adonthell.linuxgames.com
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License.
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY.
9 
10  See the COPYING file for more details
11 */
12 
13 #ifndef WIN_BORDER_H_
14 #define WIN_BORDER_H_
15 
16 #include <string.h>
17 #include "win_types.h"
18 #include "image.h"
19 
20 class win_theme;
21 class win_base;
22 
23 #define NB_BORDER_IMAGE 6
24 
26 {
27  public:
28 
29  win_border();
30 
31  win_border(win_base * wb);
32 
34 
35  win_border(char *rep ,const char *size=WIN_BORDER_NORMAL_SIZE);
36 
37  ~win_border();
38 
39  void load(char *,const char *);
40 
41  void update();
42 
43  void destroy();
44 
45  void draw(drawing_area * da);
46 
47  void set_visible_border(bool b){visible_border_=b;}
48 
49  void set_brightness_border(bool b);
50 
51  void set_border(win_border & );
52 
53  void set_border(win_theme & wth, u_int8 size = win_border::NORMAL);
54 
55  void set_trans_border(bool b);
56 
57  u_int16 length_border();
58 
59  u_int16 height_border();
60 
61 #ifdef SWIG
62 #define win_border_MINI 0
63 #define win_border_NORMAL 1
64 #else
65  const static u_int8 MINI = 0;
66  const static u_int8 NORMAL = 1;
67 #endif
68  private:
69 
70  void init();
71 
72  void refresh();
73 
74  win_border & operator=(win_border &);
75 
76  image * h_border_template_;
77 
78  image * v_border_template_;
79 
80  image * border_[NB_BORDER_IMAGE];
81 
82  image * border_brightness_[NB_BORDER_IMAGE];
83 
84  image ** border_draw_;
85 
86  bool visible_border_;
87 
88  bool brightness_;
89 
90  u_int8 trans_;
91 
92  win_base * wb_;
93 };
94 #endif
95 
96 
#define u_int16
16 bits long unsigned integer
Definition: types.h:32
Image manipulation class.
Definition: image.h:41
#define u_int8
8 bits long unsigned integer
Definition: types.h:29
Declares the image class.
Implements "drawing zones" for drawing operations.
Definition: drawing_area.h:50
Common properties for each win_base's object.
Definition: win_base.h:47