Subversion Repositories Kolibri OS

Rev

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

Rev 5746 Rev 5772
Line 2... Line 2...
2
dword CursorFile = FROM "../TWB/pointer.cur";
2
dword CursorFile = FROM "../TWB/pointer.cur";
Line 3... Line 3...
3
 
3
 
4
#define NOLINE    0
4
#define NOLINE    0
Line 5... Line -...
5
#define UNDERLINE 1
-
 
6
 
5
#define UNDERLINE 1
7
 
6
 
8
struct array_link {
7
struct array_link {
9
	dword link, text;
8
	dword link, text;
10
	int x,y,w,h;
9
	int x,y,w,h;
Line 11... Line 10...
11
	int underline;
10
	int underline;
12
};
-
 
13
 
11
};
14
struct LinksArray
12
 
15
{
13
struct LinksArray {
16
	array_link links[200];
14
	array_link links[400];
17
	char page_links[64000];
-
 
18
	dword buflen;
15
	char page_links[64000];
19
	int count, active;
16
	dword buflen;
20
 
17
	int count, active;
21
	void Hover();
18
	void Hover();
22
	void AddLink();
19
	void AddLink();
23
	void AddText();
20
	void AddText();
24
	dword GetURL();
21
	dword GetURL();
25
	void Clear();
22
	void Clear();
Line 26... Line 23...
26
	void GetAbsoluteURL();
23
	void GetAbsoluteURL();
27
	int UrlAbsolute();
24
	int UrlAbsolute();
28
} PageLinks;
25
} PageLinks;
29
 
26
 
Line 30... Line 27...
30
void LinksArray::AddLink(dword new_link, int link_x, link_y)
27
void LinksArray::AddLink(dword lpath, int link_x, link_y)
31
{
28
{
32
	links[count].x = link_x;
29
	links[count].x = link_x;
33
	links[count].y = link_y;
30
	links[count].y = link_y;
34
 
31
 
Line 35... Line 32...
35
	links[count].link = buflen;
32
	links[count].link = buflen;
36
	strcpy(buflen, new_link);
33
	strcpy(buflen, lpath);
Line 69... Line 66...
69
PathShow_data status_text = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, 0, #temp, 0};
66
PathShow_data status_text = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, 0, #temp, 0};
Line 70... Line 67...
70
 
67
 
71
void LinksArray::Hover(dword mx, my, link_col_in, link_col_a, bg_col)
68
void LinksArray::Hover(dword mx, my, link_col_in, link_col_a, bg_col)
72
{
69
{
-
 
70
	int i;
73
	int i;
71
	signed int WBY =  -WB1.list.first*WB1.list.line_h + WB1.list.line_h - WB1.DrawBuf.zoom;
74
	for (i=0; i
72
	for (i=0; i
75
	{
73
	{
76
		if (mx>links[i].x) && (my>links[i].y) && (mx
74
		if (mx>links[i].x) && (my>links[i].y) && (mx
77
		{
75
		{
78
			if (active==i) return;
76
			if (active==i) return;
79
			CursorPointer.Set();
77
			CursorPointer.Set();
80
			if (links[active].underline) DrawBar(links[active].x, WB1.list.line_h - WB1.DrawBuf.zoom + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
78
			if (links[active].underline) DrawBar(links[active].x, WBY + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
81
			if (links[i].underline) DrawBar(links[i].x, WB1.list.line_h - WB1.DrawBuf.zoom + links[i].y,links[i].w, WB1.DrawBuf.zoom, bg_col);
79
			if (links[i].underline) DrawBar(links[i].x, WBY + links[i].y,links[i].w, WB1.DrawBuf.zoom, bg_col);
82
			active = i;
80
			active = i;
83
			status_text.start_x = wv_progress_bar.left + wv_progress_bar.width + 10;
81
			status_text.start_x = wv_progress_bar.left + wv_progress_bar.width + 10;
84
			status_text.start_y = Form.cheight - STATUSBAR_H + 3;
82
			status_text.start_y = Form.cheight - STATUSBAR_H + 3;
85
			status_text.area_size_x = Form.cwidth - status_text.start_x -3;
83
			status_text.area_size_x = Form.cwidth - status_text.start_x -3;
Line 91... Line 89...
91
		}
89
		}
92
	}
90
	}
93
	if (active!=-1)
91
	if (active!=-1)
94
	{
92
	{
95
		CursorPointer.Restore();
93
		CursorPointer.Restore();
96
		if (links[active].underline) DrawBar(links[active].x, WB1.list.line_h - WB1.DrawBuf.zoom + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
94
		if (links[active].underline) DrawBar(links[active].x, WBY + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
97
		DrawBar(status_text.start_x, status_text.start_y, status_text.area_size_x, 9, col_bg);
95
		DrawBar(status_text.start_x, status_text.start_y, status_text.area_size_x, 9, col_bg);
98
		active = -1;
96
		active = -1;
99
	}
97
	}
100
}
98
}
Line 161... Line 159...
161
	
159
	
162
	strcat(#newurl, in_URL);
160
	strcat(#newurl, in_URL);
163
	strcpy(orig_URL, #newurl);
161
	strcpy(orig_URL, #newurl);
Line 164... Line -...
164
}
-