Rev 4059 | Rev 4073 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4059 | Rev 4063 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | int count, visible, first, current; |
6 | int count, visible, first, current; |
7 | int current_temp; |
7 | int current_temp; |
8 | void ClearList(); |
8 | void ClearList(); |
9 | int KeyDown(); |
9 | int KeyDown(); |
10 | int KeyUp(); |
10 | int KeyUp(); |
- | 11 | int KeyHome(); |
|
- | 12 | int KeyEnd(); |
|
11 | void SetSizes(int xx, yy, ww, hh, min_hh, line_hh); |
13 | void SetSizes(int xx, yy, ww, hh, min_hh, line_hh); |
12 | int MouseScroll(dword scroll_state); |
14 | int MouseScroll(dword scroll_state); |
13 | }; |
15 | }; |
Line 49... | Line 51... | ||
49 | 51 | ||
50 | int llist::KeyDown() |
52 | int llist::KeyDown() |
51 | { |
53 | { |
52 | if (current-first+1 |
54 | if (current-first+1 |
53 | { |
55 | { |
54 | if (current+1>=count) return -1; |
56 | if (current+1>=count) return 0; |
55 | current++; |
57 | current++; |
56 | } |
58 | } |
57 | else |
59 | else |
58 | { |
60 | { |
59 | if (visible+first>=count) return -1; |
61 | if (visible+first>=count) return 0; |
60 | first++; |
62 | first++; |
61 | current++; |
63 | current++; |
62 | } |
64 | } |
63 | return 1; |
65 | return 1; |
Line 69... | Line 71... | ||
69 | { |
71 | { |
70 | current--; |
72 | current--; |
71 | } |
73 | } |
72 | else |
74 | else |
73 | { |
75 | { |
74 | if (first==0) return -1; |
76 | if (first==0) return 0; |
75 | first--; |
77 | first--; |
76 | current--; |
78 | current--; |
77 | } |
79 | } |
78 | return 1; |
80 | return 1; |
79 | } |
81 | } |
80 | > |
82 | |
- | 83 | int llist::KeyHome() |
|
- | 84 | { |
|
- | 85 | if (current==0) && (first==0) return 0; |
|
- | 86 | current=0; |
|
- | 87 | first=0; |
|
- | 88 | return 1; |
|
- | 89 | } |
|
- | 90 | ||
- | 91 | int llist::KeyEnd() |
|
- | 92 | { |
|
- | 93 | if (current==count-1) && (first==count-visible) return 0; |
|
- | 94 | current=count-1; |
|
- | 95 | first=count-visible; |
|
- | 96 | return 1; |
|
- | 97 | } |
|
- | 98 | > |
|
81 | 99 |