Subversion Repositories Kolibri OS

Rev

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

Rev 2895 Rev 3005
Line 6... Line 6...
6
	blink;
6
	blink;
7
 
7
 
Line 8... Line 8...
8
char download_path[]="/rd/1/.download";
8
char download_path[]="/rd/1/.download";
9
char search_path[]="http://nigma.ru/index.php?s=";
9
char search_path[]="http://nigma.ru/index.php?s=";
10
char version[]=" Text-based Browser 0.97";
10
char version[]=" Text-based Browser 0.97.5";
Line 11... Line 11...
11
 
11
 
12
 
12
 
13
struct TWebBrowser {
13
struct TWebBrowser {
Line 117... Line 117...
117
		case 001:
117
		case 001:
118
			if (!pre_text) pre_text=2;
118
			if (!pre_text) pre_text=2;
119
				else pre_text=0;
119
				else pre_text=0;
120
			break;
120
			break;
121
		case BACK:
121
		case 005: //truetype
-
 
122
			if (use_truetype == 1) use_truetype=0; else use_truetype=1;
-
 
123
			break;
-
 
124
		case BACK:
122
			if (!BrowserHistory.GoBack()) return;
125
			if (!BrowserHistory.GoBack()) return;
123
			OpenPage();
126
			OpenPage();
124
			return;
127
			return;
125
		case FORWARD:
128
		case FORWARD:
126
			if (!BrowserHistory.GoForward()) return;
129
			if (!BrowserHistory.GoForward()) return;
Line 128... Line 131...
128
			return;
131
			return;
129
		case 052:  //Íàæàòà F3
132
		case 052:  //Íàæàòà F3
130
			if (strcmp(get_URL_part(5),"http:")<>0) RunProgram("/rd/1/tinypad", #URL); else RunProgram("/rd/1/tinypad", #download_path);
133
			if (strcmp(get_URL_part(5),"http:")<>0) RunProgram("/rd/1/tinypad", #URL); else RunProgram("/rd/1/tinypad", #download_path);
131
			return;
134
			return;
132
		case 053:  //Íàæàòà F4
135
		case 054: //F5
133
			if (strcmp(get_URL_part(5),"http:")<>0) RunProgram("/rd/1/develop/t_edit", #URL); else RunProgram("/rd/1/develop/t_edit", #download_path);
-
 
134
			return;
-
 
135
		case 054: //F5
-
 
136
			IF(edit1.flags == 66) break;
136
			IF(edit1.flags == 66) break;
137
		case REFRESH:
137
		case REFRESH:
138
			if (GetProcessSlot(downloader_id)<>0)
138
			if (GetProcessSlot(downloader_id)<>0)
139
			{
139
			{
140
				KillProcess(downloader_id);
140
				KillProcess(downloader_id);
Line 178... Line 178...
178
		case 183: //PgDown
178
		case 183: //PgDown
179
			IF(lines.first == lines.all - lines.visible) return;
179
			IF(lines.first == lines.all - lines.visible) return;
180
			lines.first += lines.visible + 2;
180
			lines.first += lines.visible + 2;
181
			IF(lines.visible + lines.first > lines.all) lines.first = lines.all - lines.visible;
181
			IF(lines.visible + lines.first > lines.all) lines.first = lines.all - lines.visible;
182
			BREAK;
182
			break;
183
		case 184: //PgUp
183
		case 184: //PgUp
184
			IF(lines.first == 0) RETURN;
184
			IF(lines.first == 0) return;
185
			lines.first -= lines.visible - 2;
185
			lines.first -= lines.visible - 2;
186
			IF(lines.first < 0) lines.first = 0;
186
			IF(lines.first < 0) lines.first = 0;
187
			BREAK;
187
			break;
188
		case 180: //home
188
		case 180: //home
189
			IF(lines.first == 0) RETURN;
189
			IF(lines.first == 0) return;
190
			lines.first = 0;
190
			lines.first = 0;
191
			BREAK; 
191
			break; 
192
		case 181: //end
192
		case 181: //end
193
			IF (lines.first == lines.all - lines.visible) RETURN;
193
			IF (lines.first == lines.all - lines.visible) return;
194
			lines.first = lines.all - lines.visible;
194
			lines.first = lines.all - lines.visible;
195
			BREAK; 
195
			break; 
196
		default:
196
		default:
197
			RETURN;
197
			return;
198
	}
198
	}
199
	ParseHTML(buf);
199
	ParseHTML(buf);
200
}
200
}
201
 
201
 
Line 538... Line 538...
538
		start_x=stolbec * 6 + left+5;
538
		start_x=stolbec * 6 + left+5;
539
		start_y=stroka * 10 + top + 5;
539
		start_y=stroka * 10 + top + 5;
540
		line_length=strlen(#line)*6;
540
		line_length=strlen(#line)*6;
Line 541... Line 541...
541
		
541
 
-
 
542
		if (use_truetype == 1)
542
		WriteText(start_x, start_y, 0x80, text_colors[text_color_index], #line, 0);
543
		{
543
		//line_length =  get_length stdcall (#line,-1,16,line_length);
544
			//line_length =  get_length stdcall (#line,-1,16,line_length);
-
 
545
			text_out stdcall (#line, -1, 17, text_colors[text_color_index], start_x, start_y-3);
-
 
546
			Pause(10);
-
 
547
		}
-
 
548
		else
-
 
549
		{
544
		//text_out stdcall (#line, -1, 17, text_colors[text_color_index], start_x, start_y-2);
550
			WriteText(start_x, start_y, 0x80, text_colors[text_color_index], #line, 0);
-
 
551
			IF (b_text)	{ $add ebx, 1<<16   $int 0x40 }
545
		IF (b_text)	{ $add ebx, 1<<16   $int 0x40 }
552
		}
546
		IF (i_text) Skew(start_x, start_y, line_length+6, 10);
553
		IF (i_text) Skew(start_x, start_y, line_length+6, 10);
547
		IF (s_text) DrawBar(start_x, start_y + 4, line_length, 1, text_colors[text_color_index]);
554
		IF (s_text) DrawBar(start_x, start_y + 4, line_length, 1, text_colors[text_color_index]);
548
		IF (u_text) DrawBar(start_x, start_y + 8, line_length, 1, text_colors[text_color_index]);
555
		IF (u_text) DrawBar(start_x, start_y + 8, line_length, 1, text_colors[text_color_index]);
549
		IF (link) {
556
		IF (link) {