Subversion Repositories Kolibri OS

Rev

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

Rev 7877 Rev 8036
Line 1... Line 1...
1
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
1
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
2
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
2
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
3
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 29.01.2019 IgorA
3
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 10.06.2020 IgorA
4
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
4
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
Line 5... Line 5...
5
 
5
 
6
;input:
6
;input:
7
; edi = pointer to tedit struct
7
; edi = pointer to tedit struct
Line 335... Line 335...
335
		jne .no_red_0
335
		jne .no_red_0
336
			call ted_scroll_set_redraw
336
			call ted_scroll_set_redraw
337
			stdcall ted_draw,edi
337
			stdcall ted_draw,edi
338
			jmp @f
338
			jmp @f
339
		.no_red_0:
339
		.no_red_0:
340
		call ted_draw_main_cursor
340
		call ted_sel_end
341
		mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
-
 
342
	@@:
341
	@@:
343
	cmp ah,80 ;177 ;Down
342
	cmp ah,80 ;177 ;Down
344
	jne @f
343
	jne @f
345
		call ted_draw_cursor_sumb
344
		call ted_draw_cursor_sumb
346
		call ted_cur_move_down
345
		call ted_cur_move_down
Line 348... Line 347...
348
		jne .no_red_1
347
		jne .no_red_1
349
			call ted_scroll_set_redraw
348
			call ted_scroll_set_redraw
350
			stdcall ted_draw,edi
349
			stdcall ted_draw,edi
351
			jmp @f
350
			jmp @f
352
		.no_red_1:
351
		.no_red_1:
353
		call ted_draw_main_cursor
352
		call ted_sel_end
354
		mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
-
 
355
	@@:
353
	@@:
356
	cmp ah,75 ;176 ;Left
354
	cmp ah,75 ;176 ;Left
357
	jne @f
355
	jne @f
358
		call ted_draw_cursor_sumb
356
		call ted_draw_cursor_sumb
359
		call ted_cur_move_left
357
		call ted_cur_move_left
Line 361... Line 359...
361
		jne .no_red_2
359
		jne .no_red_2
362
			call ted_scroll_set_redraw
360
			call ted_scroll_set_redraw
363
			stdcall ted_draw,edi
361
			stdcall ted_draw,edi
364
			jmp @f
362
			jmp @f
365
		.no_red_2:
363
		.no_red_2:
366
		call ted_draw_main_cursor
364
		call ted_sel_end
367
		mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
-
 
368
	@@:
365
	@@:
369
	cmp ah,77 ;179 ;Right
366
	cmp ah,77 ;179 ;Right
370
	jne @f
367
	jne @f
371
		call ted_draw_cursor_sumb
368
		call ted_draw_cursor_sumb
372
		call ted_cur_move_right
369
		call ted_cur_move_right
Line 374... Line 371...
374
		jne .no_red_3
371
		jne .no_red_3
375
			call ted_scroll_set_redraw
372
			call ted_scroll_set_redraw
376
			stdcall ted_draw,edi
373
			stdcall ted_draw,edi
377
			jmp @f
374
			jmp @f
378
		.no_red_3:
375
		.no_red_3:
379
		call ted_draw_main_cursor
376
		call ted_sel_end
380
		mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
-
 
381
	@@:
377
	@@:
382
	cmp ah,71 ;180 ;Home
378
	cmp ah,71 ;180 ;Home
383
	jne @f
379
	jne @f
384
		call ted_draw_cursor_sumb
380
		call ted_draw_cursor_sumb
385
		call ted_cur_move_x_first_char
381
		call ted_cur_move_x_first_char
Line 387... Line 383...
387
		jne .no_red_4
383
		jne .no_red_4
388
			call ted_scroll_set_redraw
384
			call ted_scroll_set_redraw
389
			stdcall ted_draw,edi
385
			stdcall ted_draw,edi
390
			jmp @f
386
			jmp @f
391
		.no_red_4:
387
		.no_red_4:
392
		call ted_draw_main_cursor
388
		call ted_sel_end
