1 ;---------------------------------------------------------------------
\r
4 cmp [active_process],eax
\r
8 mov [mouse_scroll_data],eax
\r
10 mov eax,[mouse_position]
\r
11 mov [mouse_position_old],eax
\r
13 mov [mouse_position],eax
\r
15 mov eax,[mouse_keys]
\r
16 mov [mouse_keys_old],eax
\r
18 mov [mouse_keys],eax
\r
22 cmp [scaling_mode],dword 0
\r
25 cmp [capture_image_area_flag],1
\r
26 je capture_image_area
\r
27 ;-----------------------------------------------------
\r
28 cmp [scroll_bar_data_vertical.delta2],0
\r
31 mov eax,[scroll_bar_data_horizontal.max_area]
\r
32 cmp eax,[scroll_bar_data_horizontal.cur_area]
\r
35 push dword scroll_bar_data_horizontal
\r
36 call [scrollbar_hor_mouse]
\r
38 ; mouse_scroll_bar_horizontal scroll_bar_data_horizontal
\r
39 cmp [scroll_bar_data_horizontal.redraw],0
\r
42 mov [scroll_bar_data_horizontal.redraw],0
\r
45 cmp [scroll_bar_data_horizontal.delta2],0
\r
47 ;-----------------------------------------------------
\r
49 mov eax,[scroll_bar_data_vertical.max_area]
\r
50 cmp eax,[scroll_bar_data_vertical.cur_area]
\r
53 push dword scroll_bar_data_vertical
\r
54 call [scrollbar_ver_mouse]
\r
56 ; mouse_scroll_bar_vertical scroll_bar_data_vertical
\r
57 cmp [scroll_bar_data_vertical.redraw],0
\r
59 mov [scroll_bar_data_vertical.redraw],0
\r
63 ;---------------------------------------------------
\r
64 .clear_mouse_keys_old:
\r
66 mov [mouse_keys],eax
\r
67 mov [mouse_keys_old],eax
\r
69 ;---------------------------------------------------
\r
71 cmp [scroll_bar_data_vertical.delta2],0
\r
73 cmp [scroll_bar_data_horizontal.delta2],0
\r
76 ; mov [menu_data_1.get_mouse_flag],eax
\r
77 ; mov [menu_data_2.get_mouse_flag],eax
\r
78 ; mov [menu_data_3.get_mouse_flag],eax
\r
79 ; mov [menu_data_4.get_mouse_flag],eax
\r
80 ; mov [menu_data_5.get_mouse_flag],eax
\r
81 ; mov [menu_data_6.get_mouse_flag],eax
\r
84 call .set_mouse_flag
\r
86 push dword menu_data_1
\r
87 call [menu_bar_mouse]
\r
88 ; mouse_menubar menu_data_1
\r
89 cmp [menu_data_1.click],dword 1
\r
91 call .clear_mouse_keys_old
\r
92 cmp [menu_data_1.cursor_out],dword 0
\r
93 jne analyse_out_menu_1
\r
95 ;--------------------------------------------
\r
98 push dword menu_data_2
\r
99 call [menu_bar_mouse]
\r
100 ; mouse_menubar menu_data_2
\r
101 cmp [menu_data_2.click],dword 1
\r
103 call .clear_mouse_keys_old
\r
104 cmp [menu_data_2.cursor_out],dword 0
\r
105 jne analyse_out_menu_2
\r
107 ;--------------------------------------------
\r
110 push dword menu_data_3
\r
111 call [menu_bar_mouse]
\r
112 ; mouse_menubar menu_data_3
\r
113 cmp [menu_data_3.click],dword 1
\r
115 call .clear_mouse_keys_old
\r
116 cmp [menu_data_3.cursor_out],dword 0
\r
117 jne analyse_out_menu_3 ;still
\r
119 ;--------------------------------------------
\r
122 push dword menu_data_4
\r
123 call [menu_bar_mouse]
\r
124 ; mouse_menubar menu_data_4
\r
125 cmp [menu_data_4.click],dword 1
\r
127 call .clear_mouse_keys_old
\r
128 cmp [menu_data_4.cursor_out],dword 0
\r
129 jne analyse_out_menu_4
\r
131 ;--------------------------------------------
\r
134 push dword menu_data_5
\r
135 call [menu_bar_mouse]
\r
136 ; mouse_menubar menu_data_5
\r
137 cmp [menu_data_5.click],dword 1
\r
139 call .clear_mouse_keys_old
\r
140 cmp [menu_data_5.cursor_out],dword 0
\r
141 jne analyse_out_menu_5
\r
143 ;--------------------------------------------
\r
146 push dword menu_data_6
\r
147 call [menu_bar_mouse]
\r
148 ; mouse_menubar menu_data_6
\r
149 cmp [menu_data_6.click],dword 1
\r
150 jne .mouse_dinamic_button
\r
151 call .clear_mouse_keys_old
\r
152 cmp [menu_data_6.cursor_out],dword 0
\r
153 jne analyse_out_menu_6
\r
155 ;---------------------------------------------------
\r
156 .mouse_dinamic_button:
\r
158 push dword dinamic_button_data_1
\r
159 call [dinamic_button_mouse]
\r
160 ; mouse_dinamic_button dinamic_button_data_1
\r
161 mov eax,dinamic_button_data_1.click
\r
166 ;-------------------------------------------------
\r
169 push dword dinamic_button_data_2
\r
170 call [dinamic_button_mouse]
\r
171 ; mouse_dinamic_button dinamic_button_data_2
\r
172 mov eax,dinamic_button_data_2.click
\r
177 ;-------------------------------------------------
\r
180 push dword dinamic_button_data_3
\r
181 call [dinamic_button_mouse]
\r
182 ; mouse_dinamic_button dinamic_button_data_3
\r
183 mov eax,dinamic_button_data_3.click
\r
188 ;-------------------------------------------------
\r
191 push dword dinamic_button_data_4
\r
192 call [dinamic_button_mouse]
\r
193 ; mouse_dinamic_button dinamic_button_data_4
\r
194 mov eax,dinamic_button_data_4.click
\r
199 ;-------------------------------------------------
\r
202 push dword dinamic_button_data_5
\r
203 call [dinamic_button_mouse]
\r
204 ; mouse_dinamic_button dinamic_button_data_5
\r
205 mov eax,dinamic_button_data_5.click
\r
210 ;-------------------------------------------------
\r
213 push dword dinamic_button_data_6
\r
214 call [dinamic_button_mouse]
\r
215 ; mouse_dinamic_button dinamic_button_data_6
\r
216 mov eax,dinamic_button_data_6.click
\r
221 ;-------------------------------------------------
\r
224 push dword dinamic_button_data_7
\r
225 call [dinamic_button_mouse]
\r
226 ; mouse_dinamic_button dinamic_button_data_7
\r
227 mov eax,dinamic_button_data_7.click
\r
232 ;-------------------------------------------------
\r
235 push dword dinamic_button_data_8
\r
236 call [dinamic_button_mouse]
\r
237 ; mouse_dinamic_button dinamic_button_data_8
\r
238 mov eax,dinamic_button_data_8.click
\r
242 jmp zoom_plus ;still
\r
243 ;-------------------------------------------------
\r
246 push dword dinamic_button_data_9
\r
247 call [dinamic_button_mouse]
\r
248 ; mouse_dinamic_button dinamic_button_data_9
\r
249 mov eax,dinamic_button_data_9.click
\r
253 jmp zoom_minus ;still
\r
254 ;-------------------------------------------------
\r
257 push dword dinamic_button_data_10
\r
258 call [dinamic_button_mouse]
\r
259 ; mouse_dinamic_button dinamic_button_data_10
\r
260 mov eax,dinamic_button_data_10.click
\r
264 jmp no_scaling ;still
\r
265 ;-------------------------------------------------
\r
268 push dword dinamic_button_data_11
\r
269 call [dinamic_button_mouse]
\r
270 ; mouse_dinamic_button dinamic_button_data_11
\r
271 mov eax,dinamic_button_data_11.click
\r
275 jmp rotate_clockwise
\r
276 ;-------------------------------------------------
\r
278 ; rotate counter-clockwise
\r
279 push dword dinamic_button_data_12
\r
280 call [dinamic_button_mouse]
\r
281 ; mouse_dinamic_button dinamic_button_data_12
\r
282 mov eax,dinamic_button_data_12.click
\r
286 jmp rotate_counter_clockwise
\r
287 ;-------------------------------------------------
\r
290 push dword dinamic_button_data_13
\r
291 call [dinamic_button_mouse]
\r
292 ; mouse_dinamic_button dinamic_button_data_13
\r
293 mov eax,dinamic_button_data_13.click
\r
298 ;-------------------------------------------------
\r
301 push dword dinamic_button_data_14
\r
302 call [dinamic_button_mouse]
\r
303 ; mouse_dinamic_button dinamic_button_data_14
\r
304 mov eax,dinamic_button_data_14.click
\r
309 ;-------------------------------------------------
\r
312 push dword dinamic_button_data_15
\r
313 call [dinamic_button_mouse]
\r
314 ; mouse_dinamic_button dinamic_button_data_15
\r
315 mov eax,dinamic_button_data_15.click
\r
319 jmp k_option ;still
\r
320 ;-------------------------------------------------
\r
322 jmp check_scroll_event
\r
324 ;---------------------------------------------------------------------
\r
328 mov [menu_data_1.get_mouse_flag],eax
\r
329 mov [menu_data_2.get_mouse_flag],eax
\r
330 mov [menu_data_3.get_mouse_flag],eax
\r
331 mov [menu_data_4.get_mouse_flag],eax
\r
332 mov [menu_data_5.get_mouse_flag],eax
\r
333 mov [menu_data_6.get_mouse_flag],eax
\r
335 ;---------------------------------------------------------------------
\r
336 analyse_out_menu_1:
\r
338 mov eax,[menu_data_1.cursor_out]
\r
346 ;---------------------------------------------------------------------
\r
347 analyse_out_menu_2:
\r
349 mov eax,[menu_data_2.cursor_out]
\r
351 je rotate_clockwise
\r
353 je rotate_counter_clockwise
\r
355 je invert_left_to_right
\r
357 je invert_up_to_down
\r
359 ;---------------------------------------------------------------------
\r
360 analyse_out_menu_3:
\r
362 mov eax,[menu_data_3.cursor_out]
\r
364 je k_sort_directory
\r
370 ;---------------------------------------------------------------------
\r
371 analyse_out_menu_4:
\r
373 mov eax,[menu_data_4.cursor_out]
\r
383 ;---------------------------------------------------------------------
\r
384 analyse_out_menu_5:
\r
386 mov eax,[menu_data_5.cursor_out]
\r
396 ;---------------------------------------------------------------------
\r
397 analyse_out_menu_6:
\r
399 cmp [menu_data_6.cursor_out],dword 1
\r
401 cmp [menu_data_6.cursor_out],dword 2
\r
404 ;---------------------------------------------------------------------
\r
405 check_scroll_event:
\r
406 ; jmp capture_image_area
\r
407 mov eax,[mouse_scroll_data]
\r
409 jz capture_image_area ;still
\r
416 mov eax,[scaling_mode]
\r
419 call calculation_next_value_minus
\r
420 mov [calc_next_value_minus],1
\r
423 mov eax,zoom_factors
\r
424 cmp [eax],dword zoom_factors.min
\r
427 mov cx,[mouse_scroll_data.vertical]
\r
430 mov cx,[mouse_scroll_data.horizontal]
\r
434 ;----------------------------------------
\r
435 cmp [calc_next_value_minus],1
\r
437 mov [calc_next_value_minus],0
\r
443 cmp [eax],dword zoom_factors.min
\r
450 mov [eax],dword zoom_factors.min
\r
452 ;----------------------------------------
\r
455 mov bx,[mouse_scroll_data.vertical]
\r
459 mov bx,[mouse_scroll_data.horizontal]
\r
462 mov eax,[scaling_mode]
\r
465 call calculation_next_value_plus
\r
466 mov [calc_next_value_plus],1
\r
469 mov eax,zoom_factors
\r
470 cmp [eax],dword zoom_factors.max
\r
475 ;---------------------------------------
\r
476 cmp [calc_next_value_plus],1
\r
478 mov [calc_next_value_plus],0
\r
484 cmp [eax],dword zoom_factors.max
\r
491 mov [eax],dword zoom_factors.max
\r
493 ;---------------------------------------------------------------------
\r
494 capture_image_area:
\r
495 cmp [scroll_bar_data_vertical.delta2],0
\r
497 cmp [scroll_bar_data_horizontal.delta2],0
\r
500 mov [draw_scrollbar_counter],eax
\r
501 mov eax,[scroll_bar_data_vertical.max_area]
\r
502 cmp eax,[scroll_bar_data_vertical.cur_area]
\r
504 inc [draw_scrollbar_counter]
\r
506 mov eax,[scroll_bar_data_horizontal.max_area]
\r
507 cmp eax,[scroll_bar_data_horizontal.cur_area]
\r
509 inc [draw_scrollbar_counter]
\r
511 cmp [draw_scrollbar_counter],0
\r
514 mov eax,[mouse_position]
\r
516 mov bx,ax ; EBX mouse y
\r
517 shr eax,16 ; EAX mouse x
\r
519 mov ecx,[image_start_coordinates]
\r
521 mov dx,cx ; EDX start y
\r
522 shr ecx,16 ; ECX start x
\r
530 add cx,[wa_width_2]
\r
538 mov ecx,[mouse_keys]
\r
539 test ecx,1b ; left button
\r
540 jz .no_capture ;still
\r
542 mov ecx,[mouse_keys_old]
\r
543 test ecx,1b ; left button old
\r
544 jz .no_capture ;still
\r
546 mov [capture_image_area_flag],1
\r
548 mov ecx,[mouse_position_old]
\r
550 mov dx,cx ; EDX mouse y old
\r
551 shr ecx,16 ; ECX mouse x old
\r
557 add [scroll_bar_data_horizontal.position],ecx
\r
561 cmp eax,[scroll_bar_data_horizontal.position]
\r
564 mov [scroll_bar_data_horizontal.position],eax
\r
567 sub [scroll_bar_data_horizontal.position],eax
\r
574 add [scroll_bar_data_vertical.position],edx
\r
579 cmp ebx,[scroll_bar_data_vertical.position]
\r
582 mov [scroll_bar_data_vertical.position],eax
\r
585 sub [scroll_bar_data_vertical.position],ebx
\r
589 call draw_scrollbars
\r
593 mov [capture_image_area_flag],0
\r
596 ;---------------------------------------------------------------------