/programs/cmm/TWB/TWB.c |
---|
260,7 → 260,8 |
DrawStyle(); |
NewLine(); |
list.count = draw_y; |
DrawPage(); |
list.CheckDoesValuesOkey(); |
anchors.current = NULL; |
} |
//============================================================================================ |
bool TWebBrowser::CheckForLineBreak() |
292,6 → 293,14 |
dword value; |
if (value = tag.get_value_of("name=")) || (value = tag.get_value_of("id=")) { |
anchors.add(value, draw_y); |
if (anchors.current) && (streq(value, #anchors.current+1)) { |
list.first = draw_y; |
anchors.current = NULL; |
} |
} |
if (tag.is("html")) { |
t_html = tag.opened; |
return; |
311,9 → 320,6 |
if (!tag.opened) strcat(#line, "\" "); |
return; |
} |
if (value = tag.get_value_of("name=")) || (value = tag.get_value_of("id=")) { |
anchors.add(value, draw_y); |
} |
if (tag.is("body")) { |
t_body = tag.opened; |
if (value = tag.get_value_of("link=")) link_color_inactive = GetColor(value); |
/programs/cmm/TWB/absolute_url.h |
---|
1,9 → 1,9 |
void GetAbsoluteURL(dword in_URL) |
dword GetAbsoluteURL(dword in_URL) |
{ |
int i; |
dword orig_URL = in_URL; |
char newurl[URL_SIZE]; |
char newurl[URL_SIZE+1]; |
while (i=strstr(in_URL, "&")) |
{ |
10,7 → 10,7 |
strcpy(i+1, i+5); |
} |
if (check_is_the_url_absolute(in_URL)) return; |
if (check_is_the_url_absolute(in_URL)) return orig_URL; |
IF (!strncmp(in_URL,"//", 2)) |
{ |
17,7 → 17,7 |
strcpy(#newurl, "http:"); |
strcat(#newurl, in_URL); |
strcpy(orig_URL, #newurl); |
return; |
return orig_URL; |
} |
IF (!strncmp(in_URL,"./", 2)) in_URL+=2; |
55,5 → 55,6 |
strcat(#newurl, in_URL); |
strcpy(orig_URL, #newurl); |
return orig_URL; |
} |
/programs/cmm/TWB/anchors.h |
---|
1,10 → 1,12 |
struct _anchors { |
char current[256]; |
collection anchor_name; |
collection anchor_position; |
void add(); |
int get_pos_by_name(); |
void clear(); |
void take_anchor_from(); |
} anchors; |
void _anchors::add(dword _name, _pos) |
30,3 → 32,12 |
anchor_position.drop(); |
} |
void _anchors::take_anchor_from(dword _URL) |
{ |
int anchor_pos; |
if (!current) && (_URL) && (anchor_pos = strrchr(_URL, '#')) { |
strncpy(#current, _URL+anchor_pos-1, sizeof(_anchors.current)-1); |
ESBYTE[_URL+anchor_pos-1] = EOS; |
} |
} |
/programs/cmm/TWB/links.h |
---|
58,8 → 58,7 |
CursorPointer.Restore(); |
} |
char temp[URL_SIZE]; |
PathShow_data status_text = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, 0, #temp, 0}; |
PathShow_data status_text = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, 0, NULL, 0}; |
bool LinksArray::HoverAndProceed(dword mx, my) |
{ |
77,13 → 76,12 |
return false; |
} |
if (mouse.mkm) && (mouse.up) { |
open_in_a_new_window = true; |
EventClickLink(); |
RunProgram(#program_path, PageLinks.GetURL(PageLinks.active)); |
return false; |
} |
if (mouse.lkm) && (mouse.up) { |
CursorPointer.Restore(); |
EventClickLink(); |
EventClickLink(PageLinks.GetURL(PageLinks.active)); |
return false; |
} |
if (mouse.pkm) && (mouse.up) { |