Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6087 → Rev 6086

/programs/develop/libraries/box_lib/trunk/t_edit.mac
1,6 → 1,6
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 21.01.2016 IgorA
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 20.01.2016 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
 
;input:
106,7 → 106,8
 
 
align 4
proc ted_init uses eax ecx edi, edit:dword
proc ted_init, edit:dword
push eax ecx edi
mov edi,dword[edit]
 
mov ecx,sizeof.symbol
129,6 → 130,7
mov ted_syntax_file,eax
 
stdcall ted_init_scroll_bars,edi,3
pop edi ecx eax
ret
endp
 
208,10 → 210,12
endp
 
align 4
proc ted_delete uses edi, edit:dword
proc ted_delete, edit:dword
push edi
mov edi,dword[edit]
invoke mem.free,ted_tex
invoke mem.free,ted_arr_key_pos ;ted_syntax_file
pop edi
ret
endp
 
525,7 → 529,8
;output:
; al = 1 - can save
align 4
proc ted_can_save uses ecx edi, edit:dword
proc ted_can_save, edit:dword
push ecx edi
mov edi,dword[edit]
 
mov ecx,ted_tim_ch
535,6 → 540,7
jne @f
dec al
@@:
pop edi ecx
ret
endp
 
543,7 → 549,8
;output:
; al = 1 - selected
align 4
proc ted_is_select uses ebx
proc ted_is_select
push ebx
xor al,al
cmp ted_drag_m,1
je @f
556,6 → 563,7
jne @f
xor al,al
@@:
pop ebx
ret
endp
 
562,7 → 570,8
;input:
; edi = pointer to tedit struct
align 4
proc ted_sel_normalize uses ecx esi
proc ted_sel_normalize
push ecx esi
push edi
mov esi,edi
add esi,ted_offs_sel
597,6 → 606,7
jg .swp_f
 
.end_f:
pop esi ecx
ret
endp
 
605,7 → 615,8
;description:
; ”ã­ªæ¨ï ¢ë§ë¢ ¥¬ ï ¯à¨ ­ ç «¥ ¢ë¤¥«¥­¨ï
align 4
proc ted_sel_start uses eax ecx
proc ted_sel_start
push eax ecx
mov eax,ted_scr_h
mov ecx,ted_cur_x
add ecx,dword[eax+sb_offs_position]
617,6 → 628,7
add ecx,dword[eax+sb_offs_position]
mov ted_sel_y0,ecx
mov ted_sel_y1,ecx
pop ecx eax
ret
endp
 
670,7 → 682,8
;input:
; cl_al_mem = 1 - clear all memory
align 4
proc ted_clear uses ecx edi, edit:dword, cl_al_mem:dword
proc ted_clear, edit:dword, cl_al_mem:dword
push ecx edi
mov edi,dword[edit]
 
mov ted_cur_x,0
714,6 → 727,7
pop edx
 
.exit:
pop edi ecx
ret
endp
 
1431,7 → 1445,9
;description:
; ”ã­ªæ¨ï 㤠«ï¥â ¢ë¤¥«¥­­ë© ⥪áâ
align 4
proc ted_sel_text_del uses ebx ecx edx esi, del_opt:dword
proc ted_sel_text_del, del_opt:dword
push ebx ecx edx esi
 
call ted_is_select
cmp al,0
je .end_f
1478,6 → 1494,7
mov ted_sel_y1,0
@@:
.end_f:
pop esi edx ecx ebx
ret
endp
 
2438,7 → 2455,8
; eax = ª®¤ ®è¨¡ª¨
; ebx = ª®««¨ç¥á⢮ ¯à®ç¨â ­­ëå ¡ ©â
align 4
proc ted_open_file uses ecx edx edi, edit:dword, file:dword, f_name:dword ;äã­ªæ¨ï ®âªàëâ¨ï ä ©« 
proc ted_open_file, edit:dword, file:dword, f_name:dword ;äã­ªæ¨ï ®âªàëâ¨ï ä ©« 
push ecx edx edi
mov edi,dword[edit]
 
; *** ¯à®¢¥à塞 à §¬¥à ¯ ¬ï⨠¨ ¥á«¨ ­¥ 墠⠥â ⮠㢥«¨ç¨¢ ¥¬ ***
2509,6 → 2527,7
;if open file
call ted_on_open_file
.ret_f:
pop edi edx ecx
ret
endp
 
2545,7 → 2564,8
endp
 
align 4
proc ted_but_cut uses edi, edit:dword
proc ted_but_cut, edit:dword
push edi
mov edi,dword[edit]
 
stdcall ted_but_copy,edi
2559,6 → 2579,7
je @f
call ted_fun_draw_panel_buttons
@@:
pop edi
ret
endp
 
2733,7 → 2754,8
endp
 
align 4
proc ted_but_reverse uses eax ebx edi, edit:dword
proc ted_but_reverse, edit:dword
push eax ebx edi
mov edi,dword[edit]
 
call ted_is_select
2760,11 → 2782,13
call ted_revers
@@:
stdcall ted_draw,edi
pop edi ebx eax
ret
endp
 
align 4
proc ted_but_undo uses eax edi, edit:dword
proc ted_but_undo, edit:dword
push eax edi
mov edi,dword[edit]
 
mov eax,ted_tim_undo
2777,11 → 2801,13
je @f
call ted_fun_draw_panel_buttons
@@:
pop edi eax
ret
endp
 
align 4
proc ted_but_redo uses edi, edit:dword
proc ted_but_redo, edit:dword
push edi
mov edi,dword[edit]
 
cmp ted_tim_undo,1
2793,6 → 2819,7
je @f
call ted_fun_draw_panel_buttons
@@:
pop edi
ret
endp
 
3246,7 → 3273,9
shl ecx,16
mov cx,word[eax+sb_offs_size_y]
inc cx
mcall 13,,,ted_color_wnd_capt ;[sc.work]
mov edx,ted_color_wnd_capt ;[sc.work]
mov eax,13
int 0x40
 
;right-bottom square
mov ebx,ted_wnd_l
3450,7 → 3479,7
pushad
cmp ted_rec_t,13 ;¬¨­¨¬ «ì­ ï ¢ëá®â  ¤«ï à¨á®¢ ­¨ï á¯à ¢ª¨
jle @f
;clear place before draw help
mov eax,13 ;clear place before draw help
mov ebx,ted_wnd_l
add ebx,ted_rec_l
shl ebx,16
3460,7 → 3489,8
add ecx,13
shl ecx,16
add ecx,ted_rec_h
mcall 13,,,ted_color_wnd_capt
mov edx,ted_color_wnd_capt
int 0x40
 
cmp ted_help_id,-1
je @f
3483,12 → 3513,11
mov ecx,dword[ecx]
or ecx,0xc0000000 ;SetTextStyles
mov esi,edi
mcall 4,,,,,ted_color_wnd_work
mov edi,ted_color_wnd_work
mov eax,4
int 0x40
mov edi,esi
 
mov esi,edx
call tl_strlen
 
;*** draw help string ***
mov ecx,ted_color_wnd_bord
or ecx,0x80000000
3496,11 → 3525,8
cmp edx,0
je @f
add edx,ted_help_text_f1
inc eax
imul eax,6 ;è¨à¨­  ᨬ¢®«  ¢ á¨áâ. èà¨äâ¥
shl eax,16
add ebx,eax
mcall 4
add ebx,0x500000
int 0x40
@@:
popad
ret