Subversion Repositories Kolibri OS

Rev

Rev 7767 | Rev 7771 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7767 Rev 7770
Line 70... Line 70...
70
	EDIT_SOURCE,
70
	EDIT_SOURCE,
71
	OPEN_FILE,
71
	OPEN_FILE,
72
	NEW_WINDOW,
72
	NEW_WINDOW,
73
	VIEW_HISTORY,
73
	VIEW_HISTORY,
74
	DOWNLOAD_MANAGER,
74
	DOWNLOAD_MANAGER,
-
 
75
	CLEAR_CACHE,
75
	UPDATE_BROWSER,
76
	UPDATE_BROWSER,
76
	COPY_LINK_URL,
77
	COPY_LINK_URL,
77
	DOWNLOAD_LINK_CONTENTS,
78
	DOWNLOAD_LINK_CONTENTS,
78
};
79
};
Line 138... Line 139...
138
		case evMouse:
139
		case evMouse:
139
			edit_box_mouse stdcall (#address_box);
140
			edit_box_mouse stdcall (#address_box);
140
			mouse.get();
141
			mouse.get();
141
			if (PageLinks.HoverAndProceed(mouse.x, WB1.list.first + mouse.y, WB1.list.y, WB1.list.first))
142
			if (PageLinks.HoverAndProceed(mouse.x, WB1.list.first + mouse.y, WB1.list.y, WB1.list.first))
142
			&& (mouse.pkm) && (mouse.up) {
143
			&& (mouse.pkm) && (mouse.up) {
143
				if (WB1.list.MouseOver(mouse.x, mouse.y)) EventShowPageMenu(mouse.x, mouse.y);
144
				if (WB1.list.MouseOver(mouse.x, mouse.y)) EventShowPageMenu();
144
				break;
145
				break;
145
			}
146
			}
146
			if (WB1.list.MouseScroll(mouse.vert)) WB1.DrawPage();
147
			if (WB1.list.MouseScroll(mouse.vert)) WB1.DrawPage();
147
			scrollbar_v_mouse (#scroll_wv);
148
			scrollbar_v_mouse (#scroll_wv);
148
			if (WB1.list.first != scroll_wv.position)
149
			if (WB1.list.first != scroll_wv.position)
Line 200... Line 201...
200
				else ProcessEvent(key_scancode);
201
				else ProcessEvent(key_scancode);
201
			}
202
			}
202
			break;
203
			break;
Line 203... Line 204...
203
 
204
 
204
		case evReDraw:
-
 
205
			if (menu.cur_y) {
-
 
206
				ProcessEvent(menu.cur_y);
-
 
207
				menu.cur_y = 0;
-
 
208
			}
205
		case evReDraw:
209
			DefineAndDrawWindow(GetScreenWidth()-800/2-random(80),
206
			DefineAndDrawWindow(GetScreenWidth()-800/2-random(80),
210
				GetScreenHeight()-700/2-random(80),800,700,0x73,0,0,0);
207
				GetScreenHeight()-700/2-random(80),800,700,0x73,0,0,0);
211
			GetProcessInfo(#Form, SelfInfo);
208
			GetProcessInfo(#Form, SelfInfo);
212
			system.color.get();
209
			system.color.get();
Line 257... Line 254...
257
 
254
 
258
 
255
 
259
void draw_window()
256
void draw_window()
-
 
257
{
-
 
258
	int i;
-
 
259
	if (menu.cur_y) {
-
 
260
		EAX = menu.cur_y;
-
 
261
		menu.cur_y = 0;
260
{
262
		ProcessEvent(EAX);
Line 261... Line 263...
261
	int i;
263
	}
262
	SetElementSizes();
264
	SetElementSizes();
263
 
265
 
Line 339... Line 341...
339
			} else {
341
			} else {
340
				OpenPage(history.current());
342
				OpenPage(history.current());
341
			}
343
			}
342
			return;
344
			return;
343
		case CHANGE_ENCODING:
345
		case CHANGE_ENCODING:
344
			EventShowEncodingsList(Form.cwidth - 150, status_text.start_y-117);
346
			EventShowEncodingsList();
345
			return;
347
			return;
346
		case SANDWICH_BUTTON:
348
		case SANDWICH_BUTTON:
347
			EventShowMainMenu(Form.cwidth - 215, TOOLBAR_H-6);
349
			EventShowMainMenu();
348
			return;
350
			return;
349
		case VIEW_SOURCE:
351
		case VIEW_SOURCE:
350
			EventViewSource();
352
			EventViewSource();
351
			break;
353
			break;
352
		case EDIT_SOURCE:
354
		case EDIT_SOURCE:
Line 367... Line 369...
367
			}
369
			}
368
			return;
370
			return;
369
		case UPDATE_BROWSER:
371
		case UPDATE_BROWSER:
370
			EventUpdateBrowser();
372
			EventUpdateBrowser();
371
			return;
373
			return;
-
 
374
		case CLEAR_CACHE:
-
 
375
			pages_cache.clear();
-
 
376
			notify(#clear_cache_ok);
-
 
377
			return;
372
		case COPY_LINK_URL:
378
		case COPY_LINK_URL:
373
			Clipboard__CopyText(PageLinks.GetURL(PageLinks.active));
379
			Clipboard__CopyText(PageLinks.GetURL(PageLinks.active));
374
			notify("'URL copied to clipboard'O");
380
			notify("'URL copied to clipboard'O");
375
			return;
381
			return;
376
		case DOWNLOAD_LINK_CONTENTS:
382
		case DOWNLOAD_LINK_CONTENTS:
Line 626... Line 632...
626
		persent = 10;
632
		persent = 10;
627
	}
633
	}
628
	DrawBar(address_box.left-1, address_box.top+20, persent*address_box.width+16/100, 2, 0x72B7EB);
634
	DrawBar(address_box.left-1, address_box.top+20, persent*address_box.width+16/100, 2, 0x72B7EB);
629
}
635
}
Line 630... Line 636...
630
 
636
 
631
void EventShowPageMenu(dword _left, _top)
637
void EventShowPageMenu()
632
{
638
{
633
	menu.selected = 0;
639
	menu.selected = 0;
634
	menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 220, #rmb_menu, VIEW_SOURCE);
640
	menu.show(Form.left + mouse.x+4, Form.top + skin_height + mouse.y, 220, #rmb_menu, VIEW_SOURCE);
Line 635... Line 641...
635
}
641
}
636
 
642
 
637
void EventShowEncodingsList(dword _left, _top)
643
void EventShowLinkMenu()
638
{
644
{
639
	menu.selected = WB1.cur_encoding + 1;
-
 
640
	menu.show(Form.left+_left-6+77,Form.top+_top+skin_height-3, 100, 
645
	menu.selected = 0;
Line 641... Line 646...
641
		"UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866", ENCODINGS);
646
	menu.show(Form.left + mouse.x+4, Form.top + skin_height + mouse.y, 220, #link_menu, COPY_LINK_URL);
642
}
647
}
643
 
648
 
644
void EventShowMainMenu(dword _left, _top)
649
void EventShowEncodingsList()
-
 
650
{
645
{
651
	menu.selected = WB1.cur_encoding + 1;
Line 646... Line 652...
646
	menu.selected = 0;
652
	menu.show(Form.left + Form.cwidth - 95, Form.top + skin_height + status_text.start_y - 121, 90, 
647
	menu.show(Form.left+_left-6+77,Form.top+_top+skin_height-3, 140, #main_menu, OPEN_FILE);
653
		"UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866", ENCODINGS);
648
}
654
}
649
 
655
 
650
void EventShowLinkMenu(dword _left, _top)
656
void EventShowMainMenu()
Line 651... Line 657...
651
{
657
{
652
	menu.selected = 0;
658
	menu.selected = 0;
653
	menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 220, #link_menu, COPY_LINK_URL);
659
	menu.show(Form.left + Form.cwidth - 150, Form.top + skin_height + TOOLBAR_H-8, 140, #main_menu, OPEN_FILE);