Subversion Repositories Kolibri OS

Rev

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

Rev 4636 Rev 4674
Line 36... Line 36...
36
 
36
 
37
void ImageCache::Images(int left1, top1, width1)
37
void ImageCache::Images(int left1, top1, width1)
38
{
38
{
39
	dword image;
39
	dword image;
40
    char img_path[4096], alt[4096];
40
    char img_path[4096], alt[4096];
Line 41... Line 41...
41
    int w=0, h=0, img_lines_first=0, cur_pic=0;
41
    int imgw=0, imgh=0, img_lines_first=0, cur_pic=0;
42
	
42
	
43
	do{
43
	do{
44
		if (!strcmp(#parametr,"src="))   //íàäî îáúåäèíèòü ñ GetNewUrl()
44
		if (!strcmp(#parametr,"src="))   //íàäî îáúåäèíèòü ñ GetNewUrl()
Line 71... Line 71...
71
	{
71
	{
72
		if (alt) && (link) strcat(#line, #alt);
72
		if (alt) && (link) strcat(#line, #alt);
73
		return;
73
		return;
74
	}
74
	}
Line 75... Line 75...
75
	
75
	
76
	w = DSWORD[pics[cur_pic].image+4];
76
	imgw = DSWORD[pics[cur_pic].image+4];
77
	h = DSWORD[pics[cur_pic].image+8];
77
	imgh = DSWORD[pics[cur_pic].image+8];
Line 78... Line 78...
78
	if (w > width1) w = width1;
78
	if (imgw > width1) imgw = width1;
79
	
79
	
80
	if (stroka==0) DrawBar(WB1.list.x, WB1.list.y, WB1.list.w-15, 5, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó
80
	if (stroka==0) DrawBar(WB1.list.x, WB1.list.y, WB1.list.w-15, 5, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó
81
	stroka += h/10;
81
	stroka += imgh/10;
82
	if (top1+hWB1.list.y+WB1.list.h-10) return; //åñëè ÂѨ èçîáðàæåíèå óøëî ÂÅÐÕ èëè ÂÍÈÇ
82
	if (top1+imghWB1.list.y+WB1.list.h-10) return; //åñëè ÂѨ èçîáðàæåíèå óøëî ÂÅÐÕ èëè ÂÍÈÇ
83
	if (top1
83
	if (top1
84
	{
84
	{
85
		img_lines_first=WB1.list.y-top1;
85
		img_lines_first=WB1.list.y-top1;
86
		h=h-img_lines_first;
86
		imgh=imgh-img_lines_first;
87
		top1=WB1.list.y;
87
		top1=WB1.list.y;
88
	}
88
	}
89
	if (top1>WB1.list.y+WB1.list.h-h-5) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó
89
	if (top1>WB1.list.y+WB1.list.h-imgh-5) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó
90
	{
90
	{
91
		h=WB1.list.y+WB1.list.h-top1-5;
91
		imgh=WB1.list.y+WB1.list.h-top1-5;
92
	}	
92
	}	
Line 93... Line 93...
93
	if (h<=0) return;
93
	if (imgh<=0) return;
94
	if (anchor) return;
94
	if (anchor) return;
95
	
95
	
96
	img_draw stdcall (pics[cur_pic].image, left1-5, top1, w, h,0,img_lines_first);
96
	img_draw stdcall (pics[cur_pic].image, left1-5, top1, imgw, imgh,0,img_lines_first);
97
	DrawBar(left1+w - 5, top1, WB1.list.w-w, h, bg_color);
97
	DrawBar(left1+imgw - 5, top1, WB1.list.w-imgw, imgh, bg_color);
98
	IF (link)
98
	IF (link)
99
	{
99
	{
100
		UnsafeDefineButton(left1 - 5, top1, w, h-1, PageLinks.count + 400 + BT_HIDE, 0xB5BFC9);
100
		UnsafeDefineButton(left1 - 5, top1, imgw, imgh-1, PageLinks.count + 400 + BT_HIDE, 0xB5BFC9);
101
		PageLinks.AddText(0, w, h-1, NOLINE);	
101
		PageLinks.AddText(0, imgw, imgh-1, NOLINE);	
Line 102... Line 102...
102
		// WB1.DrawPage();
102
		// WB1.DrawPage();
103
	} 
103
	}