Rev 5598 | Rev 5676 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5598 | Rev 5616 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | 8 | ||
9 | struct llist |
9 | struct llist |
10 | { |
10 | { |
11 | int x, y, w, h, min_h, line_h, text_y; |
11 | int x, y, w, h, min_h, line_h, text_y; |
12 | int column_max; |
12 | int column_max; |
13 | int count, visible, first, current; |
13 | int count, visible, first, current; //visible = row_max |
14 | int active; |
14 | int active; |
15 | void ClearList(); |
15 | void ClearList(); |
16 | int ProcessKey(dword key); |
16 | int ProcessKey(dword key); |
17 | int MouseOver(int xx, yy); |
17 | int MouseOver(int xx, yy); |
Line 20... | Line 20... | ||
20 | int KeyUp(); |
20 | int KeyUp(); |
21 | int KeyHome(); |
21 | int KeyHome(); |
22 | int KeyEnd(); |
22 | int KeyEnd(); |
23 | void SetSizes(int xx, yy, ww, hh, min_hh, line_hh); |
23 | void SetSizes(int xx, yy, ww, hh, min_hh, line_hh); |
24 | int MouseScroll(dword scroll_state); |
24 | int MouseScroll(dword scroll_state); |
- | 25 | int MouseScrollNoSelection(dword scroll_state); |
|
25 | // void debug_values(); |
26 | void debug_values(); |
26 | }; |
27 | }; |
Line 27... | Line 28... | ||
27 | 28 | ||
28 | 29 | ||
29 | // void llist::debug_values() |
30 | void llist::debug_values() |
30 | // { |
31 | { |
31 | // debug("current: "); |
32 | debug("current: "); |
32 | // debugi(current); |
33 | debugi(current); |
33 | // debug("first: "); |
34 | debug("first: "); |
34 | // debugi(first); |
35 | debugi(first); |
35 | // debug("visible: "); |
36 | debug("visible: "); |
36 | // debugi(visible); |
37 | debugi(visible); |
37 | // debug("count: "); |
38 | debug("count: "); |
Line 38... | Line 39... | ||
38 | // debugi(count); |
39 | debugi(count); |
39 | // } |
40 | } |
Line 54... | Line 55... | ||
54 | h = hh; |
55 | h = hh; |
55 | min_h = min_hh; |
56 | min_h = min_hh; |
56 | line_h = line_hh; |
57 | line_h = line_hh; |
57 | text_y = line_hh / 2 - 4; |
58 | text_y = line_hh / 2 - 4; |
58 | visible = h / line_h; |
59 | visible = h / line_h; |
- | 60 | column_max = w / 6; |
|
59 | //if (visible > count) visible=count; |
61 | //if (visible > count) visible=count; |
60 | } |
62 | } |
Line 61... | Line 63... | ||
61 | 63 | ||
Line 76... | Line 78... | ||
76 | return 1; |
78 | return 1; |
77 | } |
79 | } |
78 | return 0; |
80 | return 0; |
79 | } |
81 | } |
Line -... | Line 82... | ||
- | 82 | ||
- | 83 | int llist::MouseScrollNoSelection(dword scroll_state) |
|
- | 84 | { |
|
- | 85 | if (count<=visible) return 0; |
|
- | 86 | if (scroll_state == 65535) |
|
- | 87 | { |
|
- | 88 | if (current == 0) return 0; |
|
- | 89 | if (current > 3) current -= 2; else current=0; |
|
- | 90 | return 1; |
|
- | 91 | } |
|
- | 92 | if (scroll_state == 1) |
|
- | 93 | { |
|
- | 94 | if (visible + current == count) return 0; |
|
- | 95 | if (visible+current+3 > count) current = count - visible; else current+=2; |
|
- | 96 | return 1; |
|
- | 97 | } |
|
- | 98 | return 0; |
|
- | 99 | } |
|
80 | 100 | ||
81 | int llist::MouseOver(int xx, yy) |
101 | int llist::MouseOver(int xx, yy) |
82 | { |
102 | { |
83 | if (xx>x) && (xx |
103 | if (xx>x) && (xx |
84 | return 0; |
104 | return 0; |