2012-11-26 19:26:15 +04:00
|
|
|
|
//HTML Viewer in C--
|
2018-10-01 19:41:14 +03:00
|
|
|
|
//Copyright 2007-2018 by Veliant & Leency
|
2017-09-17 04:32:09 +03:00
|
|
|
|
//Asper, lev, Lrz, Barsuk, Nable, hidnplayr...
|
2012-11-26 19:26:15 +04:00
|
|
|
|
|
2013-10-25 01:45:17 +04:00
|
|
|
|
#ifndef AUTOBUILD
|
|
|
|
|
#include "lang.h--"
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-12-15 04:16:06 +04:00
|
|
|
|
//libraries
|
2016-11-22 17:04:10 +03:00
|
|
|
|
#define MEMSIZE 4096 * 200
|
2015-03-05 23:55:28 +03:00
|
|
|
|
#include "..\lib\gui.h"
|
2014-01-22 04:08:47 +04:00
|
|
|
|
#include "..\lib\draw_buf.h"
|
|
|
|
|
#include "..\lib\list_box.h"
|
|
|
|
|
#include "..\lib\cursor.h"
|
2015-12-17 01:44:42 +03:00
|
|
|
|
#include "..\lib\collection.h"
|
2016-01-08 05:19:41 +03:00
|
|
|
|
#include "..\lib\menu.h"
|
2016-12-14 01:08:14 +03:00
|
|
|
|
#include "..\lib\random.h"
|
2017-10-01 14:57:00 +03:00
|
|
|
|
#include "..\lib\clipboard.h"
|
2015-12-17 22:15:49 +03:00
|
|
|
|
|
2012-12-15 04:16:06 +04:00
|
|
|
|
//*.obj libraries
|
2015-03-05 23:55:28 +03:00
|
|
|
|
#include "..\lib\obj\box_lib.h"
|
2017-10-05 01:59:57 +03:00
|
|
|
|
#include "..\lib\obj\libio.h"
|
|
|
|
|
#include "..\lib\obj\libimg.h"
|
2015-03-05 23:55:28 +03:00
|
|
|
|
#include "..\lib\obj\http.h"
|
2015-08-07 01:37:34 +03:00
|
|
|
|
#include "..\lib\obj\iconv.h"
|
2015-02-15 13:18:26 +03:00
|
|
|
|
//useful patterns
|
2015-12-17 01:44:42 +03:00
|
|
|
|
#include "..\lib\patterns\history.h"
|
2016-01-15 02:05:51 +03:00
|
|
|
|
#include "..\lib\patterns\http_downloader.h"
|
2015-02-15 13:18:26 +03:00
|
|
|
|
|
2018-05-18 23:18:10 +03:00
|
|
|
|
_http http = {0, 0, 0, 0, 0, 0, 0};
|
|
|
|
|
|
2016-11-10 20:48:36 +03:00
|
|
|
|
char homepage[] = FROM "html\\homepage.htm""\0";
|
2012-11-26 19:26:15 +04:00
|
|
|
|
|
2013-10-15 02:41:27 +04:00
|
|
|
|
#ifdef LANG_RUS
|
2018-10-01 19:41:14 +03:00
|
|
|
|
char version[]="<EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮢<EFBFBD><EFBFBD> <20><><EFBFBD>㧥<EFBFBD> 1.8b";
|
2016-01-08 05:19:41 +03:00
|
|
|
|
?define IMAGES_CACHE_CLEARED "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⨭<EFBFBD><E2A8AD> <20><><EFBFBD>饭"
|
|
|
|
|
?define T_LAST_SLIDE "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <><E1ABA0>"
|
|
|
|
|
char loading[] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>㧪<EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD>...<br>";
|
2016-11-10 20:48:36 +03:00
|
|
|
|
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
2016-01-08 05:19:41 +03:00
|
|
|
|
char accept_language[]= "Accept-Language: ru\n";
|
|
|
|
|
char rmb_menu[] =
|
|
|
|
|
"<EFBFBD><EFBFBD>ᬮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>㧮<EFBFBD>";
|
2017-10-01 14:57:00 +03:00
|
|
|
|
char link_menu[] =
|
2018-03-23 18:04:20 +03:00
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>뫪<EFBFBD>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮤ<EFBFBD>ন<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>뫪<EFBFBD>";
|
2013-10-15 02:41:27 +04:00
|
|
|
|
#else
|
2018-05-20 16:40:58 +03:00
|
|
|
|
char version[]="Text-based Browser 1.8";
|
2016-01-08 05:19:41 +03:00
|
|
|
|
?define IMAGES_CACHE_CLEARED "Images cache cleared"
|
|
|
|
|
?define T_LAST_SLIDE "This slide is the last"
|
|
|
|
|
char loading[] = "Loading...<br>";
|
2016-11-10 20:48:36 +03:00
|
|
|
|
char page_not_found[] = FROM "html\\page_not_found_en.htm""\0";
|
2016-01-08 05:19:41 +03:00
|
|
|
|
char accept_language[]= "Accept-Language: en\n";
|
|
|
|
|
char rmb_menu[] =
|
|
|
|
|
"View source
|
|
|
|
|
Edit source
|
|
|
|
|
History
|
|
|
|
|
Download Manager";
|
2017-10-01 14:57:00 +03:00
|
|
|
|
char link_menu[] =
|
2018-03-23 18:04:20 +03:00
|
|
|
|
"Copy link
|
|
|
|
|
Download link contents";
|
2013-10-15 02:41:27 +04:00
|
|
|
|
#endif
|
|
|
|
|
|
2016-12-14 01:08:14 +03:00
|
|
|
|
|
2015-08-27 02:45:56 +03:00
|
|
|
|
#define URL_SERVICE_HISTORY "WebView://history"
|
|
|
|
|
#define URL_SERVICE_HOME "WebView://home"
|
|
|
|
|
#define URL_SERVICE_SOURCE "WebView://source:"
|
2015-07-30 18:49:09 +03:00
|
|
|
|
|
2012-11-26 19:26:15 +04:00
|
|
|
|
proc_info Form;
|
|
|
|
|
|
2015-08-26 22:22:20 +03:00
|
|
|
|
//char search_path[]="http://nigma.ru/index.php?s=";
|
2014-02-05 03:57:32 +04:00
|
|
|
|
int redirected = 0;
|
2012-11-26 19:26:15 +04:00
|
|
|
|
|
2013-10-23 01:56:28 +04:00
|
|
|
|
char stak[4096];
|
2015-08-02 01:08:58 +03:00
|
|
|
|
|
2013-10-15 02:41:27 +04:00
|
|
|
|
int action_buf;
|
|
|
|
|
|
2016-11-20 22:34:39 +03:00
|
|
|
|
dword TOOLBAR_H = 40;
|
2015-03-16 17:20:32 +03:00
|
|
|
|
dword STATUSBAR_H = 15;
|
2014-03-30 15:57:13 +04:00
|
|
|
|
dword col_bg;
|
|
|
|
|
dword panel_color;
|
|
|
|
|
dword border_color;
|
2014-03-22 14:29:29 +04:00
|
|
|
|
|
2018-05-20 16:40:58 +03:00
|
|
|
|
bool debug_mode = false;
|
|
|
|
|
bool old_tag_parser_mode = false;
|
|
|
|
|
|
2015-08-13 15:23:35 +03:00
|
|
|
|
progress_bar wv_progress_bar;
|
2017-07-05 13:33:54 +03:00
|
|
|
|
bool souce_mode = false;
|
|
|
|
|
bool open_in_a_new_window = false;
|
2014-03-22 14:29:29 +04:00
|
|
|
|
|
2015-08-13 15:23:35 +03:00
|
|
|
|
enum {
|
|
|
|
|
BACK_BUTTON=1000,
|
|
|
|
|
FORWARD_BUTTON,
|
|
|
|
|
REFRESH_BUTTON,
|
|
|
|
|
GOTOURL_BUTTON,
|
2016-12-14 01:08:14 +03:00
|
|
|
|
SANDWICH_BUTTON,
|
2015-08-23 22:59:44 +03:00
|
|
|
|
VIEW_SOURCE=1100,
|
2015-08-13 15:23:35 +03:00
|
|
|
|
EDIT_SOURCE,
|
|
|
|
|
VIEW_HISTORY,
|
2017-10-01 14:57:00 +03:00
|
|
|
|
//FREE_IMG_CACHE,
|
2016-12-14 01:08:14 +03:00
|
|
|
|
DOWNLOAD_MANAGER,
|
2018-05-20 16:40:58 +03:00
|
|
|
|
COPY_LINK_URL=1200,
|
2018-03-23 18:04:20 +03:00
|
|
|
|
DOWNLOAD_LINK_CONTENTS,
|
2015-08-13 15:23:35 +03:00
|
|
|
|
};
|
|
|
|
|
|
2013-12-27 03:36:17 +04:00
|
|
|
|
#include "..\TWB\TWB.c"
|
2014-03-13 02:56:28 +04:00
|
|
|
|
#include "history.h"
|
2014-03-30 15:57:13 +04:00
|
|
|
|
#include "show_src.h"
|
2015-12-22 21:14:35 +03:00
|
|
|
|
#include "download_manager.h"
|
2012-11-26 19:26:15 +04:00
|
|
|
|
|
2014-01-27 06:16:25 +04:00
|
|
|
|
char editURL[sizeof(URL)];
|
|
|
|
|
int mouse_twb;
|
2016-11-20 22:34:39 +03:00
|
|
|
|
edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL),#editURL,#mouse_twb,2,19,19};
|
2014-01-27 06:16:25 +04:00
|
|
|
|
|
2014-03-30 15:57:13 +04:00
|
|
|
|
|
2012-11-26 19:26:15 +04:00
|
|
|
|
void main()
|
|
|
|
|
{
|
2018-10-01 19:41:14 +03:00
|
|
|
|
int i;
|
2015-07-29 23:43:05 +03:00
|
|
|
|
load_dll(boxlib, #box_lib_init,0);
|
|
|
|
|
load_dll(libio, #libio_init,1);
|
|
|
|
|
load_dll(libimg, #libimg_init,1);
|
|
|
|
|
load_dll(libHTTP, #http_lib_init,1);
|
2015-08-07 01:37:34 +03:00
|
|
|
|
load_dll(iconv_lib, #iconv_open,0);
|
2015-02-15 13:18:26 +03:00
|
|
|
|
Libimg_LoadImage(#skin, abspath("wv_skin.png"));
|
|
|
|
|
SetSkinColors();
|
2015-08-26 22:22:20 +03:00
|
|
|
|
CreateDir("/tmp0/1/downloads");
|
|
|
|
|
if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME);
|
2016-01-08 05:19:41 +03:00
|
|
|
|
WB1.list.SetFont(8, 14, 10011000b);
|
2015-08-29 23:14:17 +03:00
|
|
|
|
WB1.list.no_selection = true;
|
2017-09-17 04:32:09 +03:00
|
|
|
|
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK);
|
|
|
|
|
loop() switch(WaitEvent())
|
|
|
|
|
{
|
|
|
|
|
case evMouse:
|
|
|
|
|
edit_box_mouse stdcall (#address_box);
|
|
|
|
|
mouse.get();
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (PageLinks.HoverAndProceed(mouse.x, WB1.list.first + mouse.y))
|
|
|
|
|
&& (bufsize) && (mouse.pkm) && (mouse.up) {
|
|
|
|
|
if (WB1.list.MouseOver(mouse.x, mouse.y)) EventShowPageMenu(mouse.x, mouse.y);
|
|
|
|
|
break;
|
2017-09-17 04:32:09 +03:00
|
|
|
|
}
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (WB1.list.MouseScroll(mouse.vert)) WB1.DrawPage();
|
2017-09-17 04:32:09 +03:00
|
|
|
|
scrollbar_v_mouse (#scroll_wv);
|
|
|
|
|
if (WB1.list.first != scroll_wv.position)
|
|
|
|
|
{
|
|
|
|
|
WB1.list.first = scroll_wv.position;
|
|
|
|
|
WB1.DrawPage();
|
2012-11-26 19:26:15 +04:00
|
|
|
|
break;
|
2017-09-17 04:32:09 +03:00
|
|
|
|
}
|
|
|
|
|
break;
|
2015-08-10 18:08:16 +03:00
|
|
|
|
|
2017-09-17 04:32:09 +03:00
|
|
|
|
case evButton:
|
|
|
|
|
ProcessEvent(GetButtonID());
|
|
|
|
|
break;
|
2015-08-10 18:08:16 +03:00
|
|
|
|
|
2017-09-17 04:32:09 +03:00
|
|
|
|
case evKey:
|
|
|
|
|
GetKeys();
|
|
|
|
|
if (address_box.flags & 0b10)
|
|
|
|
|
{
|
|
|
|
|
if (key_ascii == ASCII_KEY_ENTER) ProcessEvent(key_scancode); else {
|
|
|
|
|
EAX = key_editbox;
|
|
|
|
|
edit_box_key stdcall(#address_box);
|
2015-08-10 18:08:16 +03:00
|
|
|
|
}
|
2017-09-17 04:32:09 +03:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2018-10-01 19:41:14 +03:00
|
|
|
|
#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();
|
2017-09-17 04:32:09 +03:00
|
|
|
|
if (WB1.list.ProcessKey(key_scancode)) WB1.DrawPage();
|
|
|
|
|
else ProcessEvent(key_scancode);
|
|
|
|
|
}
|
|
|
|
|
break;
|
2015-03-18 22:40:42 +03:00
|
|
|
|
|
2017-09-17 04:32:09 +03:00
|
|
|
|
case evReDraw:
|
|
|
|
|
if (menu.list.cur_y) {
|
|
|
|
|
ProcessEvent(menu.list.cur_y);
|
|
|
|
|
menu.list.cur_y = 0;
|
|
|
|
|
}
|
|
|
|
|
DefineAndDrawWindow(GetScreenWidth()-800/2-random(80),GetScreenHeight()-600/2-random(80),800,600,0x73,col_bg,0,0);
|
|
|
|
|
GetProcessInfo(#Form, SelfInfo);
|
|
|
|
|
if (Form.status_window>2) { DrawTitle(#header); break; }
|
|
|
|
|
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
|
|
|
|
|
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
|
|
|
|
|
Draw_Window();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evNetwork:
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.transfer > 0) {
|
|
|
|
|
http.receive();
|
|
|
|
|
EventUpdateProgressBar();
|
|
|
|
|
if (http.receive_result == 0) {
|
2017-09-17 04:32:09 +03:00
|
|
|
|
// Handle redirects
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.status_code >= 300) && (http.status_code < 400)
|
2014-03-23 21:12:21 +04:00
|
|
|
|
{
|
2017-09-17 04:32:09 +03:00
|
|
|
|
redirected++;
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (redirected>5)
|
2014-02-09 19:19:23 +04:00
|
|
|
|
{
|
2018-05-20 16:40:58 +03:00
|
|
|
|
notify("'Too many redirects.' -E");
|
|
|
|
|
StopLoading();
|
2014-02-09 19:19:23 +04:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2018-05-20 16:40:58 +03:00
|
|
|
|
http.handle_redirect();
|
|
|
|
|
http.free();
|
|
|
|
|
GetAbsoluteURL(#http.redirect_url);
|
|
|
|
|
history.back();
|
|
|
|
|
strcpy(#editURL, #URL);
|
|
|
|
|
DrawEditBoxWebView();
|
|
|
|
|
OpenPage();
|
2014-02-05 03:57:32 +04:00
|
|
|
|
}
|
2018-05-20 16:40:58 +03:00
|
|
|
|
break;
|
2017-09-17 04:32:09 +03:00
|
|
|
|
}
|
2018-05-20 16:40:58 +03:00
|
|
|
|
redirected = 0;
|
2017-09-17 04:32:09 +03:00
|
|
|
|
// Loading the page is complete, free resources
|
2018-05-20 16:40:58 +03:00
|
|
|
|
history.add(#URL);
|
|
|
|
|
bufpointer = http.content_pointer;
|
|
|
|
|
bufsize = http.content_received;
|
|
|
|
|
http.free();
|
|
|
|
|
SetPageDefaults();
|
|
|
|
|
ShowPage();
|
2014-01-27 23:34:00 +04:00
|
|
|
|
}
|
2017-09-17 04:32:09 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
2012-11-26 19:26:15 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetElementSizes()
|
|
|
|
|
{
|
2016-11-20 22:34:39 +03:00
|
|
|
|
address_box.top = TOOLBAR_H/2-10;
|
2016-12-12 01:58:11 +03:00
|
|
|
|
basic_line_h = calc(WB1.list.font_h * 130) / 100;
|
2016-11-20 22:34:39 +03:00
|
|
|
|
address_box.width = Form.cwidth - address_box.left - 50;
|
2016-12-21 13:56:06 +03:00
|
|
|
|
WB1.list.SetSizes(0, TOOLBAR_H, Form.width - 10 - scroll_wv.size_x,
|
2016-12-12 01:58:11 +03:00
|
|
|
|
Form.cheight - TOOLBAR_H - STATUSBAR_H, basic_line_h);
|
|
|
|
|
WB1.list.wheel_size = 7 * basic_line_h;
|
2015-08-10 15:45:00 +03:00
|
|
|
|
WB1.list.column_max = WB1.list.w - scroll_wv.size_x / WB1.list.font_w;
|
2016-12-12 01:58:11 +03:00
|
|
|
|
WB1.list.visible = WB1.list.h;
|
2016-01-08 05:19:41 +03:00
|
|
|
|
if (WB1.list.w!=WB1.DrawBuf.bufw) {
|
2016-12-21 13:56:06 +03:00
|
|
|
|
WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, 32700);
|
2016-11-10 20:48:36 +03:00
|
|
|
|
ProcessEvent(REFRESH_BUTTON);
|
2016-01-08 05:19:41 +03:00
|
|
|
|
}
|
2012-11-26 19:26:15 +04:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-17 22:19:36 +03:00
|
|
|
|
|
2015-12-17 22:15:49 +03:00
|
|
|
|
|
2012-11-26 19:26:15 +04:00
|
|
|
|
void Draw_Window()
|
|
|
|
|
{
|
2015-08-26 22:22:20 +03:00
|
|
|
|
DrawBar(0,0, Form.cwidth,TOOLBAR_H-2, panel_color);
|
2015-08-13 15:23:35 +03:00
|
|
|
|
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, 0xD7D0D3);
|
2014-03-22 14:29:29 +04:00
|
|
|
|
DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, border_color);
|
2012-11-26 19:26:15 +04:00
|
|
|
|
SetElementSizes();
|
2016-11-20 22:34:39 +03:00
|
|
|
|
DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+5, 25,border_color);
|
|
|
|
|
DefineButton(address_box.left-52, address_box.top-2, 24, skin.h-2, BACK_BUTTON+BT_HIDE, 0);
|
|
|
|
|
DefineButton(address_box.left-27, address_box.top-2, 24, skin.h-2, FORWARD_BUTTON+BT_HIDE, 0);
|
|
|
|
|
img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 3, 0);
|
2015-08-13 15:23:35 +03:00
|
|
|
|
DefineButton(address_box.left+address_box.width+1, address_box.top-3, 16, skin.h-1, REFRESH_BUTTON+BT_HIDE+BT_NOFRAME, 0);
|
2016-11-20 22:34:39 +03:00
|
|
|
|
DefineButton(Form.cwidth-27, address_box.top-3, 23, skin.h-1, SANDWICH_BUTTON+BT_HIDE, 0);
|
|
|
|
|
img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 87, 0);
|
2014-03-22 14:29:29 +04:00
|
|
|
|
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg);
|
|
|
|
|
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color);
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (!header)
|
|
|
|
|
OpenPage();
|
|
|
|
|
else {
|
|
|
|
|
WB1.DrawPage();
|
|
|
|
|
DrawEditBoxWebView();
|
|
|
|
|
}
|
2014-03-24 02:49:49 +04:00
|
|
|
|
DrawRectangle(scroll_wv.start_x, scroll_wv.start_y, scroll_wv.size_x, scroll_wv.size_y-1, scroll_wv.bckg_col);
|
2014-03-24 03:18:01 +04:00
|
|
|
|
DrawProgress();
|
2012-11-26 19:26:15 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-11-10 20:48:36 +03:00
|
|
|
|
void ProcessEvent(dword id__)
|
2013-12-27 04:33:12 +04:00
|
|
|
|
{
|
2016-11-10 20:48:36 +03:00
|
|
|
|
switch (id__)
|
2013-12-27 04:33:12 +04:00
|
|
|
|
{
|
2016-11-10 20:48:36 +03:00
|
|
|
|
case 1:
|
|
|
|
|
ExitProcess();
|
|
|
|
|
return;
|
2015-08-10 18:08:16 +03:00
|
|
|
|
case SCAN_CODE_BS:
|
2015-08-13 15:23:35 +03:00
|
|
|
|
case BACK_BUTTON:
|
2016-01-01 19:51:53 +03:00
|
|
|
|
if (history.back()) {
|
|
|
|
|
strcpy(#URL, history.current());
|
2015-12-17 01:44:42 +03:00
|
|
|
|
OpenPage();
|
|
|
|
|
}
|
2015-08-10 18:08:16 +03:00
|
|
|
|
return;
|
2015-08-13 15:23:35 +03:00
|
|
|
|
case FORWARD_BUTTON:
|
2016-01-01 19:51:53 +03:00
|
|
|
|
if (history.forward()) {
|
|
|
|
|
strcpy(#URL, history.current());
|
2015-12-17 01:44:42 +03:00
|
|
|
|
OpenPage();
|
|
|
|
|
}
|
2015-08-10 18:08:16 +03:00
|
|
|
|
return;
|
2015-08-13 15:23:35 +03:00
|
|
|
|
case GOTOURL_BUTTON:
|
2015-08-26 22:22:20 +03:00
|
|
|
|
case SCAN_CODE_ENTER:
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (!editURL[0]) {
|
|
|
|
|
strcpy(#URL, URL_SERVICE_HOME);
|
|
|
|
|
}
|
|
|
|
|
else if (!strncmp(#editURL,"http:",5)) || (editURL[0]=='/')
|
2016-11-20 14:10:10 +03:00
|
|
|
|
|| (!strncmp(#editURL,"https:",6)) || (!strncmp(#editURL,"WebView:",8))
|
2015-08-26 22:22:20 +03:00
|
|
|
|
{
|
|
|
|
|
strcpy(#URL, #editURL);
|
|
|
|
|
}
|
2015-08-10 18:08:16 +03:00
|
|
|
|
else
|
2015-08-26 22:22:20 +03:00
|
|
|
|
{
|
2015-09-05 17:04:04 +03:00
|
|
|
|
strlcpy(#URL,"http://",7);
|
2015-08-26 22:22:20 +03:00
|
|
|
|
strcat(#URL, #editURL);
|
|
|
|
|
}
|
2015-08-10 18:08:16 +03:00
|
|
|
|
OpenPage();
|
|
|
|
|
return;
|
2018-05-24 21:47:42 +03:00
|
|
|
|
case SCAN_CODE_F5:
|
2015-08-13 15:23:35 +03:00
|
|
|
|
IF(address_box.flags & 0b10) return;
|
|
|
|
|
case REFRESH_BUTTON:
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.transfer > 0)
|
2015-08-10 18:59:20 +03:00
|
|
|
|
{
|
|
|
|
|
StopLoading();
|
|
|
|
|
Draw_Window();
|
|
|
|
|
}
|
|
|
|
|
else OpenPage();
|
|
|
|
|
return;
|
2015-08-13 15:23:35 +03:00
|
|
|
|
case SANDWICH_BUTTON:
|
2016-12-14 01:08:14 +03:00
|
|
|
|
EventShowPageMenu(Form.cwidth - 215, TOOLBAR_H-6);
|
2014-01-29 04:14:09 +04:00
|
|
|
|
return;
|
2015-08-13 15:23:35 +03:00
|
|
|
|
case VIEW_SOURCE:
|
2014-03-31 21:14:16 +04:00
|
|
|
|
WB1.list.first = 0;
|
2014-03-30 15:57:13 +04:00
|
|
|
|
ShowSource();
|
2015-08-27 02:45:56 +03:00
|
|
|
|
WB1.LoadInternalPage(bufpointer, bufsize);
|
2014-03-30 15:57:13 +04:00
|
|
|
|
break;
|
2015-08-13 15:23:35 +03:00
|
|
|
|
case EDIT_SOURCE:
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (!strncmp(#URL,"http",4))
|
2014-03-13 02:56:28 +04:00
|
|
|
|
{
|
2018-04-16 01:44:36 +03:00
|
|
|
|
CreateFile(bufsize, bufpointer, "/tmp0/1/WebView_tmp.htm");
|
2015-07-30 18:49:09 +03:00
|
|
|
|
if (!EAX) RunProgram("/rd/1/tinypad", "/tmp0/1/WebView_tmp.htm");
|
2014-03-13 02:56:28 +04:00
|
|
|
|
}
|
2015-07-30 18:49:09 +03:00
|
|
|
|
else RunProgram("/rd/1/tinypad", #URL);
|
2013-12-27 04:33:12 +04:00
|
|
|
|
return;
|
2017-10-01 14:57:00 +03:00
|
|
|
|
// case FREE_IMG_CACHE:
|
|
|
|
|
// ImgCache.Free();
|
|
|
|
|
// notify(IMAGES_CACHE_CLEARED);
|
|
|
|
|
// WB1.DrawPage();
|
|
|
|
|
// return;
|
2015-08-13 15:23:35 +03:00
|
|
|
|
case VIEW_HISTORY:
|
|
|
|
|
strcpy(#URL, URL_SERVICE_HISTORY);
|
|
|
|
|
OpenPage();
|
|
|
|
|
return;
|
|
|
|
|
case DOWNLOAD_MANAGER:
|
|
|
|
|
if (!downloader_opened) {
|
2015-12-22 21:14:35 +03:00
|
|
|
|
downloader_edit = NULL;
|
2015-08-13 15:23:35 +03:00
|
|
|
|
CreateThread(#Downloader,#downloader_stak+4092);
|
|
|
|
|
}
|
2013-12-27 04:33:12 +04:00
|
|
|
|
return;
|
2018-05-20 16:40:58 +03:00
|
|
|
|
case COPY_LINK_URL:
|
2017-10-01 14:57:00 +03:00
|
|
|
|
Clipboard__CopyText(PageLinks.GetURL(PageLinks.active));
|
|
|
|
|
notify("'URL copied to clipboard'O");
|
|
|
|
|
return;
|
2018-03-23 18:04:20 +03:00
|
|
|
|
case DOWNLOAD_LINK_CONTENTS:
|
|
|
|
|
if (!downloader_opened) {
|
|
|
|
|
strcpy(#downloader_edit, PageLinks.GetURL(PageLinks.active));
|
|
|
|
|
CreateThread(#Downloader,#downloader_stak+4092);
|
|
|
|
|
}
|
|
|
|
|
return;
|
2018-05-20 16:40:58 +03:00
|
|
|
|
case SCAN_CODE_F12:
|
|
|
|
|
debug_mode ^= 1;
|
|
|
|
|
if (debug_mode) notify("'Debug mode ON'-I");
|
|
|
|
|
else notify("'Debug mode OFF'-I");
|
|
|
|
|
return;
|
|
|
|
|
case SCAN_CODE_F11:
|
|
|
|
|
old_tag_parser_mode ^= 1;
|
|
|
|
|
if (old_tag_parser_mode) notify("'Old tag parser ON'-I");
|
|
|
|
|
else notify("'Old tag parser OFF'-I");
|
|
|
|
|
return;
|
2013-12-27 04:33:12 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-13 02:56:28 +04:00
|
|
|
|
void StopLoading()
|
|
|
|
|
{
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.transfer)
|
2014-03-15 14:34:28 +04:00
|
|
|
|
{
|
2018-05-18 23:18:10 +03:00
|
|
|
|
EAX = http.transfer;
|
2014-03-15 14:34:28 +04:00
|
|
|
|
EAX = EAX.http_msg.content_ptr; // get pointer to data
|
|
|
|
|
$push EAX // save it on the stack
|
2018-05-18 23:18:10 +03:00
|
|
|
|
http_free stdcall (http.transfer); // abort connection
|
2014-03-15 14:34:28 +04:00
|
|
|
|
$pop EAX
|
2015-07-30 18:49:09 +03:00
|
|
|
|
free(EAX); // free data
|
2018-05-18 23:18:10 +03:00
|
|
|
|
http.transfer=0;
|
2014-03-15 14:34:28 +04:00
|
|
|
|
bufsize = 0;
|
2015-07-30 18:49:09 +03:00
|
|
|
|
bufpointer = free(bufpointer);
|
2014-03-15 14:34:28 +04:00
|
|
|
|
}
|
2015-03-16 17:20:32 +03:00
|
|
|
|
wv_progress_bar.value = 0;
|
2016-11-20 22:34:39 +03:00
|
|
|
|
DrawEditBoxWebView();
|
2014-03-14 23:06:48 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetPageDefaults()
|
|
|
|
|
{
|
|
|
|
|
strcpy(#header, #version);
|
|
|
|
|
WB1.list.count = WB1.list.first = 0;
|
2015-08-10 10:09:10 +03:00
|
|
|
|
cur_encoding = CH_NULL;
|
2014-03-14 23:06:48 +04:00
|
|
|
|
if (o_bufpointer) o_bufpointer = free(o_bufpointer);
|
2014-03-13 02:56:28 +04:00
|
|
|
|
}
|
|
|
|
|
|
2013-12-27 16:30:42 +04:00
|
|
|
|
void OpenPage()
|
|
|
|
|
{
|
2018-05-20 16:40:58 +03:00
|
|
|
|
char getUrl[sizeof(URL)];
|
2014-03-13 02:56:28 +04:00
|
|
|
|
StopLoading();
|
2014-03-30 15:57:13 +04:00
|
|
|
|
souce_mode = false;
|
2013-12-27 16:30:42 +04:00
|
|
|
|
strcpy(#editURL, #URL);
|
2016-01-01 19:51:53 +03:00
|
|
|
|
history.add(#URL);
|
2015-07-30 18:49:09 +03:00
|
|
|
|
if (!strncmp(#URL,"WebView:",8))
|
2014-03-24 02:49:49 +04:00
|
|
|
|
{
|
|
|
|
|
SetPageDefaults();
|
2015-08-19 15:54:01 +03:00
|
|
|
|
if (!strcmp(#URL, URL_SERVICE_HOME)) WB1.LoadInternalPage(#homepage, sizeof(homepage));
|
2015-07-30 18:49:09 +03:00
|
|
|
|
else if (!strcmp(#URL, URL_SERVICE_HISTORY)) ShowHistory();
|
2016-02-22 00:57:22 +03:00
|
|
|
|
DrawEditBoxWebView();
|
2014-03-24 02:49:49 +04:00
|
|
|
|
return;
|
|
|
|
|
}
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (!strncmp(#URL,"http:",5)) || (!strncmp(#URL,"https://",8))
|
2013-12-27 16:30:42 +04:00
|
|
|
|
{
|
2015-08-13 15:23:35 +03:00
|
|
|
|
img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, 131, 0);
|
2018-05-20 16:40:58 +03:00
|
|
|
|
|
|
|
|
|
if (!strncmp(#URL,"http:",5)) {
|
|
|
|
|
http.get(#URL);
|
|
|
|
|
}
|
|
|
|
|
if (!strncmp(#URL,"https://",8)) {
|
|
|
|
|
sprintf(#getUrl, "http://gate.aspero.pro/?site=%s", #URL);
|
|
|
|
|
http.get(#getUrl);
|
|
|
|
|
}
|
|
|
|
|
//http.get(#URL);
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (!http.transfer)
|
2014-03-15 14:23:06 +04:00
|
|
|
|
{
|
|
|
|
|
StopLoading();
|
|
|
|
|
bufsize = 0;
|
2015-07-30 18:49:09 +03:00
|
|
|
|
bufpointer = free(bufpointer);
|
2014-03-15 14:23:06 +04:00
|
|
|
|
ShowPage();
|
|
|
|
|
return;
|
|
|
|
|
}
|
2013-12-27 16:30:42 +04:00
|
|
|
|
}
|
2014-03-13 02:56:28 +04:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
file_size stdcall (#URL);
|
|
|
|
|
bufsize = EBX;
|
2014-03-15 19:16:08 +04:00
|
|
|
|
if (bufsize)
|
|
|
|
|
{
|
2015-07-30 18:49:09 +03:00
|
|
|
|
free(bufpointer);
|
|
|
|
|
bufpointer = malloc(bufsize);
|
2014-03-15 19:16:08 +04:00
|
|
|
|
SetPageDefaults();
|
2014-03-30 15:57:13 +04:00
|
|
|
|
ReadFile(0, bufsize, bufpointer, #URL);
|
2014-03-15 19:16:08 +04:00
|
|
|
|
}
|
2014-03-14 23:06:48 +04:00
|
|
|
|
ShowPage();
|
2014-03-13 02:56:28 +04:00
|
|
|
|
}
|
2013-12-27 16:30:42 +04:00
|
|
|
|
}
|
2013-12-27 15:15:17 +04:00
|
|
|
|
|
2016-02-22 00:57:22 +03:00
|
|
|
|
DrawEditBoxWebView()
|
2014-01-22 04:08:47 +04:00
|
|
|
|
{
|
2016-11-20 22:34:39 +03:00
|
|
|
|
DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color);
|
|
|
|
|
DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color);
|
2014-03-30 15:57:13 +04:00
|
|
|
|
address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL);
|
|
|
|
|
address_box.offset = 0;
|
2014-01-22 04:08:47 +04:00
|
|
|
|
edit_box_draw stdcall(#address_box);
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.transfer > 0) EAX = 131; else EAX = 54;
|
2015-08-26 22:22:20 +03:00
|
|
|
|
img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, EAX, 0);
|
2014-03-30 15:57:13 +04:00
|
|
|
|
}
|
2014-01-22 04:08:47 +04:00
|
|
|
|
|
2014-03-30 15:57:13 +04:00
|
|
|
|
|
|
|
|
|
void ShowPage()
|
|
|
|
|
{
|
2016-02-22 00:57:22 +03:00
|
|
|
|
DrawEditBoxWebView();
|
2014-01-28 00:16:33 +04:00
|
|
|
|
if (!bufsize)
|
2014-01-22 04:08:47 +04:00
|
|
|
|
{
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.transfer) WB1.LoadInternalPage(#loading, sizeof(loading));
|
2015-08-27 02:45:56 +03:00
|
|
|
|
else WB1.LoadInternalPage(#page_not_found, sizeof(page_not_found));
|
2014-01-22 04:08:47 +04:00
|
|
|
|
}
|
|
|
|
|
else
|
2015-08-23 22:59:44 +03:00
|
|
|
|
{
|
2015-08-23 13:12:13 +03:00
|
|
|
|
WB1.Prepare();
|
2015-08-23 22:59:44 +03:00
|
|
|
|
}
|
2014-01-22 04:08:47 +04:00
|
|
|
|
}
|
2013-12-27 15:15:17 +04:00
|
|
|
|
|
2015-03-02 00:36:17 +03:00
|
|
|
|
byte UrlExtIs(dword ext)
|
|
|
|
|
{
|
2015-07-30 18:49:09 +03:00
|
|
|
|
if (!strcmpi(#URL + strlen(#URL) - strlen(ext), ext)) return true;
|
|
|
|
|
return false;
|
2015-03-02 00:36:17 +03:00
|
|
|
|
}
|
|
|
|
|
|
2015-08-26 22:22:20 +03:00
|
|
|
|
int SetSkinColors()
|
|
|
|
|
{
|
|
|
|
|
dword image_data;
|
|
|
|
|
image_data = DSDWORD[skin.image+24];
|
|
|
|
|
col_bg = DSDWORD[image_data];
|
|
|
|
|
panel_color = DSDWORD[skin.w*4*4 + image_data];
|
|
|
|
|
border_color = DSDWORD[skin.w*4*7 + image_data];
|
|
|
|
|
wv_progress_bar.progress_color = DSDWORD[skin.w*4*10 + image_data];
|
|
|
|
|
$and col_bg, 0x00ffffff
|
|
|
|
|
$and panel_color, 0x00ffffff
|
|
|
|
|
$and border_color, 0x00ffffff
|
|
|
|
|
$and wv_progress_bar.progress_color, 0x00ffffff
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawProgress()
|
|
|
|
|
{
|
2018-05-20 16:40:58 +03:00
|
|
|
|
dword persent;
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.transfer == 0) return;
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (wv_progress_bar.max) persent = wv_progress_bar.value*100/wv_progress_bar.max; else persent = 10;
|
|
|
|
|
DrawBar(address_box.left-2, address_box.top+20, persent*address_box.width/100, 2, wv_progress_bar.progress_color);
|
2015-08-26 22:22:20 +03:00
|
|
|
|
}
|
2015-08-19 15:48:31 +03:00
|
|
|
|
|
2017-07-05 13:33:54 +03:00
|
|
|
|
|
2016-12-21 13:56:06 +03:00
|
|
|
|
char anchor[256];
|
2015-08-27 02:55:33 +03:00
|
|
|
|
void ClickLink()
|
|
|
|
|
{
|
2018-05-18 23:18:10 +03:00
|
|
|
|
if (http.transfer > 0)
|
2015-08-27 02:55:33 +03:00
|
|
|
|
{
|
|
|
|
|
StopLoading();
|
2016-01-01 19:51:53 +03:00
|
|
|
|
history.back();
|
2015-08-27 02:55:33 +03:00
|
|
|
|
}
|
2018-05-20 16:40:58 +03:00
|
|
|
|
strcpy(#URL, PageLinks.GetURL(PageLinks.active));
|
2015-08-27 02:55:33 +03:00
|
|
|
|
//#1
|
|
|
|
|
if (URL[0] == '#')
|
|
|
|
|
{
|
2016-11-20 14:10:10 +03:00
|
|
|
|
if (URL[1] == NULL) {
|
|
|
|
|
WB1.list.first = 0;
|
|
|
|
|
strcpy(#URL, history.current());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
strlcpy(#anchor, #URL+strrchr(#URL, '#'), sizeof(anchor));
|
|
|
|
|
strcpy(#URL, history.current());
|
|
|
|
|
}
|
|
|
|
|
ShowPage();
|
2015-08-27 02:55:33 +03:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//liner.ru#1
|
2016-11-20 14:10:10 +03:00
|
|
|
|
if (strrchr(#URL, '#')!=0)
|
2015-08-27 02:55:33 +03:00
|
|
|
|
{
|
2016-12-21 13:56:06 +03:00
|
|
|
|
strlcpy(#anchor, #URL+strrchr(#URL, '#'), sizeof(anchor));
|
2015-08-27 02:55:33 +03:00
|
|
|
|
URL[strrchr(#URL, '#')-1] = 0x00;
|
|
|
|
|
}
|
2016-11-20 14:10:10 +03:00
|
|
|
|
|
2015-08-27 02:55:33 +03:00
|
|
|
|
if (!strncmp(#URL,"mailto:", 7))
|
|
|
|
|
{
|
|
|
|
|
notify(#URL);
|
2016-01-01 19:51:53 +03:00
|
|
|
|
strcpy(#editURL, history.current());
|
|
|
|
|
strcpy(#URL, history.current());
|
2015-08-27 02:55:33 +03:00
|
|
|
|
return;
|
|
|
|
|
}
|
2016-11-20 14:10:10 +03:00
|
|
|
|
|
|
|
|
|
GetAbsoluteURL(#URL);
|
|
|
|
|
|
2018-05-20 16:40:58 +03:00
|
|
|
|
if (strncmp(#URL,"http://",7)!=0) && (strncmp(#URL,"https://",8)!=0)
|
2016-11-20 14:10:10 +03:00
|
|
|
|
{
|
|
|
|
|
if (UrlExtIs(".htm")!=true) && (UrlExtIs(".html")!=true)
|
|
|
|
|
{
|
2018-10-01 19:41:14 +03:00
|
|
|
|
if (strchr(#URL, '|')) {
|
|
|
|
|
ESBYTE[strchr(#URL, '|')] = NULL;
|
|
|
|
|
RunProgram(#URL, strlen(#URL)+1+#URL);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
RunProgram("/sys/@open", #URL);
|
|
|
|
|
}
|
2016-11-20 14:10:10 +03:00
|
|
|
|
strcpy(#editURL, history.current());
|
|
|
|
|
strcpy(#URL, history.current());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (UrlExtIs(".png")==true) || (UrlExtIs(".gif")==true) || (UrlExtIs(".jpg")==true)
|
2016-12-12 01:58:11 +03:00
|
|
|
|
|| (UrlExtIs(".zip")==true) || (UrlExtIs(".kex")==true) || (UrlExtIs(".pdf")==true)
|
|
|
|
|
|| (UrlExtIs(".7z")==true) {
|
2017-09-17 15:35:45 +03:00
|
|
|
|
if (!downloader_opened) {
|
|
|
|
|
strcpy(#downloader_edit, #URL);
|
|
|
|
|
CreateThread(#Downloader,#downloader_stak+4092);
|
|
|
|
|
strcpy(#editURL, history.current());
|
|
|
|
|
strcpy(#URL, history.current());
|
|
|
|
|
}
|
|
|
|
|
else notify("'WebView\nPlease, start a new download only when previous ended.'Et");
|
2016-11-20 14:10:10 +03:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-07-05 13:33:54 +03:00
|
|
|
|
if (open_in_a_new_window)
|
|
|
|
|
{
|
|
|
|
|
RunProgram(#program_path, #URL);
|
|
|
|
|
strcpy(#editURL, history.current());
|
|
|
|
|
strcpy(#URL, history.current());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
OpenPage();
|
|
|
|
|
}
|
|
|
|
|
open_in_a_new_window = false;
|
2015-08-27 02:55:33 +03:00
|
|
|
|
}
|
|
|
|
|
|
2016-12-14 01:08:14 +03:00
|
|
|
|
void EventShowPageMenu(dword _left, _top)
|
2016-12-04 19:50:34 +03:00
|
|
|
|
{
|
|
|
|
|
menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 220, #rmb_menu, VIEW_SOURCE);
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-14 01:08:14 +03:00
|
|
|
|
void EventShowLinkMenu(dword _left, _top)
|
|
|
|
|
{
|
2018-05-20 16:40:58 +03:00
|
|
|
|
menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 220, #link_menu, COPY_LINK_URL);
|
2016-12-14 01:08:14 +03:00
|
|
|
|
}
|
|
|
|
|
|
2018-05-18 23:18:10 +03:00
|
|
|
|
void EventUpdateProgressBar()
|
|
|
|
|
{
|
|
|
|
|
wv_progress_bar.max = http.content_length;
|
|
|
|
|
if (wv_progress_bar.value != http.content_received)
|
|
|
|
|
{
|
|
|
|
|
wv_progress_bar.value = http.content_received;
|
|
|
|
|
DrawProgress();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-14 01:08:14 +03:00
|
|
|
|
DrawStatusBar(dword _status_text)
|
|
|
|
|
{
|
|
|
|
|
status_text.start_x = wv_progress_bar.left + wv_progress_bar.width + 10;
|
|
|
|
|
status_text.start_y = Form.cheight - STATUSBAR_H + 3;
|
|
|
|
|
status_text.area_size_x = Form.cwidth - status_text.start_x -3;
|
|
|
|
|
DrawBar(status_text.start_x, status_text.start_y, status_text.area_size_x, 9, col_bg);
|
|
|
|
|
status_text.text_pointer = _status_text;
|
|
|
|
|
PathShow_prepare stdcall(#status_text);
|
|
|
|
|
PathShow_draw stdcall(#status_text);
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-30 18:49:09 +03:00
|
|
|
|
stop:
|