393
		mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
-
 
394
	@@:
389
	@@:
395
	cmp ah,79 ;181 ;End
390
	cmp ah,79 ;181 ;End
396
	jne @f
391
	jne @f
397
		call ted_draw_cursor_sumb
392
		call ted_draw_cursor_sumb
398
		call ted_cur_move_x_last_char
393
		call ted_cur_move_x_last_char
Line 400... Line 395...
400
		jne .no_red_5
395
		jne .no_red_5
401
			call ted_scroll_set_redraw
396
			call ted_scroll_set_redraw
402
			stdcall ted_draw,edi
397
			stdcall ted_draw,edi
403
			jmp @f
398
			jmp @f
404
		.no_red_5:
399
		.no_red_5:
405
		call ted_draw_main_cursor
400
		call ted_sel_end
406
		mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
-
 
407
	@@:
401
	@@:
408
	cmp ah,73 ;184 ;PageUp
402
	cmp ah,73 ;184 ;PageUp
409
	jne @f
403
	jne @f
410
		call ted_cur_move_page_up
404
		call ted_cur_move_page_up
411
		cmp dl,0
405
		cmp dl,0
412
		je @f
406
		je @f
413
		call ted_scroll_set_redraw
407
		call ted_scroll_set_redraw
414
		stdcall ted_draw,edi
408
		stdcall ted_draw,edi
-
 
409
		mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
415
	@@:
410
	@@:
416
	cmp ah,81 ;183 ;PageDown
411
	cmp ah,81 ;183 ;PageDown
417
	jne @f
412
	jne @f
418
		call ted_cur_move_page_down
413
		call ted_cur_move_page_down
419
		cmp dl,0
414
		cmp dl,0
Line 633... Line 628...
633
endp
628
endp
Line 634... Line 629...
634
 
629
 
635
;input:
630
;input:
636
; edi = pointer to tedit struct
631
; edi = pointer to tedit struct
-
 
632
;description:
-
 
633
; ”ã­ªæ¨ï ¢ë§ë¢ ¥¬ ï ¯à¨ á­ï⨨ ¢ë¤¥«¥­¨ï
-
 
634
align 16
-
 
635
proc ted_sel_end uses eax
-
 
636
	mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
-
 
637
	call ted_is_select
-
 
638
	or al,al
-
 
639
	jz @f
-
 
640
		xor eax,eax
-
 
641
		mov ted_sel_x0,eax
-
 
642
		mov ted_sel_x1,eax
-
 
643
		mov ted_sel_y0,eax
-
 
644
		mov ted_sel_y1,eax
-
 
645
		stdcall ted_draw,edi
-
 
646
		jmp .end_f
-
 
647
	@@:
-
 
648
	call ted_draw_main_cursor
-
 
649
	.end_f:
-
 
650
	ret
-
 
651
endp
-
 
652
 
-
 
653
;input:
-
 
654
; edi = pointer to tedit struct
637
;description:
655
;description:
638
; ”ã­ªæ¨ï ¢ë§ë¢ ¥¬ ï ¯à¨ ¯¥à¥¬¥é¥­¨¨ ¢ë¤¥«¥­¨ï
656
; ”ã­ªæ¨ï ¢ë§ë¢ ¥¬ ï ¯à¨ ¯¥à¥¬¥é¥­¨¨ ¢ë¤¥«¥­¨ï
639
align 16
657
align 16
640
proc ted_sel_move
658
proc ted_sel_move
641
	push eax ecx
659
	push eax ecx
Line 1394... Line 1412...
1394
		jne @f
1412
		jne @f
1395
			dec ted_tim_ch
1413
			dec ted_tim_ch
1396
		@@:
1414
		@@:
1397
	.end_f:
1415
	.end_f:
1398
	popad
1416
	popad
1399
	mov esi,dword[conv_cou]
1417
	mov esi,[conv_cou]
1400
	ret
1418
	ret
1401
endp
1419
endp
Line 1402... Line 1420...
1402
 
1420
 
1403
;output:
1421
;output: