2010-04-29 20:27:40 +02:00
|
|
|
|
struct f70
|
|
|
|
|
func_n dd ?
|
|
|
|
|
param1 dd ?
|
|
|
|
|
param2 dd ?
|
|
|
|
|
param3 dd ?
|
|
|
|
|
param4 dd ?
|
|
|
|
|
rezerv db ?
|
|
|
|
|
name dd ?
|
|
|
|
|
ends
|
|
|
|
|
|
|
|
|
|
struct TexColViv
|
|
|
|
|
Text rb MAX_COLOR_WORD_LEN ; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᢥ⪨
|
|
|
|
|
f1 dd 0 ; <EFBFBD><EFBFBD>ࠢ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|
|
|
|
wwo db ? ; whole words only
|
|
|
|
|
endc db ? ; ᨬ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뤥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (wwo&4)
|
|
|
|
|
color db ? ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<EFBFBD><EFBFBD>
|
|
|
|
|
ends
|
|
|
|
|
|
|
|
|
|
struct symbol
|
|
|
|
|
c db ? ; +0 ᨬ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
col db ? ; +1 梥<EFBFBD>
|
|
|
|
|
perv dd ? ; +2
|
|
|
|
|
next dd ? ; +6 㪠<EFBFBD><EFBFBD>⥫<EFBFBD>
|
|
|
|
|
tc dd ? ; +10 <EFBFBD>६. ᮧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
td dd ? ; +14 <EFBFBD>६. 㤠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ends
|
|
|
|
|
|
|
|
|
|
|
2010-05-03 17:12:50 +02:00
|
|
|
|
hed db 'TextEditor 03.05.10',0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-04-29 20:27:40 +02:00
|
|
|
|
sc system_colors
|
|
|
|
|
|
|
|
|
|
fn_icon db 'te_icon.bmp',0
|
|
|
|
|
bmp_icon dd 0
|
|
|
|
|
run_file_70 f70
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;input:
|
|
|
|
|
; al = <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>訡<EFBFBD><EFBFBD>
|
|
|
|
|
align 4
|
|
|
|
|
ted_on_init_synt_err:
|
|
|
|
|
mov byte[msgbox_3.err],al
|
|
|
|
|
stdcall [mb_create],msgbox_3,thread ;message: Can-t open color options file!
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
;<EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뤥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;input:
|
|
|
|
|
; ecx = size data
|
|
|
|
|
;otput:
|
|
|
|
|
; eax = pointer to memory
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mem_Alloc:
|
|
|
|
|
push ebx
|
|
|
|
|
mov eax,68
|
|
|
|
|
mov ebx,12
|
|
|
|
|
int 0x40
|
|
|
|
|
pop ebx
|
|
|
|
|
ret
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
;<EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;input:
|
|
|
|
|
; ecx = pointer to memory
|
|
|
|
|
align 4
|
|
|
|
|
mem_Free:
|
2009-12-29 00:19:20 +01:00
|
|
|
|
push eax ebx
|
2010-04-29 20:27:40 +02:00
|
|
|
|
cmp ecx,0
|
|
|
|
|
jz @f
|
|
|
|
|
mov eax,68
|
|
|
|
|
mov ebx,13
|
|
|
|
|
int 0x40
|
|
|
|
|
@@:
|
|
|
|
|
pop ebx eax
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
ted_but_new_file:
|
|
|
|
|
push eax ebx
|
|
|
|
|
stdcall [ted_can_save], tedit0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
cmp al,1
|
|
|
|
|
jne @f
|
2010-04-22 21:39:39 +02:00
|
|
|
|
stdcall [mb_create],msgbox_2,thread ;message: save changes in file?
|
2009-12-29 00:19:20 +01:00
|
|
|
|
;mov eax,5
|
|
|
|
|
;mov ebx,50
|
|
|
|
|
;int 0x40
|
2010-04-22 21:39:39 +02:00
|
|
|
|
stdcall [mb_setfunctions],msgbox_2_funct
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jmp .ret_f
|
|
|
|
|
@@:
|
|
|
|
|
call On_NewFile
|
|
|
|
|
.ret_f:
|
|
|
|
|
pop ebx eax
|
|
|
|
|
ret
|
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2009-12-29 00:19:20 +01:00
|
|
|
|
On_NewFile:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_clear], tedit0,1
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_toolbar
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_draw], tedit0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
ret
|
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2009-12-29 00:19:20 +01:00
|
|
|
|
On_SaveAndNewFile:
|
2010-04-22 21:39:39 +02:00
|
|
|
|
push edi
|
|
|
|
|
mov edi, tedit0
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_but_save_file],edi,run_file_70,[edit1.text]
|
2010-04-22 21:39:39 +02:00
|
|
|
|
cmp ted_err_save,0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jne @f
|
|
|
|
|
call On_NewFile
|
|
|
|
|
@@:
|
2010-04-22 21:39:39 +02:00
|
|
|
|
pop edi
|
|
|
|
|
ret
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
;description:
|
|
|
|
|
; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮮ<EFBFBD>饭<EFBFBD><EFBFBD>
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
but_no_msg_OpenFile:
|
|
|
|
|
push eax ebx
|
|
|
|
|
stdcall [ted_open_file], tedit0,run_file_70,[edit1.text]
|
|
|
|
|
call ted_messages_after_open_file
|
|
|
|
|
pop ebx eax
|
|
|
|
|
ret
|
2010-04-22 21:39:39 +02:00
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
;description:
|
|
|
|
|
; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮮ<EFBFBD>饭<EFBFBD><EFBFBD> (<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⬥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥)
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
ted_but_open_file:
|
|
|
|
|
push eax ebx
|
|
|
|
|
stdcall [ted_can_save], tedit0
|
|
|
|
|
cmp al,1
|
|
|
|
|
jne @f
|
|
|
|
|
stdcall [mb_create],msgbox_5,thread ;message: save changes in file?
|
|
|
|
|
stdcall [mb_setfunctions],msgbox_5_funct
|
|
|
|
|
jmp .ret_f
|
|
|
|
|
@@:
|
|
|
|
|
stdcall [ted_open_file], tedit0,run_file_70,[edit1.text]
|
|
|
|
|
call ted_messages_after_open_file
|
|
|
|
|
.ret_f:
|
|
|
|
|
pop ebx eax
|
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
|
|
|
|
;input:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
; eax = <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>訡<EFBFBD><EFBFBD>
|
|
|
|
|
; ebx = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; edi = pointer to tedit struct
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
ted_messages_after_open_file:
|
|
|
|
|
push ecx
|
|
|
|
|
cmp eax,0
|
|
|
|
|
je @f
|
|
|
|
|
cmp eax,6
|
|
|
|
|
je @f
|
|
|
|
|
cmp ax,10
|
|
|
|
|
jl .zifra_0_9
|
|
|
|
|
mov al,'?'
|
|
|
|
|
sub ax,48
|
|
|
|
|
.zifra_0_9:
|
|
|
|
|
add ax,48
|
|
|
|
|
|
|
|
|
|
mov byte[msgbox_4.err],al
|
|
|
|
|
stdcall [mb_create],msgbox_4,thread ;message: Can-t open text file!
|
|
|
|
|
jmp .ret_f
|
|
|
|
|
@@:
|
|
|
|
|
cmp ebx,-1
|
|
|
|
|
je .ret_f
|
|
|
|
|
;if open file
|
|
|
|
|
mov ecx,ted_max_chars
|
|
|
|
|
sub ecx,2 ;ecx = <EFBFBD><EFBFBD><EFBFBD>ᨬ<EFBFBD><EFBFBD>쭮<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뫠 <EFBFBD>뤥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp ebx,ecx
|
|
|
|
|
jl .ret_f
|
|
|
|
|
stdcall [mb_create],msgbox_1,thread
|
|
|
|
|
.ret_f:
|
|
|
|
|
pop ecx
|
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
align 4
|
|
|
|
|
ted_save_err_msg:
|
|
|
|
|
mov byte[msgbox_6.err],al
|
|
|
|
|
stdcall [mb_create],msgbox_6,thread ;message: Can-t save text file!
|
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
|
|
|
|
proc ted_but_open_syntax, edit:dword
|
2010-04-29 20:27:40 +02:00
|
|
|
|
push ebx edi
|
2010-04-22 21:39:39 +02:00
|
|
|
|
mov edi,dword[edit]
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
cmp ted_panel_id,TED_PANEL_SYNTAX
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jne @f
|
2010-04-22 21:39:39 +02:00
|
|
|
|
stdcall dword[tl_node_get_data], tree1
|
2010-04-15 17:50:49 +02:00
|
|
|
|
pop dword[fn_col_option]
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov ebx,dword[fn_col_option]
|
|
|
|
|
copy_path ebx,fn_syntax_dir,file_name_rez,0x0
|
|
|
|
|
copy_path file_name_rez,sys_path,file_name,0x0
|
|
|
|
|
stdcall [ted_init_syntax_file],edi,run_file_70,file_name
|
|
|
|
|
call [ted_text_colored]
|
|
|
|
|
stdcall [ted_draw],edi
|
2009-12-29 00:19:20 +01:00
|
|
|
|
@@:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
pop edi ebx
|
2010-04-22 21:39:39 +02:00
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
proc ted_but_find ;<EFBFBD>맮<EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠
|
2010-04-22 21:39:39 +02:00
|
|
|
|
push edi
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov edi,tedit0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
cmp ted_panel_id,TED_PANEL_NULL
|
2009-12-29 00:19:20 +01:00
|
|
|
|
je @f
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov ted_panel_id,TED_PANEL_NULL
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ted_wnd_l,0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jmp .e_if
|
|
|
|
|
@@:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov ted_panel_id,TED_PANEL_FIND
|
|
|
|
|
mov ted_wnd_l,TED_PANEL_WIDTH
|
2009-12-29 00:19:20 +01:00
|
|
|
|
.e_if:
|
2010-04-15 17:50:49 +02:00
|
|
|
|
stdcall EvSize,edi
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_draw],edi
|
2010-04-15 17:50:49 +02:00
|
|
|
|
pop edi
|
|
|
|
|
ret
|
|
|
|
|
endp
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
ted_on_find_err:
|
|
|
|
|
stdcall [mb_create],msgbox_7,thread ;message: Can not find text
|
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
but_replace:
|
2010-04-22 21:39:39 +02:00
|
|
|
|
ret
|
2009-12-29 00:19:20 +01:00
|
|
|
|
|
2010-04-22 21:39:39 +02:00
|
|
|
|
align 4
|
2010-04-29 20:27:40 +02:00
|
|
|
|
but_find_key_w:
|
2010-04-22 21:39:39 +02:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc but_sumb_invis, edit:dword
|
|
|
|
|
push edi
|
|
|
|
|
mov edi,dword[edit]
|
|
|
|
|
|
|
|
|
|
xor ted_mode_invis,1
|
2009-12-29 00:19:20 +01:00
|
|
|
|
call draw_but_toolbar
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_draw],edi
|
2010-04-22 21:39:39 +02:00
|
|
|
|
pop edi
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc but_k_words_show, edit:dword
|
|
|
|
|
push edi
|
|
|
|
|
mov edi,dword[edit]
|
|
|
|
|
|
|
|
|
|
xor ted_mode_color,1
|
|
|
|
|
cmp ted_mode_color,0
|
|
|
|
|
je @f
|
2010-04-29 20:27:40 +02:00
|
|
|
|
call [ted_text_colored]
|
2010-04-22 21:39:39 +02:00
|
|
|
|
@@:
|
|
|
|
|
call draw_but_toolbar
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_draw],edi
|
2010-04-22 21:39:39 +02:00
|
|
|
|
pop edi
|
2009-12-29 00:19:20 +01:00
|
|
|
|
ret
|
2010-04-22 21:39:39 +02:00
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
2010-04-15 17:50:49 +02:00
|
|
|
|
proc but_synt_show, edit:dword
|
|
|
|
|
push edi
|
|
|
|
|
mov edi,[edit]
|
|
|
|
|
|
2010-04-29 20:27:40 +02:00
|
|
|
|
cmp ted_panel_id,TED_PANEL_NULL
|
2009-12-29 00:19:20 +01:00
|
|
|
|
je @f
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov ted_panel_id,TED_PANEL_NULL
|
2010-04-15 17:50:49 +02:00
|
|
|
|
mov ted_wnd_l,0
|
2009-12-29 00:19:20 +01:00
|
|
|
|
jmp .e_if
|
|
|
|
|
@@:
|
2010-04-29 20:27:40 +02:00
|
|
|
|
mov ted_panel_id,TED_PANEL_SYNTAX
|
|
|
|
|
mov ted_wnd_l,TED_PANEL_WIDTH
|
2009-12-29 00:19:20 +01:00
|
|
|
|
.e_if:
|
2010-04-15 17:50:49 +02:00
|
|
|
|
stdcall EvSize,edi
|
2010-04-29 20:27:40 +02:00
|
|
|
|
stdcall [ted_draw],edi
|
2010-04-22 21:39:39 +02:00
|
|
|
|
pop edi
|
|
|
|
|
ret
|
|
|
|
|
endp
|