Subversion Repositories Kolibri OS

Rev

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

Rev 5631 Rev 5640
Line 54... Line 54...
54
char search_path[]="http://nigma.ru/index.php?s=";
54
char search_path[]="http://nigma.ru/index.php?s=";
55
char str_location[]="location\0";
55
char str_location[]="location\0";
56
int redirected = 0;
56
int redirected = 0;
Line 57... Line 57...
57
 
57
 
58
char stak[4096];
58
char stak[4096];
59
mouse m;
59
 
Line 60... Line 60...
60
int action_buf;
60
int action_buf;
61
 
61
 
Line 147... Line 147...
147
		{
147
		{
148
			CASE evMouse:
148
			CASE evMouse:
149
				if (!CheckActiveProcess(Form.ID)) break;
149
				if (!CheckActiveProcess(Form.ID)) break;
150
				//Edit URL
150
				//Edit URL
151
				edit_box_mouse stdcall (#address_box);
151
				edit_box_mouse stdcall (#address_box);
152
				m.get();
152
				mouse.get();
153
				//Links hover
153
				//Links hover
154
				if (m.y>WB1.list.y) PageLinks.Hover(m.x, m.y, link_color_inactive, link_color_active, bg_color);
154
				if (mouse.y>WB1.list.y) PageLinks.Hover(mouse.x, mouse.y, link_color_inactive, link_color_active, bg_color);
155
				//Menu
155
				//Menu
156
				if (m.y>WB1.list.y) && (m.y
156
				if (mouse.y>WB1.list.y) && (mouse.y
157
				{
157
				{
158
					if (m.pkm) && (m.up)
158
					if (mouse.pkm) && (mouse.up)
159
					{
159
					{
160
						SwitchToAnotherThread();
160
						SwitchToAnotherThread();
161
						CreateThread(#menu_rmb,#stak+4092);
161
						CreateThread(#menu_rmb,#stak+4092);
162
						break; 
162
						break; 
163
					}
163
					}
164
				}
164
				}
165
				//Mouse scroll
165
				//Mouse scroll
166
				if (m.vert)
166
				if (mouse.vert)
167
				{
167
				{
168
					if (WB1.list.MouseScroll(m.vert)) WB1.Parse();
168
					if (WB1.list.MouseScroll(mouse.vert)) WB1.Parse();
169
				}
169
				}
170
				//Drag scroller
170
				//Drag scroller
171
				scroll_wv.all_redraw = 0;
171
				scroll_wv.all_redraw = 0;
172
				if (!m.lkm) scroll_used=0;
172
				if (!mouse.lkm) scroll_used=0;
173
				if (m.x>=scroll_wv.start_x) && (m.x<=scroll_wv.start_x+scroll_wv.size_x) 
173
				if (mouse.x>=scroll_wv.start_x) && (mouse.x<=scroll_wv.start_x+scroll_wv.size_x) 
174
				&& (m.y>=scroll_wv.start_y+scroll_wv.btn_height) && (-scroll_wv.btn_height+scroll_wv.start_y+scroll_wv.size_y>m.y)
174
				&& (mouse.y>=scroll_wv.start_y+scroll_wv.btn_height) && (-scroll_wv.btn_height+scroll_wv.start_y+scroll_wv.size_y>mouse.y)
175
				&& (WB1.list.count>WB1.list.visible) && (m.lkm)
175
				&& (WB1.list.count>WB1.list.visible) && (mouse.lkm)
176
				{
176
				{
177
					scroll_used=1;
177
					scroll_used=1;
178
				}				
178
				}				
179
				if (scroll_used)
179
				if (scroll_used)
180
				{
180
				{
181
					m.y = m.y / WB1.DrawBuf.zoomf + 5;
181
					mouse.y = mouse.y / WB1.DrawBuf.zoomf + 5;
182
					half_scroll_size = WB1.list.h - 16 * WB1.list.visible / WB1.list.count - 3 /2;
182
					half_scroll_size = WB1.list.h - 16 * WB1.list.visible / WB1.list.count - 3 /2;
183
					if (half_scroll_size+WB1.list.y>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.list.y;
183
					if (half_scroll_size+WB1.list.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=half_scroll_size+WB1.list.y;
184
					btn=WB1.list.first;
184
					btn=WB1.list.first;
185
					WB1.list.first = m.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h;
185
					WB1.list.first = mouse.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h;
186
					if (WB1.list.visible+WB1.list.first>WB1.list.count) WB1.list.first=WB1.list.count-WB1.list.visible;
186
					if (WB1.list.visible+WB1.list.first>WB1.list.count) WB1.list.first=WB1.list.count-WB1.list.visible;
187
					if (btn!=WB1.list.first) WB1.Parse();
187
					if (btn!=WB1.list.first) WB1.Parse();
188
				}
188
				}
189
				break;
189
				break;
190
			case evButton:
190
			case evButton:
Line 471... Line 471...
471
			if (WB1.list.count < WB1.list.visible) return;
471
			if (WB1.list.count < WB1.list.visible) return;
472
			if (WB1.list.KeyEnd()) WB1.Parse();
472
			if (WB1.list.KeyEnd()) WB1.Parse();
473
			return;
473
			return;
474
		case 312:
474
		case 312:
475
			SwitchToAnotherThread();
475
			SwitchToAnotherThread();
476
			m.y = TOOLBAR_H-6;
476
			mouse.y = TOOLBAR_H-6;
477
			m.x = Form.cwidth - 167;
477
			mouse.x = Form.cwidth - 167;
478
			CreateThread(#menu_rmb,#stak+4092);
478
			CreateThread(#menu_rmb,#stak+4092);
479
			return;
479
			return;
480
		case 122:
480
		case 122:
481
			if (WB1.DrawBuf.zoomf==1) WB1.DrawBuf.zoomf=2; else WB1.DrawBuf.zoomf=1;
481
			if (WB1.DrawBuf.zoomf==1) WB1.DrawBuf.zoomf=2; else WB1.DrawBuf.zoomf=1;
482
			Draw_Window(); 
482
			Draw_Window();