t_edit:
1) add keys Ctrl+H, Ctrl+G 2) update panels code git-svn-id: svn://kolibrios.org@7579 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> box_lib.obj
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TextEditor <20><><EFBFBD> Kolibri OS
|
||||
; 䠩<> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> ࠧ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 21.10.2018 IgorA
|
||||
; 䠩<> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> ࠧ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 29.01.2019 IgorA
|
||||
; <20><> <20><><EFBFBD> <20>ਬ<EFBFBD><E0A8AC><EFBFBD><EFBFBD><EFBFBD> GPL2 <20><>業<EFBFBD><E6A5AD><EFBFBD>
|
||||
|
||||
;input:
|
||||
@@ -20,12 +20,6 @@ macro ColToIndexOffset ind_reg,out_reg {
|
||||
add out_reg,ted_key_words_data
|
||||
}
|
||||
|
||||
TED_PANEL_NULL equ 0 ;<3B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
TED_PANEL_FIND equ 1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>᪠
|
||||
TED_PANEL_SYNTAX equ 2 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>롮<EFBFBD><EBA1AE> 䠩<><E4A0A9><EFBFBD> <20><><EFBFBD>ᢥ⪨
|
||||
TED_PANEL_REPLACE equ 3 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
TED_PANEL_WIDTH equ 150 ;<3B><>ਭ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
TED_LINES_IN_NEW_FILE equ 30 ;<3B><> <20><>ப <20> <20><><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9>
|
||||
MAX_COLOR_WORD_LEN equ 40
|
||||
;------------------------------------------------------------------------------
|
||||
@@ -241,38 +235,44 @@ proc ted_key, edit:dword, table:dword, control:dword
|
||||
test esi,KM_CTRL ;Ctrl+...
|
||||
jz .key_Ctrl
|
||||
; *** <20>맮<EFBFBD> <20><><EFBFBD>譨<EFBFBD> <20>㭪権 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ॡ<EFBFBD><E0A5A1><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD>/<2F><><EFBFBD>᪠/...
|
||||
cmp ted_fun_on_key_ctrl_all,0
|
||||
je .end0
|
||||
xor al,al
|
||||
cmp ah,24 ;Ctrl+O
|
||||
jne @f
|
||||
cmp ted_fun_on_key_ctrl_o,0
|
||||
je .end_key_fun
|
||||
call ted_fun_on_key_ctrl_o
|
||||
mov al,'O'
|
||||
@@:
|
||||
cmp ah,31 ;Ctrl+S
|
||||
jne .end_ctrl_s
|
||||
cmp ted_fun_on_key_ctrl_s,0
|
||||
je .end_key_fun
|
||||
xor eax,eax
|
||||
test esi,KM_SHIFT
|
||||
jz @f
|
||||
inc eax
|
||||
@@:
|
||||
call ted_fun_on_key_ctrl_s
|
||||
jmp .end_key_fun
|
||||
.end_ctrl_s:
|
||||
jne @f
|
||||
mov al,'S'
|
||||
@@:
|
||||
cmp ah,33 ;Ctrl+F
|
||||
jne @f
|
||||
cmp ted_panel_id,TED_PANEL_FIND
|
||||
je @f
|
||||
cmp ted_fun_on_key_ctrl_f,0
|
||||
je .end_key_fun
|
||||
call ted_fun_on_key_ctrl_f
|
||||
mov al,'F'
|
||||
@@:
|
||||
cmp ah,34 ;Ctrl+G
|
||||
jne @f
|
||||
mov al,'G'
|
||||
@@:
|
||||
cmp ah,35 ;Ctrl+H
|
||||
jne @f
|
||||
mov al,'H'
|
||||
@@:
|
||||
cmp ah,49 ;Ctrl+N
|
||||
jne @f
|
||||
cmp ted_fun_on_key_ctrl_n,0
|
||||
je .end_key_fun
|
||||
call ted_fun_on_key_ctrl_n
|
||||
mov al,'N'
|
||||
@@:
|
||||
or al,al
|
||||
jz .end0
|
||||
and eax,0xff
|
||||
test esi,KM_SHIFT
|
||||
jz @f
|
||||
or eax,0x100
|
||||
@@:
|
||||
stdcall ted_fun_on_key_ctrl_all, eax
|
||||
jmp .end_key_fun
|
||||
.end0:
|
||||
|
||||
; *** <20>맮<EFBFBD> <20><><EFBFBD><EFBFBD>७<EFBFBD><E0A5AD><EFBFBD> <20>㭪権
|
||||
cmp ah,30 ;Ctrl+A
|
||||
jne @f
|
||||
@@ -441,7 +441,7 @@ proc ted_key, edit:dword, table:dword, control:dword
|
||||
|
||||
cmp dword[table],0
|
||||
je @f
|
||||
stdcall KeyConvertToASCII, dword[table]
|
||||
stdcall KeyConvertToASCII, [table]
|
||||
@@:
|
||||
|
||||
;mov ted_drag_k,0 ;<3B><><EFBFBD><EFBFBD><EFBFBD>稢<EFBFBD><E7A8A2><EFBFBD> <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -1157,7 +1157,7 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
||||
jg .no_cur_mov
|
||||
inc ted_cur_x ;move cursor
|
||||
;call ted_go_to_pos
|
||||
cmp byte [esi],13
|
||||
cmp byte[esi],13
|
||||
jne .no_cur_mov
|
||||
mov ted_cur_x,0
|
||||
inc ted_cur_y
|
||||
@@ -1169,18 +1169,18 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
||||
; *** <20><>⠢<EFBFBD><E2A0A2> ⥪<>饣<EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD> <20><> <20><>ப<EFBFBD> ***
|
||||
mov ecx,ted_opt_ed_change_time
|
||||
not ecx
|
||||
and dword[add_opt],ecx ;n_tim=false;
|
||||
and [add_opt],ecx ;n_tim=false;
|
||||
|
||||
mov cl,byte [esi] ;tex[i].c=ta[ns];
|
||||
mov byte [edx],cl
|
||||
m2m dword [edx+10],ted_tim_ch ;tex[i].tc=ted_tim_ch;
|
||||
mov cl,byte[esi] ;tex[i].c=ta[ns];
|
||||
mov byte[edx],cl
|
||||
m2m dword[edx+10],ted_tim_ch ;tex[i].tc=ted_tim_ch;
|
||||
mov [edx+2],eax ;tex[i].perv=po_t;
|
||||
|
||||
mov ecx,eax
|
||||
imul ecx,sizeof.symbol
|
||||
add ecx,ted_tex ; *** ecx = tex[po_t] ***
|
||||
add ecx,6 ; *** ecx = tex[po_t].next ***
|
||||
m2m dword [edx+6],dword [ecx] ;tex[i].next=tex[po_t].next;
|
||||
m2m dword[edx+6],dword[ecx] ;tex[i].next=tex[po_t].next;
|
||||
|
||||
call ted_get_text_arr_index ;*** eax = i ***
|
||||
mov [ecx],eax ;tex[po_t].next=i; // <20><>뫪<EFBFBD> <20><>७<EFBFBD><E0A5AD>ࠢ<EFBFBD>塞
|
||||
@@ -1968,7 +1968,7 @@ ted_get_num_lines:
|
||||
call ted_iterat_next
|
||||
cmp edx,ted_tex_1
|
||||
jle @f
|
||||
cmp byte [edx],13
|
||||
cmp byte[edx],13
|
||||
jne @b
|
||||
inc eax
|
||||
jmp @b
|
||||
@@ -2046,6 +2046,38 @@ proc ted_set_undo
|
||||
ret
|
||||
endp
|
||||
|
||||
;description:
|
||||
; <20><><EFBFBD><EFBFBD>室 <20><> 㪠<><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
;input:
|
||||
; row = <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>
|
||||
; col = ᨬ<><E1A8AC><EFBFBD>
|
||||
align 16
|
||||
proc ted_go_to_position uses ecx edx edi, edit:dword, row:dword, col:dword
|
||||
mov edi,[edit]
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD>⮢<EFBFBD><E2AEA2> <20><>ப<EFBFBD>
|
||||
mov edx,[row]
|
||||
call ted_get_num_lines
|
||||
cmp edx,eax
|
||||
jle @f
|
||||
mov edx,eax ;<3B><>࠭<EFBFBD>祭<EFBFBD><E7A5AD> <20><> <20><>ப<EFBFBD> max
|
||||
@@:
|
||||
dec edx
|
||||
cmp edx,0
|
||||
jge @f
|
||||
xor edx,edx ;<3B><>࠭<EFBFBD>祭<EFBFBD><E7A5AD> <20><> <20><>ப<EFBFBD> min
|
||||
@@:
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD>⮢<EFBFBD><E2AEA2> ᨬ<><E1A8AC><EFBFBD><EFBFBD>
|
||||
mov ecx,[col]
|
||||
dec ecx
|
||||
cmp ecx,0
|
||||
jge @f
|
||||
xor ecx,ecx
|
||||
@@:
|
||||
call ted_go_to_pos
|
||||
stdcall ted_draw,edi
|
||||
ret
|
||||
endp
|
||||
|
||||
;input:
|
||||
; ecx = Col
|
||||
; edx = Row
|
||||
@@ -3498,13 +3530,9 @@ align 4
|
||||
inc bx
|
||||
int 0x40
|
||||
|
||||
cmp ted_fun_draw_panel_find,0
|
||||
cmp ted_fun_draw_panels,0
|
||||
je @f
|
||||
call ted_fun_draw_panel_find
|
||||
@@:
|
||||
cmp ted_fun_draw_panel_syntax,0
|
||||
je @f
|
||||
call ted_fun_draw_panel_syntax
|
||||
stdcall ted_fun_draw_panels, edi
|
||||
@@:
|
||||
popad
|
||||
ret
|
||||
@@ -3515,7 +3543,6 @@ endp
|
||||
align 16
|
||||
proc ted_draw_main_cursor
|
||||
pushad
|
||||
|
||||
mov eax,SF_DRAW_RECT ;draw cursor
|
||||
mov ecx,ted_wnd_t ;calc rect -> y0,y1
|
||||
add ecx,ted_rec_t
|
||||
@@ -3811,8 +3838,7 @@ endp
|
||||
align 16
|
||||
proc KeyConvertToASCII uses ebx, table:dword
|
||||
mov ebx,[table] ;convert scan to ascii
|
||||
ror ax,8
|
||||
xor ah,ah
|
||||
shr ax,8
|
||||
add bx,ax ;? ebx,eax
|
||||
mov ah,byte[ebx]
|
||||
ret
|
||||
|
Reference in New Issue
Block a user