Subversion Repositories Kolibri OS

Rev

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

Rev 3992 Rev 4026
Line 7... Line 7...
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=";
Line 10... Line -...
10
 
-
 
11
#ifndef AUTOBUILD
-
 
12
	#include "lang.h--"
-
 
13
#endif
-
 
14
 
-
 
15
#ifdef LANG_RUS
-
 
16
	char version[]=" ’¥ªáâ®¢ë© ¡à ã§¥à 0.99.07";
-
 
17
#else
-
 
18
	char version[]=" Text-based Browser 0.99.07";
-
 
19
#endif
-
 
20
 
-
 
21
 
-
 
Line 22... Line 10...
22
 
10
 
23
 
11
 
24
struct TWebBrowser {
12
struct TWebBrowser {
25
	int left, top, width, height, line_h;
13
	int left, top, width, height, line_h;
Line 128... Line 116...
128
		start_x = stolbec * 6 + left + magrin_left;
116
		start_x = stolbec * 6 + left + magrin_left;
129
		start_y = stroka * 10 + top + magrin_left;
117
		start_y = stroka * 10 + top + magrin_left;
130
		line_length = strlen(#line) * 6;
118
		line_length = strlen(#line) * 6;
131
 
119
 
Line 132... Line -...
132
		if (use_truetype == 1)
-
 
133
		{
-
 
134
			//line_length =  get_length stdcall (#line,-1,16,line_length);
-
 
135
			text_out stdcall (#line, #fontlol, 17, text_colors[text_color_index], start_x, start_y-3);
-
 
136
		}
-
 
137
		else
-
 
138
		{
-
 
139
			WriteBufText(start_x, 0, 0x88, text_colors[text_color_index], #line, drawbuf);
120
		WriteBufText(start_x, 0, 0x88, text_colors[text_color_index], #line, drawbuf);
140
		}
-
 
141
		IF (b_text)	WriteBufText(start_x+1, 0, 0x88, text_colors[text_color_index], #line, drawbuf);
121
		IF (b_text)	WriteBufText(start_x+1, 0, 0x88, text_colors[text_color_index], #line, drawbuf);
142
		IF (i_text) DrawBufSkew(start_x, 0, line_length, line_h);
122
		IF (i_text) DrawBufSkew(start_x, 0, line_length, line_h);
143
		IF (s_text) DrawBufBar(start_x, 4, line_length, 1, text_colors[text_color_index]);
123
		IF (s_text) DrawBufBar(start_x, 4, line_length, 1, text_colors[text_color_index]);
144
		IF (u_text) DrawBufBar(start_x, 8, line_length, 1, text_colors[text_color_index]);
124
		IF (u_text) DrawBufBar(start_x, 8, line_length, 1, text_colors[text_color_index]);
145
		IF (link) {
125
		IF (link) {
Line 213... Line 193...
213
			break;
193
			break;
214
		case 002: //free img cache
194
		case 002: //free img cache
215
			FreeImgCache();
195
			FreeImgCache();
216
			break;			
196
			break;			
217
		case 005: //truetype
197
		case BACK:
218
			if (use_truetype == 2) 
-
 
219
			{
-
 
220
				RunProgram("@notify", "Library does not exists /rd/1/lib/truetype.obj"w);
-
 
221
				return;
-
 
222
			}
-
 
223
			if (use_truetype == 1) use_truetype=0; else use_truetype=1;
-
 
224
			break;
-
 
225
		case BACK:
-
 
226
			if (!BrowserHistory.GoBack()) return;
198
			if (!BrowserHistory.GoBack()) return;
227
			OpenPage();
199
			OpenPage();
228
			return;
200
			return;
229
		case FORWARD:
201
		case FORWARD:
230
			if (!BrowserHistory.GoForward()) return;
202
			if (!BrowserHistory.GoForward()) return;
Line 441... Line 413...
441
	li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab = 0; //îáíóëÿåì òåãè
413
	li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab = 0; //îáíóëÿåì òåãè
442
	link_color = 0x0000FF;
414
	link_color = 0x0000FF;
443
	bg_color = 0xFFFFFF;
415
	bg_color = 0xFFFFFF;
444
	DrawBufFill();
416
	DrawBufFill();
445
	line = NULL;
417
	strcpy(#page_links,"|");
446
	strcpy(#page_links,"|");
-
 
447
	strcpy(#header, #version);
418
	strcpy(#header, #version);
448
	stroka = -lines.first;
419
	stroka = -lines.first;
449
	stolbec = 0;
420
	stolbec = 0;
450
 
421
	line = 0;
-
 
422
 
Line 451... Line 423...
451
	if (pre_text<>2)
423
	if (pre_text<>2)
452
	{
424
	{
453
		pre_text=0;
425
		pre_text=0;
454
		if (!strcmp(#URL + strlen(#URL) - 4, ".txt")) pre_text = 1;
426
		if (!strcmp(#URL + strlen(#URL) - 4, ".txt")) pre_text = 1;
Line 782... Line 754...
782
		TextGoDown(left1, top1, width1);
754
		TextGoDown(left1, top1, width1);
783
		DrawBufBar(5, WB1.line_h/2, WB1.width-10, 1, hr_color);
755
		DrawBufBar(5, WB1.line_h/2, WB1.width-10, 1, hr_color);
784
		TextGoDown(left1, top1+WB1.line_h, width1);
756
		TextGoDown(left1, top1+WB1.line_h, width1);
785
	}
757
	}
786
	/*
758
	if (!chTag("img"))
787
	if (!chTag("input"))
-
 
788
	{
-
 
789
		do{
-
 
790
			if (!strcmp(#parametr, "type="))
-
 
791
			{
-
 
792
				if ((!strcmp(#options, "radio")) || (!strcmp(#options, "checkbox")))
-
 
793
				{
-
 
794
					if (!anchor) && (stroka > 0) CheckBox(stolbec*6 + left1,top1-2,10,10, 0, "\0", 0x888888, text_colors[text_color_index], 0);
-
 
795
					stolbec+=2;
-
 
796
				}
-
 
797
				if ((!strcmp(#options, "text")) || (!strcmp(#options, "password")))
-
 
798
				{
-
 
799
					if (!anchor) && (stroka > 0) CheckBox(stolbec*6 + left1,top1-2,90,10, 0, "\0", 0x555555, 0, 0);
-
 
800
					stolbec+=16;
-
 
801
				}
-
 
802
				if ((!strcmp(#options, "button")) || (!strcmp(#options, "file")) || (!strcmp(#options, "submit")))
-
 
803
				{
-
 
804
					if (!anchor) && (stroka > 0) DrawCaptButton(stolbec*6 + left1,top1-2,60,10, 0, 0xCCCccc, 0, "Button");
-
 
805
					stolbec+=21;
-
 
806
				}
-
 
807
			}
-
 
808
		} while(GetNextParam());
-
 
809
	}
-
 
810
	*/
-
 
811
	if (!chTag("img"))
-
 
812
	{
759
	{
813
		Images( left1, top1, width1);
760
		Images( left1, top1, width1);
814
		return;
761
		return;
815
	}
762
	}
816
	if (!chTag("meta")) || (!chTag("?xml"))
763
	if (!chTag("meta")) || (!chTag("?xml"))