Adonthell  0.4
win_scroll.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_SCROLLED_H
20 #define WIN_SCROLLED_H
21 
22 #include "win_container.h"
23 #include "win_scrollbar.h"
24 
25 class win_scroll : public win_container, public win_scrollbar
26 {
27 
28  public:
29  //constructor x,y,length,height,and a theme
30  win_scroll();
31 
32  //return difference between the last object and the visual height, I think you don't understand, but i know you never use thisfunction just me
33  u_int16 amplitude(){return max_amplitude_;}
34 
35  virtual void add(win_base *);
36 
37  virtual void remove(win_base *);
38 
39  virtual void remove_all();
40 
41  void resize(u_int16 tl,u_int16 th);
42 
43  void destroy();
44 
45  bool draw();
46 
47  bool update();
48 
49  bool input_update();
50 
51  void set_space_between_border(u_int16 );
52 
53  void set_space_between_object(u_int16 );
54 
55  virtual void set_pos (const u_int8 pos);
56 
57  u_int16 cursor_y(){return cursor_y_;}
58 
59  void set_auto_scrollbar(bool b){auto_scrollbar_=b;}
60 
61  void set_auto_refresh(bool b){auto_refresh_=b;}
62 
63  void set_brightness(bool b) {win_container::set_brightness(b);set_brightness_scrollbar(b);}
64 
65  void set_trans(bool b) {win_container::set_trans(b); set_trans_scrollbar(b);}
66 
67  const static u_int8 PAD_DEFAULT = 5;
68 
69  protected:
70 
71  bool up();
72 
73  bool down();
74 
75  void find_amplitude();
76 
77  void update_amplitude();
78 
79  u_int16 max_amplitude_;
80 
81  u_int16 cur_amplitude_;
82 
83  u_int16 index_pad_;
84 
85  u_int16 cursor_y_;
86 
87  bool auto_scrollbar_;
88 
89  bool auto_refresh_;
90 };
91 #endif
92 
93 
94 
#define u_int16
16 bits long unsigned integer
Definition: types.h:38
bool draw()
Draw process.
Definition: win_scroll.cc:167
void set_trans(bool b)
Set the transluency parameter.
Definition: win_scroll.h:65
virtual void set_trans(bool b)
Set the transluency parameter.
bool input_update()
Input Update process .
Definition: win_scroll.cc:216
virtual void set_brightness(bool b)
Set the transluency parameter.
#define u_int8
8 bits long unsigned integer
Definition: types.h:35
bool update()
Update process.
Definition: win_scroll.cc:190
void resize(u_int16 tl, u_int16 th)
Rezise the win_*.
Definition: win_scroll.cc:57
void set_brightness(bool b)
Set the transluency parameter.
Definition: win_scroll.h:63
Common properties for each win_base&#39;s object.
Definition: win_base.h:51