9,7 → 9,7 |
struct ImageCache { |
int pics_count; |
void Free(); |
int GetImageNumber(); |
int GetImage(); |
void Images(); |
}; |
|
22,7 → 22,7 |
} |
} |
|
int ImageCache::GetImageNumber(dword i_path) |
int ImageCache::GetImage(dword i_path) |
{ |
int i; |
for (i=0; i<=pics_count; i++) if (!strcmp(#pics[i].path, i_path)) return i; //image exists |
43,10 → 43,15 |
do{ |
if (!strcmp(#parametr,"src=")) //íàäî îáúåäèíèòü ñ GetNewUrl() |
{ |
if (http_transfer<>0) strcpy(#img_path, #history_list[BrowserHistory.current-1].Item); else |
if (http_transfer!=0) |
strcpy(#img_path, #history_list[BrowserHistory.current-1].Item); |
else |
{ |
//if (strcmp(#options)) |
strcpy(#img_path, #options); |
} |
PageLinks.GetAbsoluteURL(#img_path); |
cur_pic = GetImageNumber(#img_path); |
cur_pic = GetImage(#img_path); |
} |
if (!strcmp(#parametr,"alt=")) |
{ |
67,17 → 72,17 |
imgh = DSWORD[pics[cur_pic].image+8]; |
if (imgw > width1) imgw = width1; |
|
if (stroka==0) DrawBar(WB1.list.x, WB1.list.y, WB1.list.w-15, 5, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
if (stroka==0) DrawBar(WB1.list.x, WB1.list.y, WB1.list.w-15, 5, bg_color); //fill first line |
stroka += imgh / WB1.list.line_h; |
if (imgh % WB1.list.line_h) stroka++; |
if (top1+imgh<WB1.list.y) || (top1>WB1.list.y+WB1.list.h-10) return; //åñëè ÂѨ èçîáðàæåíèå óøëî ÂÅÐÕ èëè ÂÍÈÇ |
if (top1<WB1.list.y) //åñëè ÷àñòü èçîáðàæåíèÿ ñâåðõó |
if (top1+imgh<WB1.list.y) || (top1>WB1.list.y+WB1.list.h-10) return; //if all image is out of visible area |
if (top1<WB1.list.y) //if image partly visible (at the top) |
{ |
img_lines_first=WB1.list.y-top1; |
imgh=imgh-img_lines_first; |
top1=WB1.list.y; |
} |
if (top1>WB1.list.y+WB1.list.h-imgh-5) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó |
if (top1>WB1.list.y+WB1.list.h-imgh-5) //if image partly visible (at the bottom) |
{ |
imgh=WB1.list.y+WB1.list.h-top1-5; |
} |
87,7 → 92,7 |
img_draw stdcall (pics[cur_pic].image, left1-5, top1, imgw, imgh,0,img_lines_first); |
DrawBar(left1+imgw - 5, top1, WB1.list.w-imgw, imgh, bg_color); |
DrawBar(WB1.list.x, top1+imgh, WB1.list.w, -imgh % WB1.list.line_h + WB1.list.line_h, bg_color); |
IF (link) |
if (link) |
{ |
UnsafeDefineButton(left1 - 5, top1, imgw, imgh-1, PageLinks.count + 400 + BT_HIDE, 0xB5BFC9); |
PageLinks.AddText(0, imgw, imgh-1, NOLINE); |