Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5771 → Rev 5772

/programs/cmm/TWB/TWB.c
102,7 → 102,6
if (style.u) DrawBuf.DrawBar(start_x, list.line_h - DrawBuf.zoom - DrawBuf.zoom + start_y, line_length, DrawBuf.zoom, text_colors[text_color_index]);
if (link) {
DrawBuf.DrawBar(start_x, list.line_h - DrawBuf.zoom - DrawBuf.zoom + start_y, line_length, DrawBuf.zoom, text_colors[text_color_index]);
UnsafeDefineButton(start_x-2, start_y-1 + list.y, line_length + 3, DrawBuf.zoom * list.font_h, PageLinks.count + 400 + BT_HIDE, 0xB5BFC9);
PageLinks.AddText(#line, line_length, list.line_h, UNDERLINE);
}
stolbec += stolbec_len;
312,7 → 311,6
do{
if (isattr("href="))
{
if (stroka - 1 > list.visible) || (stroka < -2) return;
text_color_index++;
text_colors[text_color_index] = text_colors[text_color_index-1];
link = 1;
/programs/cmm/TWB/links.h
4,7 → 4,6
#define NOLINE 0
#define UNDERLINE 1
 
 
struct array_link {
dword link, text;
int x,y,w,h;
11,13 → 10,11
int underline;
};
 
struct LinksArray
{
array_link links[200];
struct LinksArray {
array_link links[400];
char page_links[64000];
dword buflen;
int count, active;
 
void Hover();
void AddLink();
void AddText();
27,14 → 24,14
int UrlAbsolute();
} PageLinks;
 
void LinksArray::AddLink(dword new_link, int link_x, link_y)
void LinksArray::AddLink(dword lpath, int link_x, link_y)
{
links[count].x = link_x;
links[count].y = link_y;
 
links[count].link = buflen;
strcpy(buflen, new_link);
buflen += strlen(new_link)+1;
strcpy(buflen, lpath);
buflen += strlen(lpath)+1;
count++;
}
 
71,6 → 68,7
void LinksArray::Hover(dword mx, my, link_col_in, link_col_a, bg_col)
{
int i;
signed int WBY = -WB1.list.first*WB1.list.line_h + WB1.list.line_h - WB1.DrawBuf.zoom;
for (i=0; i<count; i++)
{
if (mx>links[i].x) && (my>links[i].y) && (mx<links[i].x+links[i].w) && (my<links[i].y+links[i].h)
77,8 → 75,8
{
if (active==i) return;
CursorPointer.Set();
if (links[active].underline) DrawBar(links[active].x, WB1.list.line_h - WB1.DrawBuf.zoom + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
if (links[i].underline) DrawBar(links[i].x, WB1.list.line_h - WB1.DrawBuf.zoom + links[i].y,links[i].w, WB1.DrawBuf.zoom, bg_col);
if (links[active].underline) DrawBar(links[active].x, WBY + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
if (links[i].underline) DrawBar(links[i].x, WBY + links[i].y,links[i].w, WB1.DrawBuf.zoom, bg_col);
active = i;
status_text.start_x = wv_progress_bar.left + wv_progress_bar.width + 10;
status_text.start_y = Form.cheight - STATUSBAR_H + 3;
93,7 → 91,7
if (active!=-1)
{
CursorPointer.Restore();
if (links[active].underline) DrawBar(links[active].x, WB1.list.line_h - WB1.DrawBuf.zoom + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
if (links[active].underline) DrawBar(links[active].x, WBY + links[active].y,links[active].w, WB1.DrawBuf.zoom, link_col_in);
DrawBar(status_text.start_x, status_text.start_y, status_text.area_size_x, 9, col_bg);
active = -1;
}
163,4 → 161,3
strcpy(orig_URL, #newurl);
}