Adonthell  0.4
win_scroll.h
1 /*
2  $Id: win_scroll.h,v 1.4 2003/02/23 23:14:34 ksterker Exp $
3 
4  (C) Copyright 2000 Joel Vennin
5  Part of the Adonthell Project http://adonthell.linuxgames.com
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details
13 */
14 
15 #ifndef WIN_SCROLLED_H
16 #define WIN_SCROLLED_H
17 
18 #include "win_container.h"
19 #include "win_scrollbar.h"
20 
21 class win_scroll : public win_container, public win_scrollbar
22 {
23 
24  public:
25  //constructor x,y,length,height,and a theme
26  win_scroll();
27 
28  //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
29  u_int16 amplitude(){return max_amplitude_;}
30 
31  virtual void add(win_base *);
32 
33  virtual void remove(win_base *);
34 
35  virtual void remove_all();
36 
37  void resize(u_int16 tl,u_int16 th);
38 
39  void destroy();
40 
41  bool draw();
42 
43  bool update();
44 
45  bool input_update();
46 
47  void set_space_between_border(u_int16 );
48 
49  void set_space_between_object(u_int16 );
50 
51  virtual void set_pos (const u_int8 pos);
52 
53  u_int16 cursor_y(){return cursor_y_;}
54 
55  void set_auto_scrollbar(bool b){auto_scrollbar_=b;}
56 
57  void set_auto_refresh(bool b){auto_refresh_=b;}
58 
59  void set_brightness(bool b) {win_container::set_brightness(b);set_brightness_scrollbar(b);}
60 
61  void set_trans(bool b) {win_container::set_trans(b); set_trans_scrollbar(b);}
62 
63  const static u_int8 PAD_DEFAULT = 5;
64 
65  protected:
66 
67  bool up();
68 
69  bool down();
70 
71  void find_amplitude();
72 
73  void update_amplitude();
74 
75  u_int16 max_amplitude_;
76 
77  u_int16 cur_amplitude_;
78 
79  u_int16 index_pad_;
80 
81  u_int16 cursor_y_;
82 
83  bool auto_scrollbar_;
84 
85  bool auto_refresh_;
86 };
87 #endif
88 
89 
90 
#define u_int16
16 bits long unsigned integer
Definition: types.h:32
bool draw()
Draw process.
Definition: win_scroll.cc:163
void set_trans(bool b)
Set the transluency parameter.
Definition: win_scroll.h:61
virtual void set_trans(bool b)
Set the transluency parameter.
bool input_update()
Input Update process
Definition: win_scroll.cc:212
virtual void set_brightness(bool b)
Set the transluency parameter.
#define u_int8
8 bits long unsigned integer
Definition: types.h:29
bool update()
Update process.
Definition: win_scroll.cc:186
void resize(u_int16 tl, u_int16 th)
Rezise the win_*.
Definition: win_scroll.cc:53
void set_brightness(bool b)
Set the transluency parameter.
Definition: win_scroll.h:59
Common properties for each win_base's object.
Definition: win_base.h:47