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