Subversion Repositories Kolibri OS

Rev

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

Rev 3129 Rev 3363
Line 473... Line 473...
473
			{
473
			{
474
				if (line[strlen(#line)-1]==' ') break; //óáðàòü 2 ïðîáåëà ïîäðÿä
474
				if (line[strlen(#line)-1]==' ') break; //óáðàòü 2 ïðîáåëà ïîäðÿä
475
				if (!stolbec) && (!line) break; //ñòðîêà íå ìîæåò íà÷èíàòüñÿ ñ ïðîáåëà
475
				if (!stolbec) && (!line) break; //ñòðîêà íå ìîæåò íà÷èíàòüñÿ ñ ïðîáåëà
476
			}
476
			}
477
			if (strlen(#line)
477
			if (strlen(#line)
478
 
478
 
Line 479... Line 479...
479
			if (stolbec + strlen(#line) > lines.column_max)
479
			if (stolbec + strlen(#line) > lines.column_max)
480
			{
480
			{
481
			NEXT_MARK:
481
			NEXT_MARK:
482
				perenos_num = strrchr(#line, ' ');
482
				perenos_num = strrchr(#line, ' ');
Line 826... Line 826...
826
	dword image;
826
	dword image;
827
    char img_path[4096], alt[4096];
827
    char img_path[4096], alt[4096];
828
    int w=0, h=0, img_lines_first=0, cur_pic=0;
828
    int w=0, h=0, img_lines_first=0, cur_pic=0;
829
	
829
	
Line 830... Line -...
830
	if (GetFileInfo(libimg)<>0) return;  //åñëè áèáëèîòåêè íåò
-
 
831
		do{
830
	do{
832
			if (!strcmp(#parametr,"src="))   //íàäî îáúåäèíèòü ñ GetNewUrl()
831
		if (!strcmp(#parametr,"src="))   //íàäî îáúåäèíèòü ñ GetNewUrl()
-
 
832
		{
-
 
833
			if (downloader_id) strcpy(#img_path, #history_list[history_current-1].Item);
-
 
834
				else strcpy(#img_path, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû
-
 
835
			
-
 
836
			if (strcmpn(#img_path, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0)
833
			{
837
			{
834
				if (downloader_id) strcpy(#img_path, #history_list[history_current-1].Item);
838
				img_path[strrchr(#img_path, '/')] = '\0'; //îáðåçàåì å¸ óðë äî ïîñëåäíåãî /
835
					else strcpy(#img_path, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû
839
				strcat(#img_path, #options);
Line 836... Line 840...
836
				
840
				
-
 
841
				cur_pic=GetOrSetPicNum(#img_path);
837
				if (strcmpn(#img_path, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0)
842
				if (!pics[cur_pic].path)
838
				{
-
 
839
					img_path[strrchr(#img_path, '/')] = '\0'; //îáðåçàåì å¸ óðë äî ïîñëåäíåãî /
-
 
840
					strcat(#img_path, #options);
-
 
841
					
-
 
842
					cur_pic=GetOrSetPicNum(#img_path);
-
 
843
					if (!pics[cur_pic].path)
-
 
844
					{
843
				{
845
						pics[cur_pic].image=load_image(#img_path);
844
					pics[cur_pic].image=load_image(#img_path);
846
						strcpy(#pics[cur_pic].path, #img_path);
-
 
847
					}
845
					strcpy(#pics[cur_pic].path, #img_path);
848
				}
846
				}
849
			}
-
 
850
  			if (!strcmp(#parametr,"alt="))
-
 
851
			{
-
 
852
				strcpy(#alt, "[");
-
 
853
				strcat(#alt, #options);
-
 
854
				strcat(#alt, "]");
-
 
855
			}
-
 
856
 
-
 
857
		} while(GetNextParam());
-
 
858
		
-
 
859
		if (!pics[cur_pic].image) 
-
 
860
		{
-
 
861
			if (alt) && (link) strcat(#line, #alt);
-
 
862
			return;
847
			}
863
		}
-
 
864
		
-
 
865
		w=DSWORD[pics[cur_pic].image+4];
-
 
866
		h=DSWORD[pics[cur_pic].image+8];
848
		}
867
		if (w>width1) w=width1;
-
 
868
		
-
 
869
		if (stroka==0) DrawBar(WB1.left, WB1.top, WB1.width-15, 15, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó
-
 
870
		stroka+=h/10;
-
 
871
		if (top1+hWB1.top+WB1.height-10) return; //åñëè ÂѨ èçîáðàæåíèå óøëî ÂÅÐÕ èëè ÂÍÈÇ
-
 
872
		if (top1
849
			if (!strcmp(#parametr,"alt="))
873
		{
-
 
874
			DrawBar(WB1.left, WB1.top, WB1.width-15, 10, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó
850
		{
875
			img_lines_first=WB1.top-top1;
851
			strcpy(#alt, "[");
876
			h=h-img_lines_first;
852
			strcat(#alt, #options);
877
			top1=WB1.top;
853
			strcat(#alt, "]");
-
 
854
		}
-
 
855
 
-
 
856
	} while(GetNextParam());
-
 
857
	
-
 
858
	if (!pics[cur_pic].image) 
-
 
859
	{
-
 
860
		if (alt) && (link) strcat(#line, #alt);
-
 
861
		return;
-
 
862
	}
-
 
863
	
-
 
864
	w=DSWORD[pics[cur_pic].image+4];
-
 
865
	h=DSWORD[pics[cur_pic].image+8];
-
 
866
	if (w>width1) w=width1;
-
 
867
	
-
 
868
	if (stroka==0) DrawBar(WB1.left, WB1.top, WB1.width-15, 15, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó
-
 
869
	stroka+=h/10;
-
 
870
	if (top1+hWB1.top+WB1.height-10) return; //åñëè ÂѨ èçîáðàæåíèå óøëî ÂÅÐÕ èëè ÂÍÈÇ
-
 
871
	if (top1
-
 
872
	{
-
 
873
		DrawBar(WB1.left, WB1.top, WB1.width-15, 10, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó
-
 
874
		img_lines_first=WB1.top-top1;
-
 
875
		h=h-img_lines_first;
-
 
876
		top1=WB1.top;
878
		}
877
	}
879
		if (top1>WB1.top+WB1.height-h-15) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó
878
	if (top1>WB1.top+WB1.height-h-15) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó
880
		{
879
	{
881
			h=WB1.top+WB1.height-top1-15;
880
		h=WB1.top+WB1.height-top1-15;
882
		}	
881
	}	
883
		if (h<=0) return;
882
	if (h<=0) return;
884
		if (anchor) return;
883
	if (anchor) return;
885
		
884
	
886
		img_draw stdcall (pics[cur_pic].image,left1-5,top1+10,w, h,0,img_lines_first);
885
	img_draw stdcall (pics[cur_pic].image,left1-5,top1+10,w, h,0,img_lines_first);
887
		DrawBar(left1+w - 5, top1 + 10, width1-w + 5, h, bg_color);
886
	DrawBar(left1+w - 5, top1 + 10, width1-w + 5, h, bg_color);
888
		IF (link) DefineButton(left1 - 5, top1+10, w, h, blink + BT_HIDE, 0xB5BFC9);
887
	IF (link) DefineButton(left1 - 5, top1+10, w, h, blink + BT_HIDE, 0xB5BFC9);
Line 889... Line 888...
889
}
888
}
890
 
889