Subversion Repositories Kolibri OS

Rev

Rev 5733 | Rev 5778 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5733 Rev 5749
Line 10... Line 10...
10
struct llist
10
struct llist
11
{
11
{
12
	int x, y, w, h, line_h, text_y;
12
	int x, y, w, h, line_h, text_y;
13
	dword font_w, font_h, font_type;
13
	dword font_w, font_h, font_type;
14
	int count, visible, first, current, column_max; //visible = row_max
14
	int count, visible, first, current, column_max; //visible = row_max
-
 
15
	int wheel_size;
15
	int active;
16
	int active;
16
	void ClearList();
17
	void ClearList();
17
	int MouseOver(int xx, yy);
18
	int MouseOver(int xx, yy);
18
	int ProcessMouse(int xx, yy);
19
	int ProcessMouse(int xx, yy);
19
	int ProcessKey(dword key);
20
	int ProcessKey(dword key);
Line 55... Line 56...
55
	w = ww;
56
	w = ww;
56
	h = hh;
57
	h = hh;
57
	line_h = line_hh;
58
	line_h = line_hh;
58
	text_y = line_h - font_h / 2;
59
	text_y = line_h - font_h / 2;
59
	visible = h / line_h;
60
	visible = h / line_h;
-
 
61
	wheel_size = 3;
60
	//if (visible > count) visible=count;
62
	//if (visible > count) visible=count;
61
}
63
}
Line 62... Line 64...
62
 
64
 
63
void llist::SetFont(dword font_ww, font_hh, font_tt)
65
void llist::SetFont(dword font_ww, font_hh, font_tt)
Line 72... Line 74...
72
{
74
{
73
	if (count<=visible) return 0;
75
	if (count<=visible) return 0;
74
	if (scroll_state == 65535)
76
	if (scroll_state == 65535)
75
	{
77
	{
76
		if (first == 0) return 0;
78
		if (first == 0) return 0;
77
		if (first > 3) first -= 2; else first=0;
79
		if (first > wheel_size+1) first -= wheel_size; else first=0;
78
		return 1;
80
		return 1;
79
	} 
81
	} 
80
	if (scroll_state == 1)
82
	if (scroll_state == 1)
81
	{
83
	{
82
		if (visible + first == count) return 0;
84
		if (visible + first == count) return 0;
83
		if (visible+first+3 > count) first = count - visible; else first+=2;
85
		if (visible+first+wheel_size+1 > count) first = count - visible; else first+=wheel_size;
84
		return 1;
86
		return 1;
85
	}
87
	}
86
	return 0;
88
	return 0;
87
}
89
}