/programs/cmm/TWB/TWB.c |
---|
13,6 → 13,8 |
button, |
image, |
align; |
dword |
bg_color; |
}; |
struct TWebBrowser { |
47,7 → 49,7 |
dword text_color_index; |
dword link_color_inactive; |
dword link_color_active; |
dword bg_color; |
dword page_bg; |
int draw_y; |
int stolbec; |
93,8 → 95,12 |
stolbec_len = strlen(#line) * zoom; |
line_length = stolbec_len * list.font_w; |
if (style.bg_color!=page_bg) { |
DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h-1, style.bg_color); |
} |
if (style.image) { |
DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h, 0xF9DBCB); |
DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h-1, 0xF9DBCB); |
} |
if (style.button) { |
DrawBuf.DrawBar(start_x, draw_y, line_length, list.item_h - calc(zoom*2), 0xCCCccc); |
130,8 → 136,9 |
style.align = ALIGN_LEFT; |
link_color_inactive = 0x0000FF; |
link_color_active = 0xFF0000; |
bg_color = 0xFFFFFF; |
DrawBuf.Fill(0, bg_color); |
page_bg = 0xFFFFFF; |
style.bg_color = page_bg; |
DrawBuf.Fill(0, page_bg); |
PageLinks.Clear(); |
strcpy(#header, #version); |
draw_y = body_magrin; |
300,8 → 307,8 |
if (isattr("text=")) text_colors[0]=GetColor(#val); |
if (isattr("bgcolor=")) |
{ |
bg_color = GetColor(#val); |
DrawBuf.Fill(0, bg_color); |
style.bg_color = page_bg = GetColor(#val); |
DrawBuf.Fill(0, page_bg); |
} |
} while(GetNextParam()); |
if (opened) && (cur_encoding==CH_NULL) { |
340,6 → 347,7 |
return; |
} |
if (istag("font")) { |
style.bg_color = page_bg; |
if (opened) |
{ |
text_color_index++; |
346,6 → 354,7 |
text_colors[text_color_index] = text_colors[text_color_index-1]; |
do{ |
if (isattr("color=")) text_colors[text_color_index] = GetColor(#val); |
if (isattr("bg=")) style.bg_color = GetColor(#val); |
} while(GetNextParam()); |
} |
else if (text_color_index > 0) text_color_index--; |
426,8 → 435,9 |
if (opened) |
{ |
NewLine(); |
stolbec = style.li_tab * 5 - 2; |
strcpy(#line, "\31 "); |
stolbec-=2; |
//stolbec-=2; |
} |
return; |
} |
/programs/cmm/TWB/img_cache.h |
---|
67,8 → 67,8 |
if (imgh<=0) return; |
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.item_h + WB1.list.item_h, bg_color); |
DrawBar(left1+imgw - 5, top1, WB1.list.w-imgw, imgh, page_bg); |
DrawBar(WB1.list.x, top1+imgh, WB1.list.w, -imgh % WB1.list.item_h + WB1.list.item_h, page_bg); |
if (link) |
{ |
//UnsafeDefineButton(left1 - 5, top1, imgw, imgh-1, PageLinks.count + 400 + BT_HIDE, 0xB5BFC9); |
/programs/cmm/TWB/links.h |
---|
93,7 → 93,7 |
if (links[active].underline) DrawBar(links[active].x, -WB1.list.first + links[active].y |
+ links[active].h, links[active].w, links[active].underline_h, link_color_inactive); |
if (links[i].underline) DrawBar(links[i].x, -WB1.list.first + links[i].y |
+ links[i].h, links[i].w, links[i].underline_h, bg_color); |
+ links[i].h, links[i].w, links[i].underline_h, page_bg); |
active = i; |
DrawStatusBar(links[active].link); |
return true; |
/programs/cmm/browser/WebView.c |
---|
28,14 → 28,15 |
_http http = {0, 0, 0, 0, 0, 0, 0}; |
char homepage[] = FROM "html\\homepage.htm""\0"; |
#ifdef LANG_RUS |
char version[]="¥ªáâ®¢ë© ¡à 㧥à 1.84"; |
char version[]="¥ªáâ®¢ë© ¡à 㧥à 1.85"; |
?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
char loading[] = " £à㧪 áâà ¨æë...<br>"; |
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0"; |
char homepage[] = FROM "html\\homepage_ru.htm""\0"; |
char help[] = FROM "html\\help_ru.htm""\0"; |
char accept_language[]= "Accept-Language: ru\n"; |
char rmb_menu[] = |
"®á¬®âà¥âì ¨á室¨ª |
46,11 → 47,13 |
"®¯¨à®¢ âì áá뫪ã |
ª ç âì ᮤ¥à¦¨¬®¥ áá뫪¨"; |
#else |
char version[]="Text-based Browser 1.84"; |
char version[]="Text-based Browser 1.85"; |
?define IMAGES_CACHE_CLEARED "Images cache cleared" |
?define T_LAST_SLIDE "This slide is the last" |
char loading[] = "Loading...<br>"; |
char page_not_found[] = FROM "html\\page_not_found_en.htm""\0"; |
char homepage[] = FROM "html\\homepage_en.htm""\0"; |
char help[] = FROM "html\\help_en.htm""\0"; |
char accept_language[]= "Accept-Language: en\n"; |
char rmb_menu[] = |
"View source |
64,7 → 67,8 |
#define URL_SERVICE_HISTORY "WebView://history" |
#define URL_SERVICE_HOME "WebView://home" |
#define URL_SERVICE_HOMEPAGE "WebView://home" |
#define URL_SERVICE_HELP "WebView://help" |
#define URL_SERVICE_SOURCE "WebView://source:" |
proc_info Form; |
132,7 → 136,7 |
CreateThread(#Downloader,#downloader_stak+4092); |
ExitProcess(); |
} |
else if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME); |
else if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOMEPAGE); |
WB1.list.SetFont(8, 14, 10011000b); |
WB1.list.no_selection = true; |
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK); |
169,7 → 173,14 |
|| (key_scancode == SCAN_CODE_KEY_N) RunProgram(#program_path, NULL); |
if (key_scancode == SCAN_CODE_KEY_W) ExitProcess(); |
if (key_scancode == SCAN_CODE_KEY_J) ProcessEvent(DOWNLOAD_MANAGER); |
if (key_scancode == SCAN_CODE_KEY_R) ProcessEvent(REFRESH_BUTTON); |
if (key_scancode == SCAN_CODE_ENTER) EventSeachWeb(); |
if (key_scancode == SCAN_CODE_LEFT) ProcessEvent(BACK_BUTTON); |
if (key_scancode == SCAN_CODE_RIGHT) ProcessEvent(FORWARD_BUTTON); |
} |
if (key_scancode == SCAN_CODE_F5) ProcessEvent(REFRESH_BUTTON); |
if (address_box.flags & ed_focus) |
{ |
if (key_scancode == SCAN_CODE_ENTER) { |
185,6 → 196,7 |
#define KEY_SCROLL_N 11 |
if (SCAN_CODE_UP == key_scancode) for (i=0;i<KEY_SCROLL_N;i++) WB1.list.KeyUp(); |
if (SCAN_CODE_DOWN == key_scancode) for (i=0;i<KEY_SCROLL_N;i++) WB1.list.KeyDown(); |
if (key_scancode == SCAN_CODE_F6) {address_box.flags=ed_focus; DrawOmnibox();} |
if (WB1.list.ProcessKey(key_scancode)) WB1.DrawPage(); |
else ProcessEvent(key_scancode); |
} |
224,7 → 236,7 |
GetAbsoluteURL(#http.redirect_url); |
history.back(); |
strcpy(#editURL, #URL); |
DrawEditBoxWebView(); |
DrawOmnibox(); |
OpenPage(); |
//ProcessLink(history.current()); |
} |
280,7 → 292,7 |
OpenPage(); |
else { |
WB1.DrawPage(); |
DrawEditBoxWebView(); |
DrawOmnibox(); |
} |
DrawRectangle(scroll_wv.start_x, scroll_wv.start_y, scroll_wv.size_x, scroll_wv.size_y-1, scroll_wv.bckg_col); |
DrawProgress(); |
388,7 → 400,7 |
bufpointer = free(bufpointer); |
} |
wv_progress_bar.value = 0; |
DrawEditBoxWebView(); |
DrawOmnibox(); |
} |
void SetPageDefaults() |
423,10 → 435,11 |
if (!strncmp(#URL,"WebView:",8)) |
{ |
SetPageDefaults(); |
if (!strcmp(#URL, URL_SERVICE_HOME)) WB1.LoadInternalPage(#homepage, sizeof(homepage)); |
if (!strcmp(#URL, URL_SERVICE_HOMEPAGE)) WB1.LoadInternalPage(#homepage, sizeof(homepage)); |
else if (!strcmp(#URL, URL_SERVICE_HELP)) WB1.LoadInternalPage(#help, sizeof(help)); |
else if (!strcmp(#URL, URL_SERVICE_HISTORY)) ShowHistory(); |
else {bufsize=0; ShowPage();} //page not found |
DrawEditBoxWebView(); |
DrawOmnibox(); |
return; |
} |
if (!strncmp(#URL,"http:",5)) || (!strncmp(#URL,"https://",8)) |
497,7 → 510,7 |
WB1.DrawPage(); |
strcpy(#editURL, #URL); |
strcat(#editURL, #anchor); |
DrawEditBoxWebView(); |
DrawOmnibox(); |
} |
void EventSubmitOmnibox() |
593,7 → 606,7 |
open_in_a_new_window = false; |
} |
void DrawEditBoxWebView() |
void DrawOmnibox() |
{ |
int skin_x_offset; |
DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color); |
609,7 → 622,7 |
void ShowPage() |
{ |
DrawEditBoxWebView(); |
DrawOmnibox(); |
if (!bufsize) |
{ |
if (http.transfer) WB1.LoadInternalPage(#loading, sizeof(loading)); |
655,6 → 668,12 |
} |
} |
void EventSeachWeb() |
{ |
sprintf(#URL, "https://www.google.com/search?q=%s", #editURL); |
ProcessLink(); |
} |
void DrawStatusBar(dword _status_text) |
{ |
status_text.start_x = wv_progress_bar.left + wv_progress_bar.width + 10; |
/programs/cmm/browser/history.h |
---|
1,3 → 1,26 |
#ifdef LANG_RUS |
#define HISTORY_HEADER "<html> |
<head> |
<title>áâ®à¨ï</title> |
</head> |
<body> |
<h1>áâ®à¨ï</h1> |
<br> |
<b>®á¥é¥ë¥ áâà ¨æë</b><br> |
" |
#else |
#define HISTORY_HEADER "<html> |
<head> |
<title>History</title> |
</head> |
<body> |
<h1>History</h1> |
<br> |
<b>Visited pages</b><br> |
" |
#endif |
ShowHistory() |
{ |
int i; |
6,16 → 29,16 |
free(history_pointer); |
history_pointer = malloc(history.items.data_size+256); |
strcat(history_pointer, "<html><head><title>History</title></head><body><h1>History</h1>"); |
strcat(history_pointer, "<br><b>Visited pages</b><br>"); |
strcat(history_pointer, HISTORY_HEADER); |
for (i=0; i<history.items.count; i++) |
{ |
strcat(history_pointer, "<a href='"); |
strcat(history_pointer, "\t<a href='"); |
strcat(history_pointer, history.items.get(i)); |
strcat(history_pointer, "'>"); |
strcat(history_pointer, history.items.get(i)); |
strcat(history_pointer, "</a><br>"); |
} |
/* |
strcat(history_pointer, "<br><b>Cached images</b><br>"); |
for (i=1; i<ImgCache.pics_count; i++) |
{ |
24,13 → 47,13 |
strcat(history_pointer, "'>"); |
strcat(history_pointer, #pics[i].path); |
strcat(history_pointer, "</a><br>"); |
/* |
strcat(history_pointer, "<img src='"); |
strcat(history_pointer, #pics[i].path); |
strcat(history_pointer, "'><br>"); |
strcat(history_pointer, #pics[i].path); |
// strcat(history_pointer, "<img src='"); |
// strcat(history_pointer, #pics[i].path); |
// strcat(history_pointer, "'><br>"); |
// strcat(history_pointer, #pics[i].path); |
} |
*/ |
} |
strcat(history_pointer, "</body></html>"); |
WB1.LoadInternalPage(history_pointer, strlen(history_pointer)); |
} |
/programs/cmm/browser/html/homepage.htm |
---|
File deleted |
\ No newline at end of file |
/programs/cmm/browser/html/help_en.htm |
---|
0,0 → 1,23 |
<html> |
<head> |
<meta charset="uft"> |
<title>WebView Help</title> |
</head> |
<body><pre><h1>WebView Help</h1> |
<b>Shortcut keys</b> |
<font bg="#C7CEE4">[CTRL + N or CTRL + T]</font> New window |
<font bg="#C7CEE4">[CTRL + R or F5]</font> Refresh the current page |
<font bg="#C7CEE4">[CTRL + U]</font> View a web page's source code |
<font bg="#C7CEE4">[CTRL + H]</font> Open browser history |
<font bg="#C7CEE4">[CTRL + J]</font> Display the file downloader |
<font bg="#C7CEE4">[CTRL + W]</font> Exit browser |
<font bg="#C7CEE4">[CTRL + ENTER]</font> Submit a web search |
<font bg="#C7CEE4">[CTRL + LEFT]</font> Back a page. |
<font bg="#C7CEE4">[CTRL + RIGHT]</font> Forward a page. |
<font bg="#C7CEE4">[F6]</font> Moves a text cursor to the omnibox |
</pre> |
</body> |
</html> |
/programs/cmm/browser/html/help_ru.htm |
---|
0,0 → 1,20 |
<html> |
<head> |
<meta charset="cp-866"> |
<title>¯à ¢ª WebView</title> |
</head> |
<body><pre><h1>¯à ¢ª WebView</h1> |
<font bg="#C7CEE4">[CTRL + N ¨«¨ CTRL + T]</font> ®¢®¥ ®ª® |
<font bg="#C7CEE4">[CTRL + R ¨«¨ F5]</font> ¥à¥§ £à㧨âì áâà ¨æã |
<font bg="#C7CEE4">[CTRL + U]</font> ¬®âà¥âì ¨áå®¤ë© ª®¤ áâà ¨æë |
<font bg="#C7CEE4">[CTRL + H]</font> ¬®âà¥âì ¨áâ®à¨î ¯®á¥é¥ëå áâà ¨æ |
<font bg="#C7CEE4">[CTRL + J]</font> âªàëâì § £àã§ç¨ª ä ©«®¢ |
<font bg="#C7CEE4">[CTRL + W]</font> ªàëâì ¡à 㧥à |
<font bg="#C7CEE4">[CTRL + ENTER]</font> ®¨áª ¢ ¨â¥à¥â¥ á ¯®¬®éìî Google |
<font bg="#C7CEE4">[CTRL + ]</font> «®£¨ç® ª®¯ª¥ " § ¤" ¢ ¡à 㧥ॠ|
<font bg="#C7CEE4">[CTRL + ]</font> «®£¨ç® ª®¯ª¥ "¯¥à¥¤" |
<font bg="#C7CEE4">[F6]</font> ¥à¥¬¥é ¥â ⥪áâ®¢ë© ªãàá®à ¢ ®¬¨¡®ªá |
</pre> |
</body> |
</html> |
/programs/cmm/browser/html/homepage_en.htm |
---|
0,0 → 1,17 |
<html> |
<head> |
<meta charset="uft"> |
<title>Homepage</title> |
</head> |
<body><pre>Bookmarks: |
1. <a href="http://kolibrios.org" id="valera">KolibriOS homepage</a> |
2. <a href="http://kolibri-n.org" id="hodor">KolibriN homepage</a> |
3. <a href="http://store.kolibri-n.org">Kolibri Stuff</a> |
<font color="#555555">Hint: to run a web search, type a text in the adress box |
and press Ctrl+Enter. You can also use other <a href="WebView://help"><font color="#555555">Hotkeys</font></a>.</font> |
</pre> |
</body> |
</html> |
/programs/cmm/browser/html/homepage_ru.htm |
---|
0,0 → 1,17 |
<html> |
<head> |
<meta charset="cp-866"> |
<title>®¬ èïï áâà ¨æ </title> |
</head> |
<body><pre> ª« ¤ª¨: |
1. <a href="http://kolibrios.org" id="valera">®¬ èïï áâà ¨æ KolibriOS</a> |
2. <a href="http://kolibri-n.org" id="hodor">KolibriN10</a> |
3. <a href="http://store.kolibri-n.org">Kolibri Store</a> |
<font color="#555555">«ï ¯®¨áª ¢ Google ¡¥à¨â¥ â¥áâ ¢ ¤à¥á®© áâப¥ |
¨ ¦¬¨â¥ Ctrl+Enter. áâì â ª¦¥ ¤à㣨¥ <a href="WebView://help"><font color="#555555">®àï稥 ª« ¢¨è¨</font></a>.</font> |
</pre> |
</body> |
</html> |
/programs/cmm/eolite/include/menu.h |
---|
3,8 → 3,6 |
char *file_captions[] = { |
"âªàëâì", "Enter",100, |
"âªàëâì á ¯®¬®éìî...", "CrlEnt",201, |
"âªàëâì ª ª ⥪áâ", "F3",202, |
"âªàëâì ª ª HEX", "F4",203, |
"®¯¨à®¢ âì", "Crl+C",104, |
"ë१ âì", "Crl+X",105, |
"áâ ¢¨âì", "Crl+V",106, |
17,8 → 15,6 |
char *file_captions[] = { |
"Ava", "Enter",100, |
"Ava ...", "CrlEnt",201, |
"Vaata tekstina", "F3",202, |
"Vaata HEX", "F4",203, |
"Kopeeri", "Crl+C",104, |
"Lõika", "Crl+X",105, |
"Aseta", "Crl+V",106, |
31,8 → 27,6 |
char *file_captions[] = { |
"Open", "Enter",100, |
"Open with...", "CrlEnt",201, |
"View as text", "F3",202, |
"View as HEX", "F4",203, |
"Copy", "Crl+C",104, |
"Cut", "Crl+X",105, |
"Paste", "Crl+V",106, |
/programs/cmm/lib/patterns/http_downloader.h |
---|
176,6 → 176,7 |
if(!strncmp(_in,"mailto:",7)) return true; |
if(!strncmp(_in,"tel:",4)) return true; |
if(!strncmp(_in,"#",1)) return true; |
if(!strncmp(_in,"WebView:",8)) return true; |
if(check_is_the_adress_local(_in)) return true; |
return false; |
} |
/programs/cmm/pixie2/pixieskn.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |