Adonthell
0.4
win_scrollbar.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_SCROLLBAR_H_
20
#define WIN_SCROLLBAR_H_
21
22
#include "
image.h
"
23
#include "win_types.h"
24
25
class
win_theme
;
26
class
win_scroll
;
27
28
class
win_scrollbar
29
{
30
public
:
31
32
win_scrollbar
();
33
34
win_scrollbar
(
win_scroll
* );
35
36
win_scrollbar
(
win_scrollbar
&);
37
38
win_scrollbar
(
char
*rep);
39
40
~
win_scrollbar
();
41
42
void
update_bar();
43
44
void
load(
char
*);
45
46
void
update_back();
47
48
void
destroy();
49
50
void
set_scrollbar(
win_scrollbar
&);
51
52
void
set_scrollbar(
win_theme
& wt);
53
54
void
set_visible_scrollbar(
bool
b)
55
{visible_=b;}
56
57
void
set_trans_scrollbar(
bool
b)
58
{
59
if
(!bar_draw_)
return
;
60
if
((trans_=b)){ bar_draw_->
set_alpha
(130);back_draw_->
set_alpha
(130); }
61
else
{bar_draw_->
set_alpha
(255);back_draw_->
set_alpha
(255); }
62
}
63
64
void
set_brightness_scrollbar(
bool
b){brightness_=b;refresh();}
65
66
void
draw(
drawing_area
* da= NULL);
67
68
u_int16
height_bar(){
if
(bar_)
return
bar_->
height
();
return
0;}
69
70
private
:
71
72
void
init();
73
74
void
refresh();
75
76
win_scrollbar
& operator=(
win_scrollbar
&);
77
78
image
* back_bot_;
79
image
* back_mid_;
80
image
* back_top_;
81
image
* bar_top_;
82
image
* bar_bot_;
83
image
* bar_mid_;
84
image
* bar_flex_;
85
86
image
* bar_;
87
image
* back_;
88
89
image
* bar_brightness_;
90
image
* back_brightness_;
91
92
image
* bar_draw_;
93
image
* back_draw_;
94
95
bool
visible_;
96
bool
brightness_;
97
bool
trans_;
98
99
win_scroll
* wsc_;
100
101
};
102
103
#endif
104
105
106
107
drawable::height
u_int16 height() const
Returns the height of the drawable.
Definition:
drawable.h:91
win_scroll
Definition:
win_scroll.h:25
win_scrollbar
Definition:
win_scrollbar.h:28
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
surface::set_alpha
void set_alpha(u_int8 a, const bool &alpha_channel=false)
Sets the alpha value of the surface.
Definition:
surface.cc:106
u_int16
#define u_int16
16 bits long unsigned integer
Definition:
types.h:38
win_theme
Definition:
win_theme.h:24
src
win_scrollbar.h
Generated by
1.8.17